Jump to content
alex_79

Missing I/O initialization

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

I'm starting to suspect this is a '7800 issue/requirement.

If so/and in any case, one should write 0 to SWACNT and to SWBCNT and I still don't see why SWCHA/SWCHB are important.

 

Share this post


Link to post
Share on other sites
56 minutes ago, Andrew Davie said:

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...

That's not correct

 

 

  • Like 2

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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"?

Share this post


Link to post
Share on other sites

Vice-versa, A = Expert or Advanced and B = Novice or Beginner. The reverse order frequently confuses people, that's why Advanced/Beginner is a good memory hook.

Share this post


Link to post
Share on other sites
3 hours ago, Thomas Jentzsch said:

Vice-versa, A = Expert or Advanced and B = Novice or Beginner. The reverse order frequently confuses people, that's why Advanced/Beginner is a good memory hook.

OK, TY

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...