llvm-mos / llvm-mos-sdk

SDK for developing with the llvm-mos compiler
https://www.llvm-mos.org
Other
267 stars 54 forks source link

Add NES UNROM-512 mapper support, mapper defines to subtargets. #191

Closed asiekierka closed 1 year ago

asiekierka commented 1 year ago

All sub-modes are supported, as is both CHR-ROM and CHR-RAM.

This also fixes "bus conflict" behaviour in the UNROM mapper implementation; well, it doesn't exactly fix it, it papers around it - as per the NESdev wiki, programmers should not rely on the "bitwise AND" behaviour of the bus during a conflict. It also marks the submapper in the NES 2.0 header as a non-bus-conflict one.

I'm not sure how to best fix it properly - given the major ROM usage increase required to do so (256 bytes, fewer if one could vary it by linker script), there's some discussion opportunity to be had here, IMO. Probably best for a new issue.

asiekierka commented 1 year ago

Fixes https://github.com/llvm-mos/llvm-mos-sdk/issues/173