fvdhoef / aquarius-plus

Official Aquarius+ repository
MIT License
45 stars 8 forks source link

Border effects don't work in the Emu #44

Closed MackW closed 1 year ago

MackW commented 1 year ago

RFDV7.rom does some border effects based off the VBL on port $FD The emu doesn't seem to handle these - Aqualite does (Virt Aquarius doesnt)

fvdhoef commented 1 year ago

I don't have access to a real Aquarius and as such I've not been able to measure the exact frame timing. Also the emulator is only emulating line by line.

MackW commented 1 year ago

at a guess, - you are taking the border colour at frame start, and then not updating it through the frame (as virt aquarius does). Aqualite does a cycle count, so that it knows where it is on the border. It's the same stuff as what was done on the speccy, changing border colour mid frame gave a split. image is how it should look

MackW commented 1 year ago

I can do the frame timings for you if it helps ?

fvdhoef commented 1 year ago

The border color/character is read every line rendered in the emulator. On the actual hardware it is read at the start of each border character.

MackW commented 1 year ago

Sean's just posted a vid that the border is behaving the same for both the emu and HW versions.

https://github.com/fvdhoef/aquarius-plus/assets/6732183/f77dcb90-d627-462d-af32-df730b0bb55c

MackW commented 1 year ago

Border should be Black until the top row, then red and red until 1px of the border at the bottom

fvdhoef commented 1 year ago

It probably then has more to do with the behaviour of port $FD. The value in there currently is: 1 for lines < 242, otherwise 0. There are 262 video lines in total. The first 240 are visible.

MackW commented 1 year ago

Ahh, the value on the real hardware is actually 1 between lines 0->25 char lines .. need to check the values, but $FD is still 0 until the first Char display line starts So the VBL on $FD doesn't change until it starts displaying the new Char screen, - So it's not a true VBL as such, just a "I'm doing the top/bottom border' flag

fvdhoef commented 1 year ago

If you can describe me the correct behaviour that would be great! Then I can fix it.

MackW commented 1 year ago

Let me find the stuff I gave Richard for when he did Aqualite.

MackW commented 1 year ago

Lol... possibly a little simplistic, but corrrect (RHS lines should match LHS lol)

image

fvdhoef commented 1 year ago

So the value is already low in the border? Top/bottom border that is. So then it isn't really a vblank, but more of an 'active area' indicator.

MackW commented 1 year ago

Yes, it goes low at the first line of the border at the bottom of the screen, and stays low until first line of the top drawn screen 100% - active area - you got it

fvdhoef commented 1 year ago

Can you give me the RFDV7.rom so I can test with that?

MackW commented 1 year ago

Zip file of the ROM in question for archive RFDV7.zip

fvdhoef commented 1 year ago

Fixed in emulator commit ee99189d5e8cc2a49688887c626fd5c486a40fcb and FPGA commit 36576eb7472c257a5f3b22f93ffcab3909fb0dee

fvdhoef commented 1 year ago

Thanks Mack to help with this!