Closed dillof closed 2 years ago
@hernandp Any chance you to want this? :) If no, I would queue it for myself after my ongoing things sorted out a bit.
Sure , I will handle it
On Tue, 24 May 2022 at 16:20 LGB @.***> wrote:
@hernandp https://github.com/hernandp Any chance you to want this? :) If no, I would queue it for myself after my ongoing things sorted out a bit.
— Reply to this email directly, view it on GitHub https://github.com/lgblgblgb/xemu/issues/342#issuecomment-1136393549, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABEFMBMND6A4B2VKZIAEV6LVLU2ZFANCNFSM5WMX4HXA . You are receiving this because you were mentioned.Message ID: @.***>
@dillof Looking at your code, it is possible that for the MEGA65 case you are not touching any of the $DD00 registers?
.if .not .defined(__MEGA65__)
lda CIA2_PRA ; switch VIC bank
and #$fc
ora #((base_address >> 14) ^ 3)
sta CIA2_PRA
.endif
.endmacro
Because I wrote some other test programs and I'm a bit puzzled on how banking scheme is behaving with MEGA65 mode.
That is for the MEGA65 native program, which mostly uses VIC-IV native registers.
The error above is from the C64 program running in C64 mode on the MEGA65, in which case the bank switching is done.
If it helps, I can try to make a simpler demo program over the weekend.
Fixed. Now I understand: bank is fetched always from bits 14 and 15 and this may be set by $D06C-$D06E or $DD00 if Hotregs are enabled. Sounds much better.
PR issued. https://github.com/lgblgblgb/xemu/pull/355
@hernandp Closing this now. If you have objection not to do that yet, please tell ;)
Describe the bug The VIC-II bank is set to $8000 via CIA2_PRA, VIC hot registers disabled, charset, screen position, and sprite pointer set via VIC-IV registers.
On MEGA65, the correct sprites are displayed, on xmega65 the data from bank 0 is displayed instead.
Used version of the project
To Reproduce Start the attached program on the emulator.
anykey-mega65.prg.zip
Sources are at GitHub. (For the build above, I've commented out line 135 of start-vicii.s that copies the sprite data to bank 0 as a workaround for this bug.)
If it helps, I can try to create a smaller example program.
Expected behavior In the lower right corner, a logo should be displayed.
Screenshots
How it looks in the emulator:
How it looks on the MEGA65:
Computer/Device (please complete the following information):
Additional context