-
Notifications
You must be signed in to change notification settings - Fork 0
Description
From observations in testing this rom on the genuine HP48SX superchip interpreter, as well as through the source code of Fisn'N'Chips, the de-facto emulator of its era made by Hap himself, this test rom fails to return a thumbs-up in both scenarios.
It would appear that in both situations, the DXYN only tests collision for the top half of a pixel, as it duplicates the draw to the bottom half of the pixel after the fact. The test instead checks for a collision on the same initial position, but that same top half is now blank due to the half-pixel scroll, and thus the collision flag is never set.
One idea suggested by Gulrak is to perform two half-pixel scrolls. This, when correct, will move the lowres pixel a full position below if correct, otherwise it'd be two full positions if it doesn't work correctly. Then you can check the initial position (in case no scroll took place) and the position below the expected result. If either one triggered the collision flag, the test fails! :)
In fact, I decided to improve the test as described, and it now it behaves like it should in both cases.
The program at the moment:
0x6C 0x00 0x6D 0x00 0x6E 0x00 0xA2 0x62 0x61 0x00 0x62 0x02 0xD1 0x11 0x00 0xC2
0xD1 0x11 0x8E 0xF4 0xD1 0x21 0x8E 0xF4 0x62 0x1F 0xD2 0x11 0x00 0xFC 0xD2 0x11
0x8D 0xF4 0x72 0xFC 0xD2 0x11 0x8D 0xF4 0x61 0x1F 0xD2 0x11 0x00 0xFB 0xD2 0x11
0x8C 0xF4 0x72 0x04 0xD2 0x11 0x8C 0xF4 0x00 0xE0 0x61 0x02 0x62 0x02 0x3E 0x00
0x12 0x56 0x3D 0x00 0x12 0x56 0x3C 0x00 0x12 0x56 0xA2 0x63 0xD1 0x25 0x71 0x08
0xA2 0x68 0xD1 0x25 0x12 0x54 0xA2 0x6D 0xD1 0x25 0x71 0x08 0xA2 0x72 0xD1 0x25
0x12 0x60 0x80 0xE6 0xA9 0xEF 0x89 0x89 0x77 0x44 0x77 0x11 0x77 0xE6 0x89 0xEF
0x89 0x89 0x74 0x24 0x24 0x24 0x77
