-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Hi
I've been working on porting a diag over to ninja gaiden hardware and want to report a few inconsistencies between hardware and mame.
I was originally working on a tile viewer for txt/bg/fg tiles and using mame to get stuff lined up in a table view
ie:
however when running this same code on hardware both bg/fg tiles are offset down quite a bit
txt layer seems ok
I wrote a couple tests to allow writing values to the scroll registers to see what happens
mame:
https://github.com/user-attachments/assets/cb4e590e-321f-4795-a380-c20a21f23e27
hardware:
https://github.com/user-attachments/assets/8ea8d2b6-0d90-4961-bed7-c0dea5a9a1b4
In both videos I zero out both of the bg y scroll/offset registers, then test setting bit 0 on both registers. Aside from the obvious difference in the bg tile location, there is a difference in what setting the bits does.
On hardware setting either of the bits causes the bg tile to move up 1 pixel.
In mame setting the bit in the offset y register cause the bg tile to go down 1 pixel, and setting it on the scroll y register the bg tile to go up 1 pixel.
Additional info from testing on hardware:
- both y scroll/offset registers appear to be masked with 0x1ff
- the x scroll register appears to be masked with 0x3ff
- the word at 0x7a300 acting like a x offset shifting the tile to the left by the value (also masked at 0x3ff)
I'm still messing around figuring out what 0x7a310 is, but it looks like the lower 3 bits are related to the tile size that gets used on the tile layer
0x3 = 8x8
0x4 = 16x16
0x6 = 16x32 (tall, same 16x16 tile doubled up)
here is a copy of the test rom


