Jump to content
IGNORED

Could the 2600+ eventually emulate Atarivox and Savekey?


MarcusFrom1982

Recommended Posts

Stella already contains SaveKey emulation, so this is just a question of how Stella is used by the 2600+.

 

The AtariVox cannot be emulated, because it is still copyrighted and the voice data is neither available nor could it be used. 

  • Like 3
Link to comment
Share on other sites

On 1/2/2024 at 2:24 AM, Thomas Jentzsch said:

The AtariVox cannot be emulated, because it is still copyrighted

Emulators don't violate copyright. All other emulators also emulate copyrighted systems...they just don't contain any copyrighted code, and that's why they're legal.

  • Like 1
Link to comment
Share on other sites

3 hours ago, Glorkbot said:

Emulators don't violate copyright. All other emulators also emulate copyrighted systems...they just don't contain any copyrighted code, and that's why they're legal.

We would need the original speech data to be authentic. 

Link to comment
Share on other sites

On 1/2/2024 at 8:24 AM, Thomas Jentzsch said:

Stella already contains SaveKey emulation, so this is just a question of how Stella is used by the 2600+.

 

The AtariVox cannot be emulated, because it is still copyrighted and the voice data is neither available nor could it be used. 

What about supporting real Atarivox on the joystick port? Is that Stella related too, or just the firmware handling the joy ports via mcu?

Link to comment
Share on other sites

39 minutes ago, DEANJIMMY said:

What about supporting real Atarivox on the joystick port? Is that Stella related too, or just the firmware handling the joy ports via mcu?

That would work, if the MCU would support the AtariVox (or SaveKey). Which it does not.

 

However, you can use a AtariVox/SaveKey with Stella, using a 2600-daptor (and the right firmware).

  • Thanks 1
Link to comment
Share on other sites

SaveKey support is "crippled" on the Atari 2600+. Stella on the 2600+ does detect the (emulated) SaveKey and some homebrew games (e.g. Juno First and Tower of Rubble) even show "SaveKey detected" messages. However Stella only writes back data to the (emulated) SaveKey file on termination/exit and it looks like the Atari 2600+ kills Stella forcefully (kill -9 /SIGKILL) when you pull out a cartridge, instead of gracefully (kill -15 /SIGTERM). So that means that highscore data is never written back to the (emulated) SaveKey's non-volatile storage (i.e. file) because Stella is killed forcefully and doesn't get that opportunity.

 

Edited by Dionoid
  • Like 3
  • Thanks 3
Link to comment
Share on other sites

4 hours ago, Dionoid said:

SaveKey support is "crippled" on the Atari 2600+. Stella on the 2600+ does detect the (emulated) SaveKey and some homebrew games (e.g. Juno First and Tower of Rubble) even show "SaveKey detected" messages. However Stella only writes back data to the (emulated) SaveKey file on termination/exit and it looks like the Atari 2600+ kills Stella forcefully (kill -9 /SIGKILL) when you pull out a cartridge, instead of gracefully (kill -15 /SIGTERM). So that means that highscore data is never written back to the (emulated) SaveKey's non-volatile storage (i.e. file) because Stella is killed forcefully and doesn't get that opportunity.

 

Sounds like an easy fix for @Ben from Plaion and team.

 

Link to comment
Share on other sites

Well if that sigterm kill minus 15 is sufficient to work properly to switch carts quickly; which I'm not sure about because there's probably a reason why they wanted to use kill minus 9... this would be a great improvement because games like Juno first really benefits from having a high score that is saved

Link to comment
Share on other sites

On 1/9/2024 at 6:37 AM, Dionoid said:

SaveKey support is "crippled" on the Atari 2600+. Stella on the 2600+ does detect the (emulated) SaveKey and some homebrew games (e.g. Juno First and Tower of Rubble) even show "SaveKey detected" messages. However Stella only writes back data to the (emulated) SaveKey file on termination/exit and it looks like the Atari 2600+ kills Stella forcefully (kill -9 /SIGKILL) when you pull out a cartridge, instead of gracefully (kill -15 /SIGTERM). So that means that highscore data is never written back to the (emulated) SaveKey's non-volatile storage (i.e. file) because Stella is killed forcefully and doesn't get that opportunity.

 

