C8SALT - A full blown CHIP-8 Emulator written in pure TI-BASIC for the TI-83+/TI-84+/TI-84+ CSE/TI-84+ CE

DOWNLOAD HERE: http://ceme.tech/DL2202

You know because Vinegar is the name of a CHIP-8 emu for the 84+ in ASM and Sea 8 Salt & Vinegar CHIPs

C(8)SALT is a successor to my obscure previous failed attempt at emulating CHIP-8 platform in TI-BASIC, SHACC-8. Unlike SHACC, C8SALT uses several memory compression techniques to actually fit in 24k of RAM, and uses a single list for storing 4096 bytes of RAM rather than several.

There's no keypad input support or rom importer yet, but it it does support several of the most important opcodes, including display. I wont bore you with the specifics of what's implemented and what's not, but I can say that it's still far from complete.

I don't have any plans to support SuperCHIP or XO-CHIPXO wouldn't even be possible
due to technical limitations, and even at the best level of optimization this isn't going to run at a playable speed due to how slow drawing pixel-by-pixel is in TI-BASIC.

All that aside, there is a Github for this project available if you want to try out this early version of C8SALT: https://github.com/NinjaWeedle/C8SALT
Making some progress thru corax89’s test rom- I still need to implement the 8xyX ops besides 8XY0 though.
Made tons of progress lately- and finished typing out the Corax89 test rom by hand.
Here's a live showcase of the speed-or lack of it- of C8SALT:

ROM importer should finally be coming soon.
While I'm not familiar with the Chip-8, this seems kinda promising, keep going!
If you are not familiar with CHIP-8, I suggest that you give Vinegar by Benryves a try. I am not a big fan of the CHIP-8 games but I would like to see how your version runs in TilEm with no speed throttling. Smile
DJ Omnimaga wrote:
If you are not familiar with CHIP-8, I suggest that you give Vinegar by Benryves a try. I am not a big fan of the CHIP-8 games but I would like to see how your version runs in TilEm with no speed throttling. Smile

Couldn't get TilEM up and running, so I guess you'll have to settle for Wabbitemu :p

As you can see, it now runs at about... 1 cycle per frame if I'm being generous? so a lot better, but not exactly playable.
V0.5 - C8SALT gets a rom importer!

C8SALT running BC_test.ch8

As you can see by the GIF above C8SALT now has an actual ROM importer! Well, sort of- it's a python file that will take a CHIP-8 program named "program.ch8" and convert it into a .txt file that ti-connect data editor can read and then convert into an .8xl which you can send to your calculator.
It's not a drag and drop process, but it makes C8SALT actually usable right now!

I also implemented FX29 and a few SCHIP opcodes. I may end up doing SCHIP after all, at least partially. we'll see. Evil or Very Mad
V0.7 - first alpha release!

C8SALT's gotten to a point where I feel like an alpha release is in order- there's a basic GUI, a resume function, a rom converter, and most of the opcodes have been implemented. I've submitted C8SALT Alpha V0.7 to the archives, so go check it out when it gets added!

As for changes since v0.5, here's a quick run down:

- Added 8XY6 & FX30
- Added option to enable/disable HLE font rendering (CSE/CE users will need to turn it off)
- Added new loading screen
- Added rudimentary resume function or resuming gameplay after pressing ON.

My next target is finishing the remaining 8XYx opcodes, then finally tackling Fx33 and fx55. after doing that and passing the Bestcoder and Corax tests, I'll do a full release. I'm hoping to get C8SALT V1.0 done by Christmas!
Alright, so I guess I’ve gotten a little behind, but hey, the project’s back now.

I’m currently working on V0.8, which should include more debug info, and have all the bitwise ops implemented.

As of now, I’ve only implemented 8xy2 (AND), and still have 8XY1 (OR) and 8XY3 (XOR) to go.
6 months later, I've fixed the 3 bitwise ops (8XY1,8XY2,8XY3):

This means that the last ops that C8SALT is missing are all the ones that write to RAM in some way.

I still have a couple miscellaneous bugs to fix, but those should be fixed shortly. once they are fixed, I'll upload Alpha 0.8.1 to the archives.
After seeing that TICalc Arts uploaded a new CHIP-8 emulator in TI-BASIC to ticalc.org, I decided to try and compare it to C8SALT in terms of speed and accuracy using corax89's chip-8 test.

CHIP-8 Emulator In TI-BASIC

Fails 7XY0, 9XY0, 8XY4, 8XY5, 8XY6, 8XYE, and crashes at FX55

C8SALT V0.8.1 Alpha

Fails FX55, FX33

As you can see, C8SALT loads and runs a fair bit faster but also still fails RAM writes.

The two programs have two very different approaches to memory and program structure. C8SALT uses compressed lists of decimal format numbers to store RAM and ROM, while TICalcArts's emu uses primarily string variables with hex code for storage.
I do admit that the strings were a clever move as while they are slower, it can make writing to RAM easier, but considering FX55 failed on both it seems that neither emulator supports writes to RAM yet.

overall I'm just plain surprised someone else attempted this in TI-BASIC. The way I see it, that just pushes me to try and finally figure out ram writes so I can be the first to have all 30 opcodes successfully implemented. Wink
Well, when I said Christmas, I clearly meant Christmas of 2022.

That's right, C8SALT V1.0 is finally out.

Features added since V0.8.1 Alpha:

- FX55/FX65 which were singlehandedly responsible for delaying this release for so long

- Custom Font/SCHIP font

- VIP FX55/65 and VIP Shifts compatibility toggles

- Odd number PC ram writes and many, many more bugfixes

- Fixed font loader

- 128x64 mode

- Updated ROM converter that now allows for you to drag and drop chip-8 files rather than having to rename them to "program.ch8" first

- Custom C8SALT Logo CHIP-8 ROM

- All 30 base opcodes + some SCHIP ops like FX75/FX85

- An option to reset the RPL flags set by FX75/FX85

- "C8SALT" Logo now displays further away from the screen on CSE/CE

You can download C8SALT V1.0 here:
V1.1 - Octojam 9 edition

I've been working on optimizing C8SALT for a slight speed increase and smaller file size.

There's also a couple bugfixes:

- Cxkk now ANDs properly
- VIP style Load/Save now increments I properly

I've also updated the included "C8SALT Logo" rom to the version I'm submitting in Octojam 9:

Disclaimer: footage not recorded in C8SALT

I've submitted this updated version of C8SALT to the archives.
Is it possible to emulate xo chip?
TortillaMan wrote:
Is it possible to emulate xo chip?

Not on the 83+/84+ due to too little ram and lack of color, and still not on the CE using TI-BASIC due to the ram list not being able to get big enough to hold 64k (it would be VERY slow even if it worked in TI-BASIC. However, it would certainly be possible in assembly on the CE, and I have considered modding ckosmic’s Chip-84 to add XO-CHIP support…
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum