Kingcom / armips

An assembler for various ARM and MIPS platforms. Builds available at http://buildbot.orphis.net/armips/
MIT License
363 stars 77 forks source link

SEGA Saturn / Super-H architecture #230

Closed Fothsid closed 2 years ago

Fothsid commented 2 years ago

Mainly adds the SEGA Saturn / Super-H 2 architecture & instruction set support. (.saturn directive) The code was based on the MIPS parser.

Minor changes include:

Fothsid commented 2 years ago

I see the compilation issues with MSVC, will try to patch them up soon.

sp1187 commented 2 years ago

Some additional test cases, preferably at least one of every single opcode would be nice to ensure its encoding is correct (no typo regressions later etc.).

Fothsid commented 2 years ago

Made a test for every SH1/SH2 opcode, turned out there were some bugs, which I fixed. Expected output is binutils' SH assembler's output.

sp1187 commented 2 years ago

Another thing I thought of: Since the Sega 32X uses the same SH2 CPU, do you think it would make sense to add a .32x alias directive that maps to the same action as .saturn?

Fothsid commented 2 years ago

That does sound interesting. I completely forgot that 32x is a thing, haha. I'll probably add it in a bit.

Kingcom commented 2 years ago

Is there any odd memory mapping on the 32X, like on SNES? If there isn't full support for the system or it needs workarounds, it should be mentioned in the Readme. Can you also add the directive to it?