Anyone have a favorite quickstart guide and/or toolchain recommendations for the Megadrive?
My only irrational requirement is I want to to never have to see gnu assembler syntax
The #1 would be SGDK, which uses gcc. It fails your gnu syntax requirement, but why would you write asm for a platform where you have a decent compiler? You get to use gcc 6, which is heaven compared to cc65.
The need-to-be-fast functions are part of the SDK, just like neslib here, and if your own code has such a bottleneck, I'd say gnu syntax is worth the cost.
lidnariq wrote:
My only irrational requirement is I want to to never have to see gnu assembler syntax
vasm targeting
m68k with
mot syntax should satisfy this requirement. It's served me well during Neo-Geo development, so I'd imagine it'd be good for Genesis/Mega Drive as well.
lidnariq wrote:
Anyone have a favorite quickstart guide and/or toolchain recommendations for the Megadrive?
My only irrational requirement is I want to to never have to see gnu assembler syntax
I hate gnu 68k assembler syntax :yuck:
I'm probably one of the only one that uses this in MD/Gen dev:
http://john.ccac.rwth-aachen.de:8000/as/cpulist.htmlBut it supports reassembling back over included binaries, which is nice for hacking. I couldn't find any other 68k assemblers that allowed this.
lidnariq wrote:
My only irrational requirement is I want to to never have to see gnu assembler syntax
You can use
as without seeing any MIT syntax, since it also accepts Motorola syntax.
The only trouble is things like
gcc and
objdump...
lidnariq wrote:
I want to to never have to see gnu assembler syntax
...because...?
Because
In my opinion it's ugly.
In my opinion (intel syntax) [rbp-4] makes sense and -4(%rbp) doesn't.
In my opinion, the corresponding 68k wouldn't be all that bad ((-4,fp) vs -4(%fp)) EXCEPT that MIT syntax kept Motorola's syntax for postdecrementing address registers, i.e. -(%sp). Typo and omit the number? It'll assemble JUST FINE and randomly do something ENTIRELY UNRELATED. Is that always a problem with assembly language? Yes, but that doesn't mean you should make it even easier.
In my opinion, the people who designed the assembly language for any given ISA usually put a lot of thought into it, and I feel like grafting GNU/MIT/AT&T syntax onto other things doesn't.
And really, the biggest reason, and the only one I actually need: the dirty hack that it was invented for—to help people who had to maintain multiple assembly code bases on widely varying 32-bit processors so that they wouldn't make stupid mistakes (sigils prevent using mismatched register names, and making src,dst the only used direction)—is entirely irrelevant to me and my use cases.
Just in case anyone wants to argue: don't. At least modern versions of gcc support -masm=intel, even if I mayn't have -masm=mot
More convincing reason to not use GNU syntax: it's completely different from what every other assembler uses. Yeah other assemblers differ between them, but usually on things like local labels or special features, not on the basic things. GNU syntax is its own completely unique beast that disregards everything.
Anyway, now that we all talked extensively about the tangent about what a gas gas's syntax is ...
Recommendations for debugging emulators, toolchains, reference documentation, anything I'm forgetting? All I saw was calima's recommendation for SGDK.
Exodus seems to be the most accurate emulator; how does the usability of its debugger compare to FCEUX/NO$NES/Nintendulator/bsnes-plus/NO$SNS/MESS/gdb/MPLAB ?
Is md.squee.co the best analogue to wiki.nesdev.com and wiki.superfamicom.org ?
Is there just a quickstart guide somewhere on one of the sega fora that someone could point me at? I'm just trying to avoid starting off with blatantly wrong information.
Or should I just read through the source of ProjectMD and do what it does? ;p
lidnariq wrote:
Or should I just read through the source of ProjectMD and do what it does? ;p
I was gonna mention
Dragon's Castle, but it seems that
Project MD's entry point is a lot easier to understand than I remember. You still may want to look at Dragon's Castle for details (in particular, the video registers in its InitVideo subroutine - don't waste time figuring out them all, just use those as-is for some reasonable defaults then figure out later how to reconfigure them when needed).
The official MD docs from Sega are online, use those (google sega2f.htm).
The only emulators I can use are dgen and mednafen, others don't support 64-bit or don't support Linux. Dgen is inaccurate, but it starts up faster, so that's what I use for first testing. Mednafen is more accurate, it displays most DMA problems for example, but still misses some that show up on hw.
Neither has a debugger, AFAIK mednafen's debugger hasn't yet been implemented for MD. That hasn't been much of a concern, since I haven't needed to write m68k asm at all, and finding a compiler bug in recent gcc has lottery-like odds.
It's been a while since I've played with this stuff but I remember Exodus' debugger (and Exodus in general) being kind of janky and glitchy.
MESS has a debugger that works okay.