Seize the game – carpe ludum! › Forums › Eidolon’s Tavern › Kega Fusion Inaccurate VRAM Copy Emulation
- This topic has 1 reply, 2 voices, and was last updated 9 years ago by
King.
-
AuthorPosts
-
-
2016/04/06 at 23:40 #629
Random64
ParticipantI found an inaccuracy with Kega Fusion’s Genesis/Mega Drive emulation. On real hardware, during VRAM to VRAM copies, the address’s least significant bit is effectively inverted. Kega Fusion emulates VRAM to VRAM copies without inverting this bit. For copies starting from an even address, with an even length, and the auto increment register set to 1, it makes no difference. For transfers that don’t meet these criteria, it produces incorrect results.
Example: 4 byte copy from 0x2000 to 0x4000 with the auto increment register set to 1
Here, bytes are copied in a different order, but the results are effectively the same.Kega Fusion:
(source -> destination)
0x2000 -> 0x4000
0x2001 -> 0x4001
0x2002 -> 0x4002
0x2003 -> 0x4003Real hardware (least significant bit is inverted):
0x2001 -> 0x4001
0x2000 -> 0x4000
0x2003 -> 0x4003
0x2002 -> 0x4002Example: 4 byte copy from 0x2000 to 0x4000 with the auto increment register set to 2
Here, bytes are copied to incorrect addresses.Kega Fusion:
0x2000 -> 0x4000
0x2001 -> 0x4002
0x2002 -> 0x4004
0x2003 -> 0x4006Real hardware (least significant bit is inverted):
0x2001 -> 0x4001
0x2000 -> 0x4003
0x2003 -> 0x4005
0x2002 -> 0x4007I made a ROM (linked here) to test this. It displays two copies of the same image. The image on the left is transferred to VRAM and displayed as is. The image on the right is transferred to VRAM and then rearranged using 4 separate VRAM copies with the auto increment register set to 4. After rearranging the image, it should look identical to the image on the left.
This screenshot from Gens matches what I saw running this ROM on real hardware.
This screenshot shows the result of not inverting the least significant bit. -
2016/04/28 at 00:15 #632
King
ParticipantKega hasn’t been updated in 6 years now, so this isn’t surprising.
-
-
AuthorPosts
- You must be logged in to reply to this topic.