Running FLIP() In Tac-08 On The RG-350

2023-06-12に共有

If you have ever used Tac-08, an early Pico-8 emulator for the RG-350 handheld gaming device, you will be painfully aware that certain commands do not work. These especially, flip()memcpy()reload() and cstore()

While you can still use cartdata() and dset() for permanently saved data, many programmers including myself have difficulty coding with the absence of flip().

Thanks to @luchak's guidance, I can see now how to use yield() in its place. And as near as I can tell, it's perfect and remarkably simple to prepare. Let's take this example program:

Let's go through it.

You have _init() create a new command called _flip which is the same thing as yield You also create the pointer to a looped process, in this case our main program. And NO it doesn't matter if you call '_flip' outside of the main() function, inside a WHILE/END, REPEAT/UNTIL, or FOR/END, however you still must initialize the main program.

The _update() only has one programming line, to resume and loop our main routine. This is needed to get it started. Anytime you _flip() it will exit from wherever it is, come here to do a single screen update, then jump right back exactly where you left it, even if it's a different function or loop entirely.

And there you have it ! To change existing carts, load one up that uses flip() and change it to _flip() making the necessary changes in the code with the addition of _init() and _update() Then it will run correctly in Tac-08.

To do a global replace of flip() to _flip() you can edit it in NOTEPAD and select [E]dit, [R]eplace.

Type flip() in the Find what field and _flip() in the Replace with field. Select Replace [A]ll.

If that's too much work, you can load the cart in Pico-8, then in the editor, press CTRL+F, type in the search term: flip() followed by ENTER and replace all occurances with _flip() Press CTRL+H to find the next match and continue manually making changes until you return back to the top of the code where _flip() already exists.

Here is an example game I wrote some time ago that earlier did not run on the Tac-08 but now does with the new _flip() in place ! And verified. I just checked, this cart I wrote now runs perfectly on the RG-350. It had 6 flip() in it originally. All have been changed now to _flip()


It is indeed a wonderful thing to be able to open existing carts that earlier would not run on Tac-08 and now making use of new _flip() - they can run well and for the very first time ! Making the RG-350 portable gaming console that much more valuable an asset to Pico-8 gamers and programmers worldwide.

HOPE THIS HELPS !