Jump to content
IGNORED

Question on detecting HSC or SaveKey in Basic


Recommended Posts

So my experimentation has taken me to saving game variables rather than highscores.

 

I'm trying to detect whether a device is connected and which device it is.

 

I'm following the 7800Basic documentation on RT's site guide to set hssupport on and select a memory address and set the difficulty. I'm not loading the font as I have no need to display any hiscores, instead I want to load and save settings.

 

 set hssupport $1977
 gamedifficulty = 0

I then tried some code to detect a device and report back as I'd like to check and if no device is present, then don't offer the option to save.

 

I would expect this code with a high score cart present to return hsdevice = 1, but instead instead it returns 0 indicating no device is detected.

 if hsdevice = 0 then plotchars 'no device detected' 0 0 3
 if hsdevice = 1 then plotchars 'high score cart detected' 0 0 3
 if hsdevice = 2 then plotchars 'atarivox or savekey detected' 0 0 3

 

 

I'm running AtariDev Studio with A7800 with the HSC option enabled

 

image.png.e2825ee4211c5ff593e5168c80102efc.png

 

I have checked when the emulator is running and it also states HSC is present.

 

image.png.5042fc07bd9b84d53325f09b37c3acdd.png

 

Am I doing something wrong in my code or setup, or how the emulator is configured perhaps? 

 

Cheers,

 

 

 

 

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

Try running one of the games with HSC support, initialize the emulated HSC, and try your test again. 7800basic doesn't know how to initialize a new HSC, which is probably what you have, in emulation.

 

In practise, people will have initialized HSCs, or can initialize them with XM bios or some other game. It just wasn't worth a bunch of extra rom to handle this special case.

  • Like 3
Link to comment
Share on other sites

9 hours ago, RevEng said:

Try running one of the games with HSC support, initialize the emulated HSC, and try your test again. 7800basic doesn't know how to initialize a new HSC, which is probably what you have, in emulation.

 

In practise, people will have initialized HSCs, or can initialize them with XM bios or some other game. It just wasn't worth a bunch of extra rom to handle this special case.

Thanks @RevEng.

 

That did the trick, appreciate the help as always :)

 

  • Like 1
Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

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...
  • Recently Browsing   0 members

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