English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 29 March 2020, 15:27   #1
jotd
This cat is no more
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 48
Posts: 4,069
byte write to custom registers / Bubble bobble "black screen"

here's some code I found while fixing bubble bobble black screen when taking a bomb (Dave Broadhurst strikes again...):

Code:
    MOVE.B    #$34,DIWSTRT        ;7288: 13fc003400dff08e
    MOVE.B    #$fc,DIWSTOP        ;7290: 13fc00fc00dff090
What happens is very vicious:

- the LSB of both registers are changed (to 00 on winuae)
- but if we put a write breakpoint on the value we don't break

I understand that since those registers are write-only, and we're only writing MSB, some CPU limitation makes the CPU first read the 16 bits, change the MSB, then write the 16 bits, trashing LSB in the process.

But was that true on a plain 68000? probably not, or the bomb effect wouldn't have worked properly.
jotd is offline  
Old 29 March 2020, 15:35   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 45
Posts: 23,805
At least 68000, when writing bytes, duplicates it to both upper and lower byte of data bus.

Chipset sees $3434 or $fcfc word write because chipset assumes word accesses only, it does not check or care if access was actually byte or a word.

I don't remember if 68020+ does the same but AGA hardware also have (totally undocumented) Budgie chip between CPU and chipset data bus. It probably also does some data conversions.
Toni Wilen is online now  
Old 29 March 2020, 15:53   #3
jotd
This cat is no more
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 48
Posts: 4,069
ok, so that explains that the bug isn't noticeable too much on 68000. But on winuae, 0 is set in lower byte (and possibly on 68020) and trashes the value to 0 which kills the display.
jotd is offline  
Old 29 March 2020, 16:11   #4
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 45
Posts: 23,805
Perhaps you have "custom byte write bug" advanced chipset option enabled? This emulates Blizzard 68060 (possibly others) byte write "bug" that commonly affects AUDxVOL byte writes.

I checked UAE sources and it seems this is already implemented:

If AGA (or maybe any 68020+ hardware?)
- if odd address: 00xx is written to even address
- if even address: xxxx is written. (duplicated)

If "custom byte write bug":
- if odd address: 00xx is written to even address.
- if even address: xx00 is written.
Toni Wilen is online now  
Old 29 March 2020, 16:50   #5
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 399
At least my Blizzard 2060 does not seem to be affected, but the GVP 040 has a similar bug. Similar problems can be observed when writing to the zorro bus as the 040 by itself does not implement dynamic bus-sizing as the 68020 and 68030 do. This caused a really hard to find freak-error in the driver of Matze's graphics card we found in a rather long night-session. (-;
Thomas Richter is offline  
Old 29 March 2020, 16:50   #6
jotd
This cat is no more
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 48
Posts: 4,069
absolutely. This option is set. Which explains why the game fails on faster amigas too.

My aim is opposite than other people: make WinUAE as close as possible as the amiga to replicate subtle bugs, in order to be able to correct them in whdload slaves. WinUAE allows that 99% of the time so a big thanks for that.

Other people prefer eliminating the audio/gfx bugs to have better games in emulation. I can fully understand that as well.
jotd is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
log write to custom registers with out of bounds addresses jotd support.WinUAE 12 03 February 2019 13:43
Super Bubble Remix v1.3 - "HD install" --> "ADFs" DamienD request.Old Rare Games 10 14 April 2016 18:33
"Amiga Byte": Italian magazine + floppy Supamax request.Other 60 19 January 2015 00:07
[FOUND: PHANTASIE III!] 2D RPG game with map screen, "black background combat screen" Artifex 28 Looking for a game name ? 1 22 May 2014 17:42
RTG "full-screen" vs. "full windowed" - advantages/disadvantages? ral-clan support.WinUAE 2 19 April 2011 01:15

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 19:22.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Page generated in 0.09153 seconds with 14 queries