Omnimaga
Calculator Community => Other Calc-Related Projects and Ideas => TI-Nspire => Topic started by: Jim Bauwens on December 08, 2012, 02:54:57 pm
-
A couple of days ago I started to port a Lua based CHIP-8 emulator I found online to the TI-Nspire.
Yesterday I got it working, and after fixing some emulator bugs and improving/optimizing the overall code I can say that it's already quite decent.
(http://i.imgur.com/Mbd0B.jpg)
(http://i.imgur.com/yBN3W.jpg)
As you can see in the video, there are still some issues with screen flickering (well, actually invaders is the only game that really has a problem with that).
Space Invaders runs a little slow, but it's one of the more complex CHIP-8 games.
Blitz, Tetris, Brix, Vbrix and some other games I tested run basically at full speed.
I'm still going to try to optimize the screen drawing part, but I'm already very happy with the result :)
-
This looks awesome, though I have no idea what CHIP-8 is :P some sort of old computer system?
-
CHIP-8 is a kind of virtual machine, with it's own instruction set and hardware. It was created in the 80's for some consoles in that time, allowing games to run on multiple different architectures.
-
Wow, great work Jim! There is also a Z80 asm implementation of this floating around on Ticalc somewhere.
-
How is this possible? I thought lua couldnt open files?
-
Nspire-Lua can't, indeed, with io.* things as in normal lua, but here, the game is put as a one-big-line-array thing embedded directly in the script :)
The emulator itself not being huge at all, each .tns contains the game and the emulator ^^
Edit : as Jim said in the next post, you can actually "import" stuff from outside : math/basic variables from documents located in MyLib folder, in fact :)
-
I plan to add support for opening external ROM files ;)
That is most certainly possible.
-
Nspire-Lua can't, indeed, with io.* things as in normal lua, but here, the game is put as a one-big-line-array thing embedded directly in the script :)
The emulator itself not being huge at all, each .tns contains the game and the emulator ^^
Edit : as Jim said in the next post, you can actually "import" stuff from outside : math/basic variables from documents located in MyLib folder, in fact :)
Oh, ok thanks for clarifying
-
I plan to add support for opening external ROM files ;)
That is most certainly possible.
Well, luaext could be used for this purpose. :)
-
For this purpose and so many others, yeah. It's a perfect example of the power of native code and its complementarity with TI's narrow-minded views. TI is silly to try and prevent the inevitable access to native code.
-
Can you post an aplha soon, Id like to look into the source (to see how an emulator works) and I think lua would be a good place for me to start since I know lua
-
Very nice. I might try it when it comes out.
Wow, great work Jim! There is also a Z80 asm implementation of this floating around on Ticalc somewhere.
Yep, it's called Vinegar, by Benryves, and it supports both CHIP-8 and SCHIP.
-
Vinegar also has sound O.O
-
you wrote dat emulator in lua? O.o pretty cool! :D
-
Annoyingcalc really?? O.O I didn't remember that... that's even better
Also Jim's emu is really in Lua? O.O
-
Yes, the emulator is fully in Lua ^^
Will see to make a decent release soon.
-
How does the speed compare with the original thing? I couldn't find the Space Invader and Breakout clones shown in the first post so I couldn't compare.
-
Well, there isn't a 'real' thing, but the only other CHIP-8 emulator I tested was slower :P
But maybe I just didn't test a good one ^.^
-
If it was on the computer, then how did an emulator of a '80s device manage to be slower on a GHz processor speed machine? O.O
-
If it was on the computer, then how did an emulator of a '80s device manage to be slower on a GHz processor speed machine? O.O
Well, it was made in Javascript. But still, it could have been faster.
Or I'm just emulating too fast...