Re: [hatari-devel] DIP switch support |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
On 16 May 2016 at 10:17, Thomas Huth wrote:
>
> FYI, I've now pushed a patch that should now return the right default
> value (0x02) when reading the $ff9201 register.
>
That's the wrong value unfortunately. I should have been more specific since I
know you don't have a TT for testing. This is what I get on my TT:
DIP switch settings:
1-6 off, 7 on, 8 off
(this is standard for a TT with HD floppy, according to the TT schematics)
Reading the word at ffff9200: 0xbf06
Reading the byte at ffff9200: varies
Reading the byte at ffff9201: 0x06
Reading the word at 00ff9200: 0xbfff
Reading the byte at 00ff9200: 0xff
Reading the byte at 00ff9201: 0xff
Since the MMU maps 0xff?????? to 0x00??????, the values that differ are
presumably pseudo-random floating values on the bus. And since the _SWI cookie
generated by TOS3 has a value of 0x000000bf, I conclude:
1. DIP switches 1-8 correspond to bits 0-7 in the appropriate hardware register
2. Setting a switch on sets the corresponding bit off
3. The DIP switches are mapped into the even byte of the word at
0xffff9200/0x00ff9200
Roger