Jump to content
Sign in to follow this  
PacManPlus

Reading the difficulty switches on the 7800?

Recommended Posts

Hi!

 

I hope someone can help me - can anyone tell me how to read the difficulty switches on the 7800 in 7800 mode? (Example code would be great!) I'm working on something where I need to read both switches. Thanks in advance!

 

Bob

Share this post


Link to post
Share on other sites

Thanks Bruce :)

 

For some reason I thought it was different...

 

I think I have a commented Adventure disassembly I can look through to see how they read them.

 

Thanks again

Share this post


Link to post
Share on other sites
Hi!

 

I hope someone can help me - can anyone tell me how to read the difficulty switches on the 7800 in 7800 mode?  (Example code would be great!)  I'm working on something where I need to read both switches.  Thanks in advance!

 

Bob

853217[/snapback]

 

How about something like this? :-)

 

BIT Swchb

BVS p0expert

BVC p0amateur

BCS p1expert

BCC p1amateur

Share this post


Link to post
Share on other sites
Hi!

 

I hope someone can help me - can anyone tell me how to read the difficulty switches on the 7800 in 7800 mode?  (Example code would be great!)  I'm working on something where I need to read both switches.  Thanks in advance!

 

Bob

853217[/snapback]

 

How about something like this? :-)

 

BIT Swchb

BVS p0expert

BVC p0amateur

BCS p1expert

BCC p1amateur

853952[/snapback]

 

:!:

The 'bit' instruction puts bit 7 into the sign flag, not the carry flag!

And also, in that code the last two lines will never be reached.

Try this instead:

   bit SWCHB
  bmi P1Expert
 ;--else P1 novice
  bvs P0ExpertAndP1Novice
 ;--else P0 novice and P1 novice
 ;--code here
  jmp Done
P0ExpertAndP1Novice
 ;--code here
  jmp Done
P1Expert
  bvs P0ExpertAndP1Expert
 ;--else P0 novice and P1 expert
 ;--code here
  jmp Done
P0ExpertAndP1Expert
 ;--code here

Done

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...