开发者

basic M68000 question, Neo Geo - related

开发者 https://www.devze.com 2023-02-09 08:13 出处:网络
I want to write a program in Motorola 68000 assembler, the target platform is Neo Geo (games console from the nineties); this question is meant serious, I have a specific project which I want to reali

I want to write a program in Motorola 68000 assembler, the target platform is Neo Geo (games console from the nineties); this question is meant serious, I have a specific project which I want to realize and I have programming experience (though I am programming mostly Perl/R nowadays, I have only a little previous exposure to assembly programming).

The Neo Geo does not have much documentation available, however I have one document from Alexander Stante which contains information on the format and where to store the sprites, memory maps, where which memory mapped registers are, how the graphics and sound systems works etc.

So it should be possible to write a program in 68K assembler, assemble it on PC and run it from Neo Geo (or emulator, of which plenty are available, for testing).

I do have some background in M68 assembler, this was for some class during my C.S. master's (10 years back); we assembled on a Sun Sparcstation and sent the program to an attached box which basically had a M68K with some RAM in it and not much else. So it was possible to load the "pure" object code into the CPU.

Now, what I do not understand about the Neo Geo is into which "format" I have to put the assembled code.

I.e. if I have assembled a program which I wrote in 68K assembly, how can I make it so that the emulator thinks it is a ROM-Image, or how can I build a CD (or CDZ, for that matter) which a physical Neo Geo CD will accept? Does it check for file names, or magic headers?! So my question is, how to I get the assembled ob开发者_开发百科ject-code into the right "file-format"?! (sorry I don't even know if that's the right word for it).


I can't speak for the specifics of the Neo Geo platform, nor the format that is common among the emulators for it.

However, it is most likely some kind of ROM image. For the 68K family, you'll find boot vectors at one end of ROM. You'll need to spend some quality time reading the manual. The processor will start by fetching values from memory using Table B-1. So the 32 bits at 0x0 need to have the initial stack pointer and 0x4 needs the initial PC.

You'll want to study the images of a few existing Neo Geo games to see if you can trace the code using these initial values. It's possible that the emulators store their images in a compressed format or with some kind of header on them; you'll have to sort that out for yourself.

EDIT: I should also add that it's likely that you'll initially be confused by the fact that the 68K is the correct endian, that is, big endian.


I believe this link list will get you a long way:

Neo Geo Programming Manual (unofficial)

A LOT of assorted files on Neo Geo.

Various links to emulators. The emulators must know how the code works... The very ambitious MAME also has Neo Geo support.

http://furrtek.free.fr/noclass/neogeo/NeoGeoPM.pdf


I think I found the answer to my original question now, very recently a new wiki popped up which is just excellent for Neo Geo coding:

http://neogeodev.wikkii.com/wiki/Main_Page

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号