Re: [hatari-devel] SCC register handling on TT |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
Hi,
On 11/27/2016 10:04 PM, Thomas Huth wrote:
Am Sun, 27 Nov 2016 19:51:13 +0200
schrieb Eero Tamminen <oak@xxxxxxxxxxxxxx>:
When looking at SCC register handling in relation to:
http://www.atari-forum.com/viewtopic.php?f=51&t=29989&p=306208#p306208
Hatari isn't yet emulating SCC, but I started to wonder
about Hatari's handling of non-implemented SCC registers...
From what I see from ioMem*.c sources on SCC regs access:
* ST & STE bus error
-> corresponds to bus error tester results
* Deliberately voided for Falcon STE compat mode (ioMem.c)
-> corresponds to bus error tester results
* Deliberately voided for normal Falcon mode (ioMemTabFalcon.c)
-> corresponds to bus error tester results
* Bus error for TT
-> does NOT correspond to bus error tester results
$FF8C20 - $FF8C80
$FF8C90 - $FF8E01
Is above interpretation right?
I think so, yes.
Thomas, does above bus error test mean that $FF8C80
generates bus error or not (i.e. is the output range
inclusive or exclusive or range end)?
IIRC the right hand side of the entries in the bus error tester output
do _not_ generate a bus error anymore. So $FF8C80 should not generate a
bus error.
The TT IO memory region has never been fixed for proper bus error
accuracy, mainly since quite a bit of emulation is still missing.
For example, only disabling the bus errors in the SCC IO memory region
without providing real emulation is a kind of double-edged sword - some
programs might suddenly run, but others that use bus errors for
detecting the presence of the SCC might stop working, because they
suddenly think that the SCC is there and depend on the right behavior
of the registers which is not emulated yet.
I noticed from freemint sources that its HW detection does use
bus errors for this.
In the above linked thread, the bus error loop happens according
to OL before _main, so it seems like some library initialization
code is not doing things correctly.
In any case, I think TT & Falcon emulation should work the same
way in this matter. Both machines are supposed to have SCC, but
Hatari doesn't emulate it for neither, so both should either
ignore accesses or bus error on them.
-> Should I change TT or Falcon emulation?
So the really right way to fix this: Implement proper SCC emulation!
(and to get this right, you also might need to implement proper
emulation of the second MFP of the TT). ... can of worms ... ;-)
Thanks for the offer, but I I'll pass for now. :-)
(I don't have docs on how it should work, suitable test-cases
for testing that the implementation is correct, and something
interesting that would start working after it's implemented.
Time's issue too.)
- Eero