Half pixel copper delay on A1200 hardware
I have some code that uses the copper to set color00 every line, synchronized with the DIWSTRT/STOP (to get an extra color out of OCS amigas).
It works perfectly in WinUAE with OCS and AGA chipsets and also a real A500 (everything lines up perfectly), but on a real A1200 the color change is delayed by half a lores pixel. I thought for the longest time there was something wrong with my code and (accidentally setting some AGA specific bits related to sub-pixel control, perhaps on my sprites or bitplanes) but I checked all of it and it seems correct. I finally thought to test another game that I know uses this per-line color00 change (Shadow of the Beast first level) and it also has this half pixel offset on my real A1200, but not in WinUAE (OCS or AGA) and not on my real A500. Does anyone know: - Is it possible this is still a code bug, that just happens to be the same in my code and Beast? - Is there a known HW quirk that perhaps WinUAE does not emulate? (PS - checked in WinUAE 3.5.0 and 4.0.0) |
Attach simple example binary (that run when booted without startup-sequence), thanks.
|
Finally a reference!
From old memories I seemed that I too had similar problems that drove me mad. But they are old memories from 25 years ago, I just thought I was wrong. I looked for a reference for a while but finding nothing so I had left off. Also Lionheart use this technique and there's a code snippet that search for A1200 Lisa and change DIWSTOP.. http://eab.abime.net/showpost.php?p=...5&postcount=29 (leave out the other glitches that are in fact bugs) I'm curious to know if this is real :) |
Quote:
(if it exists, as usual I can not confirm as I do not have a real machine). |
Quote:
|
Quote:
|
2 Attachment(s)
Quote:
Copper stripes is COLOR00, synced with DIWSTRT/STOP. Red circle to better view if there is an half pixel mismatch. http://eab.abime.net/attachment.php?...1&d=1531584718 |
7 Attachment(s)
I've uploaded a sample that reproduces the issue:
- a bootblock.s - a bootable ADF image with that bootblock I've also attached some images: - Screenshot of WinUAE A1200 where everything lines up - Screenshots of real A1200 running the test showing misalignment - Screenshots of real A1200 running Shadow of the Beast showing misalignment I hope we can get to the bottom of this! (PS Sorry for the poor photos - I had a lot of trouble getting it to focus!) Code:
;# BootBlock |
1 Attachment(s)
Quote:
I've uploaded an updated executable that shift plane2 with right mouse button press. Can you test to see if the effect is visible? EDIT: you need a PAL video mode |
Quote:
EDIT: include all AGA bplcon1 shift bits (shres resolution) in right mouse button press. Quote:
|
Quote:
Ok, I leave only some upper lines active ;) (wait few minutes) |
Ok, attached a very stripped version
(works also on NTSC) :great EDIT: ops, lost the EDIT from message #10 regarding shres shift, please wait an update... |
Quote:
|
1 Attachment(s)
Uploaded HalfPixelTest.exe.
|
1 Attachment(s)
Uploaded source for HalfPixelTest.exe I uploaded (it's the same as the bootblock.s, but with 2 changes):
- Set the FMODE to 0 in the copper list - Remove the DOS header required for boot blocks |
1 Attachment(s)
For some reason that I do not understand now (too much wine?), quarter pixels scroll isn't working on WinUAE,
even if "superhires" on Host/Display/Resolution selected and AGA bits used :rolleyes (so we need four right click for a visible shift..) pf1 priority below pf2 and a fixed pattern for bitmap used. EDIT: changed name because stoopid Windows10 Defender antivirus and cleaned some code |
1 Attachment(s)
I've uploaded a new HalfPixelTest.exe. This simplifies the repro (exe is now 252 bytes :)) and also eliminates some on-screen garbage when running from the WB or CLI.
@Toni. Let me know if this is helpful, or if changes would make it more useful. |
Quote:
|
1 Attachment(s)
Quote:
[this pf1!=pf2 AGA shift bits support could be a new feature for a later version of WinUAE, with option] With my LUT approach was super simple to duplicate shift bits, so attached a version that work also on WinUAE. Could other changes to the code be useful? |
Does hires resolution also have exact same extra delay? (EDIT: I'll try to do some real hardware tests later today)
-- I probably explained it in some other thread but here is quick explanation: This requires large rewrite, currently single Amiga lores/hires/shres pixel is single bit in whole display emulation path. Until finally output pixel color is decided (background, sprite or bitplane pixel) where single pixel becomes 1, 2 or 4 native horizontal pixels using optimized generated code. (every doubling mode has separate routine) Everything is optimized for this behavior. Sprites already support it because they are relatively simple and can't have weird side-effects. (like writing to BPLCON1 mid-scanline does) |
All times are GMT +2. The time now is 22:44. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.