07 April 2020, 23:39 | #1 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,174
|
what could cause this sprite corruption
I'm trying to fix a game (Oscar).
Using SPS 1228 (ECS, 2 disks) with WinUAE quickstart A500 When using cycle exact (full), all is okay But when not using cycle exact (which is the default), character sprite sometimes is shifted to the bottom with a corrupt first graphics line (white pixels like morse code) Looks like a timing issue. Copperlist has a copper jump for double buffering probably, switched in vertical blank. Could it be because sometimes there's extra processing in vblank before the switch? I don't understand why this is happening: sprite control word is okay (else sprite would be somewhere else), and data aren't changed either (note: this is a composite sprite with 4 sprites, note that the corrupt pattern is doubled, on 2 or 4 sprites composing both halves of the character) The same issue happens in the AGA version, but in the underwater levels, just when a sound is played (so extra CPU used) a trashed pixel line appears and character is shifted down by 1 pixel... |
08 April 2020, 00:57 | #2 | |
CaptainM68K-SPS France
|
Quote:
|
|
08 April 2020, 10:02 | #3 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,174
|
yeah, but it means that on another machine (A1200, A4000 ...) the bug will appear. Games usually don't need cycle exact to run, and when they do, we have to fix them for whdload.
|
08 April 2020, 11:04 | #4 |
Going nowhere
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 8,988
|
The sprite data change is that via CPU or Blitter?
|
08 April 2020, 11:34 | #5 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,510
|
If only sprite has corruption: it isn't going to be copper list double buffer related or lots more than single sprite would get corrupted.
Most likely CPU is doing some direct sprite register copper list or sprite coordinate or sprite data modifications too late or too early. |
08 April 2020, 16:18 | #6 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,174
|
I could fix it by removing the COPJMP just after switching the copperlist in vblank
Code:
00C0C454 23f9 00c2 ff0e 00df f080 MOVE.L $00c2ff0e [0007664c],$00dff080 00C0C45E 4279 00df f088 CLR.W $00dff088 Doing this fixes the sprite issue, but all the rest (bobs) are flickering. Seems that it breaks double buffering... Last edited by jotd; 08 April 2020 at 16:26. |
08 April 2020, 16:38 | #7 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,510
|
Perhaps above code runs after line that does first sprite DMA fetches (25 in PAL) and if CPU is faster, it runs early and updates sprite pointers too early.
It would be quite strange way to handle sprites, loads sprite control words from previous copper list but sprite data from pointers loaded by new copper list |
08 April 2020, 17:05 | #8 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,174
|
I'm not going to worry about that now. I investigated this after I had a similar problem while doing the whdload patch, only when sound was played.
It appears that we delay sound play using vpos wait, and not doing this trashes the sound but fixes the sprite issue! |
08 April 2020, 17:09 | #9 |
Registered User
Join Date: Nov 2014
Location: Italy
Posts: 2,353
|
|
08 April 2020, 18:15 | #10 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,174
|
got 4.3.1 beta here.
|
08 April 2020, 18:32 | #11 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,510
|
I wouldn't trust that version too much yet..
Also changelog explains another (more likely) reason that almost guarantees different timing in non-ce 68000 modes compared to old versions. In non-ce mode 68000 cycle counting was mostly approximate. Now it is fully accurate. (It means: if program runs in fast ram and it never accesses chip ram, both ce mode and non-ce 68000 will have 100% exact same timing.) |
08 April 2020, 19:15 | #12 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,174
|
Don't worry Toni. I fixed the sprite glitch that occurred on very fast configurations (and is probably related to that one).
To fix CPU-dependent loop on audio DMACON writes; we had inserted VPOS loops. I think we overdid it too much and when the "bubble" sample was played, it slowed down the main loop too much and it desynced the sprite refresh. Why did that happen on fast configs I don't know. Probably because in that case, vblank runs faster than expected. Reducing the VPOS loops (still checking that audio was playing okay with winuae using chip hack to trash audio on purpose) just a little bit fixes the sprite issue... |
09 April 2020, 11:52 | #13 |
Registered User
Join Date: Dec 2018
Location: Earth
Posts: 1,058
|
HA, you make a WHDLoad Installer for Oscar ECS ?
Sweeeeet I was waiting for this, hehe Yes the game is, well say, not the best ..... but still Thank you JODT and all WHDLoad installer creators |
09 April 2020, 12:50 | #14 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,174
|
yes, Oscar ECS is completed now Waiting for Wepl to update whdload page.
This is really a colorful platformer with 7 levels & bonuses, water/mirror effects, etc.... This is huge. I think the gameplay is too boring which explains people don't like it too much. I added trainer features like: - instant kill of enemies (instead of 3 times, suggested by Hexae, nice idea) - find the clapperboard => end of level (this is too much of a cheat) - second button jump I couldn't cancel the annoying respawn easily though. |
10 April 2020, 13:06 | #15 |
Registered User
Join Date: Dec 2018
Location: Earth
Posts: 1,058
|
AWESOME, this makes Oscar "almost" playable. The 3 hit kills of the Original where always ridiculous. , so youre improvements really helps this game
Sure, Jumping and runnings feels as bad as always but that is not youre fault. To be fair to Flair , its technically well made, so i am really happy to see Oscar on my A600 The Second Button option dosent work for me (Mega-Drive Pad) . Huge Thanks to Jotd for the Installer |
10 April 2020, 14:00 | #16 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,174
|
> The Second Button option dosent work for me (Mega-Drive Pad):
damn. I have to dig out my old joysticks & test. Pad has more than 2 buttons. Are you sure one of the buttons doesn't match the amiga second button? because 2 button joysticks are also designed for sega. |
10 April 2020, 18:51 | #17 |
Registered User
Join Date: Dec 2018
Location: Earth
Posts: 1,058
|
The C Button on the Mega Drive Joypad works normally just like the 2nd button, but it dosent work with the Oscar Ecs slave.
|
10 April 2020, 19:16 | #18 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,174
|
I happen to have a sega quickjoy with lots of buttons. Going to test that.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
FastATA Corruption | stevelord | support.Hardware | 10 | 09 April 2020 18:34 |
Corruption - The Original | Nightfox | Games images which need to be WHDified | 11 | 16 May 2017 20:34 |
Sprite corruption with OCS Agnus, ECS Denise, Kickstart 3.1 | mark_k | support.WinUAE | 18 | 08 January 2015 15:27 |
Graphical Corruption | chocolate_boy | support.Hardware | 3 | 27 July 2011 13:39 |
Graphics corruption | Minuous | support.WinUAE | 9 | 21 July 2005 17:42 |
|
|