Jump to content

Photo

Reset the Game?


11 replies to this topic

#1 First Spear OFFLINE  

First Spear

    Stargunner

  • 1,110 posts

Posted Sun Nov 12, 2017 10:18 PM

What is the correct POKE (or set of POKEs) to make a game jump back to the main program's initialization/entry point? The equivalent of pushing the reset button on the console hardware?

 

I am using IntyBASIC of course, but if there are clues/ideas from Assembly gurus, I am open.

 

 

Thanks.


Edited by First Spear, Mon Nov 13, 2017 2:42 PM.


#2 intvnut OFFLINE  

intvnut

    River Patroller

  • 2,818 posts
  • Location:@R6 (top of stack)

Posted Sun Nov 12, 2017 10:51 PM

Not really a poke, but an assembly one liner will do something similar to hitting reset.

 

.

ASM B $1000


#3 DZ-Jay OFFLINE  

DZ-Jay

    Quadrunner

  • 9,940 posts
  • Triple-Stripe Mo' Bro
  • Location:NC, USA

Posted Mon Nov 13, 2017 4:14 AM

Wouldn't it be better to just call your initialization routine?

Is there really a need to have the EXEC reinitialize the system, load it's state, and then hijack it again?

#4 Tarzilla OFFLINE  

Tarzilla

    Stargunner

  • 1,905 posts
  • Huh?
  • Location:Alberta, Canada

Posted Tue Nov 14, 2017 12:43 PM

Wouldn't it be better to just call your initialization routine?

Is there really a need to have the EXEC reinitialize the system, load it's state, and then hijack it again?

I agree, design your game structure and flow properly and you should never have to "reset" your game as a feature (or use a GOTO ;) ).



#5 intvnut OFFLINE  

intvnut

    River Patroller

  • 2,818 posts
  • Location:@R6 (top of stack)

Posted Tue Nov 14, 2017 9:44 PM

I also agree it's better to flow cleanly back to the title screen.

 

"Resetting" is useful if you're building a launcher to integrate multiple games that don't really know about each other.  There isn't necessarily a clean way to hand off, so instead you just set up everything so that EXEC takes you to the other game, and GERRRRONIMOOOOOO!



#6 First Spear OFFLINE  

First Spear

    Stargunner

  • Topic Starter
  • 1,110 posts

Posted Sat Nov 18, 2017 9:12 PM

A little something I am playing with. I have an LTO Flash! and an Intellivision II that is modified with a quicker reset than usual. I want to see what my "game" will do when I play with reset via software. 

 

OK, now back to work...

 

And thanks!
 

 

I also agree it's better to flow cleanly back to the title screen.

 

"Resetting" is useful if you're building a launcher to integrate multiple games that don't really know about each other.  There isn't necessarily a clean way to hand off, so instead you just set up everything so that EXEC takes you to the other game, and GERRRRONIMOOOOOO!


Edited by First Spear, Sat Nov 18, 2017 9:13 PM.


#7 DZ-Jay OFFLINE  

DZ-Jay

    Quadrunner

  • 9,940 posts
  • Triple-Stripe Mo' Bro
  • Location:NC, USA

Posted Sun Nov 19, 2017 9:58 AM

A little something I am playing with. I have an LTO Flash! and an Intellivision II that is modified with a quicker reset than usual. I want to see what my "game" will do when I play with reset via software. 

 

OK, now back to work...

 

And thanks!
 

 

 

Ah, so you want to simulate pressing the RESET button in your game?  There is no function for it, it's a hardware feature.  You can simulate it using F+11 in the emulator.

 

   -dZ.



#8 intvnut OFFLINE  

intvnut

    River Patroller

  • 2,818 posts
  • Location:@R6 (top of stack)

Posted Mon Nov 20, 2017 2:13 AM

Ah, so you want to simulate pressing the RESET button in your game?  There is no function for it, it's a hardware feature.  You can simulate it using F+11 in the emulator.

 

Of course, that won't work on....

 

an LTO Flash! and an Intellivision II that is modified with a quicker reset than usual.

 

 

;-)



#9 DZ-Jay OFFLINE  

DZ-Jay

    Quadrunner

  • 9,940 posts
  • Triple-Stripe Mo' Bro
  • Location:NC, USA

Posted Tue Nov 21, 2017 4:03 AM

 

Of course, that won't work on....

 

 

 

;-)

 

But... on an LTO Flash! they won't need to simulate it -- they can just hit the Refresh button on the console.  What am I missing?



#10 intvnut OFFLINE  

intvnut

    River Patroller

  • 2,818 posts
  • Location:@R6 (top of stack)

Posted Tue Nov 21, 2017 4:36 AM

 

But... on an LTO Flash! they won't need to simulate it -- they can just hit the Refresh button on the console.  What am I missing?

 

The part I quoted last time:

 

an Intellivision II that is modified with a quicker reset than usual.

 

I'm pretty sure he means "It powers off almost instantly when you push the button," which is the usual mod to make with an Intellivision II.



#11 DZ-Jay OFFLINE  

DZ-Jay

    Quadrunner

  • 9,940 posts
  • Triple-Stripe Mo' Bro
  • Location:NC, USA

Posted Tue Nov 21, 2017 4:42 AM

 

The part I quoted last time:

 

 

I'm pretty sure he means "It powers off almost instantly when you push the button," which is the usual mod to make with an Intellivision II.

 

OK then, I'm now absolutely sure I'm still missing something... In emulation, hitting F11 will simulate a hardware reset.  It may not simulate the super-fast hardware reset of a modded Intellivision II, but how would software do that from the game program?  Wouldn't he need to hack jzIntv to simulate the fast reset?

 

Either way, PEEKing and POKEing does not seem to be the way to simulate the situation that he wants.

 

  -dZ.



#12 intvnut OFFLINE  

intvnut

    River Patroller

  • 2,818 posts
  • Location:@R6 (top of stack)

Posted Tue Nov 21, 2017 10:23 AM

 

OK then, I'm now absolutely sure I'm still missing something... In emulation, hitting F11 will simulate a hardware reset.  It may not simulate the super-fast hardware reset of a modded Intellivision II, but how would software do that from the game program?  Wouldn't he need to hack jzIntv to simulate the fast reset?

 

Either way, PEEKing and POKEing does not seem to be the way to simulate the situation that he wants.

 

*shrug*   FirstSpear probably has a better idea of what exactly they're trying to test.  Here's what I decoded:

  • Wants to test on real hardware, not jzIntv.  (Hence LTO Flash.)
  • Wants to test "does game initialize properly after a RESET on real hardware."
    • They may just want to see their title screen sequence over and over.
  • Can't actually press RESET button, so will instead implement a "reset myself" kludge within the game itself.

You won't be able to simulate the asynchrony of hitting the actual reset button.  But, you can at least ask EXEC to restart you.  It may be sufficient for testing that hardware does the same as jzIntv for certain sequences.

 

One downside of jumping to $1000 is that it won't send a reset pulse to the Intellivoice.  So, you could end up junking up that.  I wonder if I should add a "reset me" button to LTO Flash itself.






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users