EvoMikeUK #1 Posted February 20 (edited) Hi All, I need to integrate the SaveKey into my game currently into development, does anyone have any good intro tutorials on SaveKey integration into bB games? Thank you, Michael Edited February 20 by EvoMikeUK Quote Share this post Link to post Share on other sites
EvoMikeUK #2 Posted February 20 I have found this: https://atariage.com/forums/topic/176797-bb-atarivox-support-part-1-the-atarivox-eeprom/ Quote Share this post Link to post Share on other sites
EvoMikeUK #3 Posted February 20 Does anyone know why I get this error when including the driver asm? bbavox-eeprom-file.asm (381): error: Unknown Mnemonic 'I2C_SUBS' Quote Share this post Link to post Share on other sites
EvoMikeUK #4 Posted February 20 Figured it out, needed to include the other inc file too in the directory. Quote Share this post Link to post Share on other sites
EvoMikeUK #5 Posted Sunday at 10:01 AM Even using this example.... The console doesnt display the saved data (yet doesnt throw the error either of a red background), yet stella does? rem ** the bB score as regular variables... dim sc1=score dim sc2=score+1 dim sc3=score+2 rem ** randomize the first score byte... sc1=5 rem ** write the first score byte to AtariVox location $3001 rem ** if the write is successful, temp1=0, else temp1=$ff rem ** rem ** We don't care about the return value, but we need to use rem ** "temp2=" to keep bB's syntax checker happy. rem ** temp2=AVoxWriteByte($30,$01,sc1) rem ** check if the write worked. If not, we won't support AtariVox... rem ** if temp1<>0 then COLUBK=$44:goto main rem ** Stick a drawscreen between your AtariVox reads/writes. Otherwise rem ** you'll use too many cycles... rem ** drawscreen rem ** read from AtariVox location $3001, and store the result in the sc3 var. rem ** if the read is successful, temp1=0, else temp1=$ff rem ** sc3=AVoxReadByte($30,$01) COLUBK=$0 drawscreen rem ** loop forever... main scorecolor=$0f drawscreen goto main rem ** include the AtariVox wrapper and driver code... asm include "bbavox-eeprom-static.asm" end Quote Share this post Link to post Share on other sites
+Karl G #6 Posted Sunday at 02:27 PM This example might be a little confusing because it does not attempt to load data saved between sessions, but saves from one score byte, and reads to another in the same session. Of you see the same number repeated in the score, then it worked. After running it once, if you want to see if the previously-saved byte was successfully retrieved, you can modify the code to take out the randomization and the first write to see the same number when you run it every session after that, e.g.: rem ** the bB score as regular variables... dim sc1=score dim sc2=score+1 dim sc3=score+2 rem ** randomize the first score byte... sc1=5 rem ** write the first score byte to AtariVox location $3001 rem ** if the write is successful, temp1=0, else temp1=$ff rem ** rem ** We don't care about the return value, but we need to use rem ** "temp2=" to keep bB's syntax checker happy. rem ** ; temp2=AVoxWriteByte($30,$01,sc1) rem ** check if the write worked. If not, we won't support AtariVox... rem ** if temp1<>0 then COLUBK=$44:goto main rem ** Stick a drawscreen between your AtariVox reads/writes. Otherwise rem ** you'll use too many cycles... rem ** drawscreen rem ** read from AtariVox location $3001, and store the result in the sc3 var. rem ** if the read is successful, temp1=0, else temp1=$ff rem ** sc3=AVoxReadByte($30,$01) COLUBK=$0 drawscreen rem ** loop forever... main scorecolor=$0f drawscreen goto main rem ** include the AtariVox wrapper and driver code... asm include "bbavox-eeprom-static.asm" end Quote Share this post Link to post Share on other sites
EvoMikeUK #7 Posted Monday at 10:53 PM Working perfect now! Thank you! Ok, it was dry joints on the controller port! Sorry to bother you all, feel a bit embarrassed now lol Quote Share this post Link to post Share on other sites