Interesting... when I was testing out Duck Attack it "saw" that the 2600+ had a SaveKey/AtariVox, so it pulled the high score data from the expected address and displayed it, resulting in a glitchy high score screen, since the data that was retrieved was not valid.

 

I thought that maybe there was a bug in the Duck Attack code*, but it sounds like the fact that the game "saw" that a SaveKey was there might be Stella's doing? And it might be possible for the 2600+ to save and load high scores and game states from homebrew games that support that, with some tweaks? That would be really cool. Not to mention that any future titles could use that functionality. Might want to zero out those bytes first, though!

 

(*I suppose there is a bug in the game code in the sense that it expects the SaveKey data it retrieves to be either zeros or a valid BCD-encoded score, and it should probably have checked for that. Fortunately, it doesn't seem to affect gameplay in any way.)

 

IMG_3492_crop_ng.JPEG

Link to comment
Share on other sites

On 1/9/2024 at 12:37 PM, Dionoid said:

SaveKey support is "crippled" on the Atari 2600+. Stella on the 2600+ does detect the (emulated) SaveKey and some homebrew games (e.g. Juno First and Tower of Rubble) even show "SaveKey detected" messages. However Stella only writes back data to the (emulated) SaveKey file on termination/exit and it looks like the Atari 2600+ kills Stella forcefully (kill -9 /SIGKILL) when you pull out a cartridge, instead of gracefully (kill -15 /SIGTERM). So that means that highscore data is never written back to the (emulated) SaveKey's non-volatile storage (i.e. file) because Stella is killed forcefully and doesn't get that opportunity.

I wasn't aware that the Stella on the 2600+ is loaded as a RetroArch/Libretro core, so maybe that version doesn't support saving the SaveKey data to file, or maybe the OS doesn't allow file writing.

Edit: I justed tested with RetroArch running on my laptop, and indeed SaveKey isn't working for the Stella core.

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

15 hours ago, e1will said:

(*I suppose there is a bug in the game code in the sense that it expects the SaveKey data it retrieves to be either zeros or a valid BCD-encoded score, and it should probably have checked for that. Fortunately, it doesn't seem to affect gameplay in any way.)

A clean/new (emulated) SaveKey will normally have all $FF values (see code below), so I can't explain the random values you're reading from the emulated SaveKey. Do you get the same issue when running your rom in RetroArch on your computer?

 

It also looks like the Stella libretro core doesn't support saving SaveKey changes back to file, so I created an issue for this in the Stella github.

 

image.thumb.png.75a47301af4b672d875e397ffc1c667c.png 

Edited by Dionoid
Link to comment
Share on other sites

6 hours ago, Dionoid said:

It also looks like the Stella libretro core doesn't support saving SaveKey changes back to file, so I created an issue for this in the Stella github. 

If the Atari 2600+ continues to be based on Libretro/RetroArch then the necessary work requires someone new to do it. The Stella team has been looking for support here for quite a while, but it never happened. Our resources (and motivation) here are limited.

 

Alternatively, if Plaion were to switch to using Stella directly (like the community firmware for the R77), then many things would become much easier.

  • Like 4
Link to comment
Share on other sites

9 hours ago, Dionoid said:

A clean/new (emulated) SaveKey will normally have all $FF values (see code below), so I can't explain the random values you're reading from the emulated SaveKey. Do you get the same issue when running your rom in RetroArch on your computer? 

 

I haven't tested it out with RetroArch, but it seems to do what it's supposed to under Stella 6.7.

 

Whether Stella gives $FFs and the game code zeros them, or Stella gives $00s, I don't remember, and unfortunately I don't have my source code handy at the moment to check. @Thomas Jentzsch, do you know what values Stella sends the game code when emulating a SaveKey and the game tries to read from it?

 

I do know my game lets the player clear the high score table, and once that's done everything works normally, but of course the cleared values are reset to the random ones once the game session ends since the 2600+ doesn't actually save them.

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