Join us on Discord!
You can help CodeWalrus stay online by donating here.

TI re-recording emulators?

Started by Yuki, August 09, 2016, 02:55:23 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Dream of Omnimaga

Yes. It could also be instruction by instructions or at least every loop iteration for extra precision.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

MateoConLechuga

I'd be happy to implement all of these ideas into CEmu once I get back in a week and a half. Please post in the CEmu thread somewhere about any specific feature requests, including the ones mentioned here so they don't get lost :)

c4ooo

Quote from: DJ Omnimaga on August 09, 2016, 08:32:25 PM
Yes. It could also be instruction by instructions or at least every loop iteration for extra precision.
Wekk the problem is that it would be next to impossible to know when a new loop has begun. Also the screen is most likely gona update faster then the game loop.

Dream of Omnimaga

Can't this be detected via a debugger? Maybe for those who don't know ASM the debugger could have a mode that tells the user when a loop or block has started or ended.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

c4ooo

Easy to say, but very unpractical. How would it tell say a loop that renders all the enemies from the game loop? And what about basic games (and some asm games) were there is no clear "loop"?

Travis

#20
I'm not a TAS expert, but my understanding is that the vast majority of console games had all of their code and operations synchronized to the frame rate, so practically everything was handled in nice, clean frame increments (image updated once per frame, inputs read once per frame, etc.). And, because the consoles were designed to run on TVs, the frame rate was always constant because the old standard-definition CRT TVs were designed to run only at a specific scanning frequency dictated by the region's broadcasting standards (NTSC/PAL/whatever). This makes console TASs fairly straightforward (in theory, at least) to work with.

Calculators are a bit weird, though, because games aren't necessarily synchronized with the display refresh. They often just run loops at some arbitrary speed. Some games might use interrupt timers to regulate their speed (and some might have the timers set to different frequencies than others), others might have do-nothing delay loops or nothing at all, leaving their running speed entirely dependent on CPU speed. And the actual key reads could happen who-knows-where in the code at who-knows-what frequency. So TASing tools for calculators would be a lot trickier to implement, I think.

Since the precise timing and content of the inputs are the primary things that makes a TAS reproducible, if I understand correctly, and not necessarily when frames are drawn, it would be important to have the timing resolution be determined by the reading of inputs. Since calc programs can read keys or the link port or whatever at literally any time, one would either need to know the code to set breakpoints in the appropriate places, or the emulator might need to detect when they're being read and pause there so the user could define the next input. The "frame rate" of a game would thus vary depending on how often the game reads the inputs, which might not actually be at a steady, predictable rate depending on how it was coded.
  • Calculators owned: TI-81, TI-82, TI-85, TI-86, TI-89, TI-89 Titanium, 2 × HP 50g

Dream of Omnimaga

Quote from: c4ooo on August 10, 2016, 05:22:05 PM
Easy to say, but very unpractical. How would it tell say a loop that renders all the enemies from the game loop? And what about basic games (and some asm games) were there is no clear "loop"?
I think if the TAS tool can at least detect if you just went in a loop, you just have to count them. As for more complicated loop nesting and branching then the TAS doesn't have to be perfect anyway. (although it's better if it is)

But yeah Travis brings up good points too. A TAS emulator for calcs would be much harder because of that. I still think some limited tools could be done, though, such as at least  frame by frame advance where the TAS'er can assign keypresses to specific frames. An optimal TAS would probably require that the emulator runs a specific OS and that the user clears the entire RAM and archive, only leaving the game and dependencies in. That would ensure optimal speed, especially for BASIC games that tend to slow down when the calculator has more sub-programs and less RAM. But such limited tools would still be much better than just being able to slow down emulation to 1% speed.

Another nice tool would be if the emulator showed when keys are being released based on emulation rather than computer keyboard input. For example, if you set CEmu to run at 10% speed and decide to mash the shoot button at incredible speeds in Calcuzap, then the emulator registers it as holding down the shoot button most of the time. Knowing when the key is recognized as released on an hardware or game level (unless it's all dependent on loops?) would help figure out when we can press the key again.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

calcplays

Assuming that a TI emulator supporting TASs existed, what games would be speedrun? Have any games for calculators even been the subject of unassisted speed runs?

Dream of Omnimaga

Not yet, although some TAS'es exist (not entire games sometimes, but rather parts). Illusiat 3, Galaxian, Super Mario 1.2 default level pack, Calcuzap, Drug Cartel and Portal Prelude
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

calcplays


Dream of Omnimaga

Yes @calcplays , although this one would probably be even faster with real tools and a proper screenshot (in this case I just used WabbitEmu GIF capture and when I converted the GIF to avi it resulted into a glitch fest.

Also lol that game is very rare and hard to find.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Dream of Omnimaga

JWinslow23 shared this on WalrusIRC and I lol'ed (although the Snake game seems to lag near the end and isn't fast to begin with.)



I like how the game is programmed as part of the TAS.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Yuki

Oooh, wasn't aware someone at TASVideos attempted a TAS, but really nice try. If BizHawk had a way to load 8xp files and such, you would skip the speedcoding part (which would be uninteresting to TASVideos) and make pretty good TASes of things like Reuben Quest (Axe version, otherwise it would be too slow) and stuff like that.
  • Calculators owned: TI-83+ (dead?), Casio Prizm (also dead???)
  • Consoles, mobile devices and vintage computers owned: A lot
Read Zarmina!
YUKI-CHAAAANNNN
In the beginning there was walrii. In the end there will be walrii. All hail our supreme leader :walrii: --Snektron

if you wanna throw money at me and/or CodeWalrus monthly it's here

Dream of Omnimaga

Yeah I was shocked when I saw a calc TAS there. Shame that BizHawk author doesn't want to improve TI support, though. I guess this further exacerbates the need for a TI rerecording emu as alternative. That said, I loved the speedcoding part of the TAS and it was kinda ironic that it lasted much shorter than the gameplay footage itself XD.

As for tases of RPGs and the like I think the interesting part would be if some key combos that are hard to do in real-time could be achieved in TAS form to abuse glitches or if luck manipulation was used, such as critical hits. For BASIC games it would depend which one it is. I wonder if setting the Rand seed before starting the video and the game would be considered cheating?
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Yuki

BizHawk is modular, so if someone here wants to integrate one of the existing emulators (TilEm, z80e or WabbitEmu) into it, write the appropriate glue code and send a pull request, guess it's doable. The only concern would probably be what @Travis said earlier in this thread, but again, we already have a proof of concept working written from scratch that proves it works.
  • Calculators owned: TI-83+ (dead?), Casio Prizm (also dead???)
  • Consoles, mobile devices and vintage computers owned: A lot
Read Zarmina!
YUKI-CHAAAANNNN
In the beginning there was walrii. In the end there will be walrii. All hail our supreme leader :walrii: --Snektron

if you wanna throw money at me and/or CodeWalrus monthly it's here

Powered by EzPortal