Jump to content
IGNORED

Missing I/O initialization


alex_79

Recommended Posts

You need to  initialize SWCHA, SWACNT, SWCHB and SWBCNT to 0 in the PlusCart menu.


Those registers are automatically zeroed by the reset sequence of the 6532, so usually initialization isn't needed unless you need a different behaviour (e.g. for keyboard controllers, atarivox and other peripherals).


But when using the "emulation exit" function instead of power cycling the console, the 6532 reset sequence doesn't take place, so there could be issues with the controllers and/or console switches if the rom that was running before set the RIOT ports to output.

 

Edited by alex_79
  • Like 2
Link to comment
Share on other sites

Stella manual says SWCHB is read only, and the only mention of SWBCNT is to give its address and say it is hardwired to input. So, seems to me we don't worry about SWCHB/SWBCNT at all, and we only need to write 0 to SWACNT, to set to input.

 

Edited by Andrew Davie
Link to comment
Share on other sites

29 minutes ago, Al_Nafuur said:

so setting SWACNT and SWBCNT back to input (initial RIOT status) at "FirstStart" should be enough.

 

I think it would be better to also set SWCHA and SWCHB to 0, because, as i wrote in the other thread, those registers will keep the last value stored to them and use it when set to output.

It's unlikely that this would cause issues, but in theory a game might (rightfully) rely on the fact that they're zero.

  • Like 1
Link to comment
Share on other sites

I know the labels "amateur" and "pro" are from the programmer's guide, but the A/B difficulty was frequently also labelled as Expert/Novice (e.g. on my Vader console) and Advanced/Beginner too. IMO the latter is easier to remember.

 

BTW: Why did you draw and list the bits in reverse order?

Edited by Thomas Jentzsch
  • Like 1
Link to comment
Share on other sites

27 minutes ago, Thomas Jentzsch said:

I know the labels "amateur" and "pro" are from the programmer's guide, but the A/B difficulty was frequently also labelled as Expert/Novice (e.g. on my Vader console) and Advanced/Beginner too. IMO the latter is easier to remember.

 

BTW: Why did you draw and list the bits in reverse order?

English readers scan the byte itself left to right (D7-D0) and so this is the natural order (for me, anyway) to list their function in a table.

Link to comment
Share on other sites

28 minutes ago, Thomas Jentzsch said:

I know the labels "amateur" and "pro" are from the programmer's guide, but the A/B difficulty was frequently also labelled as Expert/Novice (e.g. on my Vader console) and Advanced/Beginner too. IMO the latter is easier to remember.

Well that's ambiguous. Which is 0... are you saying it should be "amateur/expert/advanced"?  It needs to be consistent.

Or did you mean "Novice/Expert" and "Beginner/Advanced"?

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...