Author Topic: NES EMMULLLATOR (FOR NSPIRE!)!  (Read 11013 times)

0 Members and 1 Guest are viewing this topic.

Offline njaddison

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 176
  • Rating: +24/-27
    • View Profile
NES EMMULLLATOR (FOR NSPIRE!)!
« on: November 10, 2011, 12:21:04 am »
hey guys i was thinking that we could remake some nes games for the the nspire, using lua, and then make an nes emulator in lua to play the games with. the prob is, somehow, i would have to find a way to give the emulator access to the files on the nspires ram, which i haven't learned how to do.
well, i have all of these nes games on my computer, and i can't play them because my nes emulator isn't compatible with computers without flash player. please help! javascript:void(0);
<a href="http://www.nerdtests.com/ft_nt2.php">
<img src="http://www.nerdtests.com/images/badge/nt2/5f42ec78e054645d.png" alt="NerdTests.com says I'm a Highly Dorky Nerd God.  Click here to take the Nerd Test, get geeky images and jokes, and talk to others on the nerd forum!">
</a>


Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: NES EMMULLLATOR (FOR NSPIRE!)!
« Reply #1 on: November 10, 2011, 12:32:48 am »
Well there's already a NES emu for the Nspire on ticalc.org. It's called NESpire (there's also a topic here in this forum section if you use the search function). It requires Ndless, though. I don't think a NES emulator in Lua is possible, due to speed reasons.

Also I would recommend not using caps-lock titles. :P
« Last Edit: November 10, 2011, 12:36:29 am by DJ_O »

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: NES EMMULLLATOR (FOR NSPIRE!)!
« Reply #2 on: November 10, 2011, 06:55:24 am »
hey guys i was thinking that we could remake some nes games for the the nspire, using lua, and then make an nes emulator in lua to play the games with. the prob is, somehow, i would have to find a way to give the emulator access to the files on the nspires ram, which i haven't learned how to do.
well, i have all of these nes games on my computer, and i can't play them because my nes emulator isn't compatible with computers without flash player. please help! javascript:void(0);
Also, it would be really slow if we emulate NES with Lua O.o
Sig wipe!

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: NES EMMULLLATOR (FOR NSPIRE!)!
« Reply #3 on: November 10, 2011, 07:09:11 am »
Yes, NES would be definitely too slow (not that its not possible).
But there are some older atari machines that *might* be possible to be emulated in Lua, but someone will have to spend allot of time working on it.

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: NES EMMULLLATOR (FOR NSPIRE!)!
« Reply #4 on: November 10, 2011, 10:25:05 am »
Unfortunately, I highly doubt even that is possible in Lua. Apparently even emulating the Atari 2600 is fairly complicated. Lua just isn't up for heavy lifting like Emulation.

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: NES EMMULLLATOR (FOR NSPIRE!)!
« Reply #5 on: November 10, 2011, 10:30:49 am »
Well, I think I would be able to create one of the first machines. I've checked some info and looked at specs, and I think its possible :)

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: NES EMMULLLATOR (FOR NSPIRE!)!
« Reply #6 on: November 10, 2011, 10:36:34 am »
Are there others before the 2600 series? That's the earliest I remember. I'd like to see what Atari was working on before that. It had to have been really simplistic. Do you have links? :D
« Last Edit: November 10, 2011, 10:37:12 am by Art_of_camelot »

Offline Goplat

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 289
  • Rating: +82/-0
    • View Profile
Re: NES EMMULLLATOR (FOR NSPIRE!)!
« Reply #7 on: November 10, 2011, 12:35:00 pm »
Let's compare Lua to Javascript: People have written NES emulators in Javascript, and they are slow even on a modern PC. The TI-Nspire has a much slower processor than a PC, and Lua is even less suited for emulation than Javascript; it not only has the big problem of not having typed variables (any variable in JS or Lua can point to an object of any type, so the runtime has to do a type check on every operation), but also doesn't even seem to have bitwise operators (which are used extensively in emulators and are inefficient to build out of other operators).
Numquam te deseram; numquam te deficiam; numquam circa curram et te desolabo
Numquam te plorare faciam; numquam valedicam; numquam mendacium dicam et te vulnerabo

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: NES EMMULLLATOR (FOR NSPIRE!)!
« Reply #8 on: November 10, 2011, 12:54:50 pm »
I guess we have to wait until ndless 3 ;)
Sig wipe!

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: NES EMMULLLATOR (FOR NSPIRE!)!
« Reply #9 on: November 10, 2011, 01:19:06 pm »
@AOC, I'm sorry, the 2600 was the first one they released, didn't look good enough. The 6502 processor is pretty easy to emulate, but I also just realized that I can't have a good clock in Lua, the fastest I would have would be 100Hz :(

@goplat, I know bitwise operators are issue's, but I can try to optimize them in bytecode (yes, the nspire can run bytecode).

Anyway, its hard, but I *think* that you can emulate some old devices with Lua. I know that there is a gameboy emulator written in Lua, but thats for a PC (its a mod for a game).

Offline Hot_Dog

  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: NES EMMULLLATOR (FOR NSPIRE!)!
« Reply #10 on: November 10, 2011, 01:49:48 pm »
From what I've heard, Lua isn't even good for smooth-scrolling tilemapping

Offline Goplat

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 289
  • Rating: +82/-0
    • View Profile
Re: NES EMMULLLATOR (FOR NSPIRE!)!
« Reply #11 on: November 10, 2011, 02:03:49 pm »
@AOC, I'm sorry, the 2600 was the first one they released, didn't look good enough. The 6502 processor is pretty easy to emulate, but I also just realized that I can't have a good clock in Lua, the fastest I would have would be 100Hz :(
Most emulators only synchronize emulated time with real time once per frame; 60Hz suffices for that.

The real problem is that Lua just wouldn't be fast enough to run 1/60 second of emulated time in less than 1/60 second of real time.
Numquam te deseram; numquam te deficiam; numquam circa curram et te desolabo
Numquam te plorare faciam; numquam valedicam; numquam mendacium dicam et te vulnerabo

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: NES EMMULLLATOR (FOR NSPIRE!)!
« Reply #12 on: November 11, 2011, 07:54:35 am »
From what I've heard, Lua isn't even good for smooth-scrolling tilemapping
The image drawing function is a bit slow, but it is possible to create smooth-scrolling graphics. And this will also improve in future OS updates.

Most emulators only synchronize emulated time with real time once per frame; 60Hz suffices for that.

The real problem is that Lua just wouldn't be fast enough to run 1/60 second of emulated time in less than 1/60 second of real time.
Ah, didn't think about that. Well, I guess I'll look into older devices to emulate.

Thanks for the info :)

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: NES EMMULLLATOR (FOR NSPIRE!)!
« Reply #13 on: November 11, 2011, 08:14:46 am »
@AOC, I'm sorry, the 2600 was the first one they released, didn't look good enough. The 6502 processor is pretty easy to emulate, but I also just realized that I can't have a good clock in Lua, the fastest I would have would be 100Hz :(

@goplat, I know bitwise operators are issue's, but I can try to optimize them in bytecode (yes, the nspire can run bytecode).

Anyway, its hard, but I *think* that you can emulate some old devices with Lua. I know that there is a gameboy emulator written in Lua, but thats for a PC (its a mod for a game).

Yea, I thought the 2600 was the first. Like I said, emulation with lua would have to be a really simplistic device.

PC lua also has access to more instructions doesn't it? Not to mention a much faster processor.

That being said, I'd love to see proof of concept emulating a really simplistic device in Nspire lua. :) It's always cool to see boundaries pushed.

Offline BrownyTCat

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 420
  • Rating: +37/-8
    • View Profile
Re: NES EMMULLLATOR (FOR NSPIRE!)!
« Reply #14 on: November 11, 2011, 01:20:03 pm »
I remember when I suggested this last year and then it turned out it was being done. The result was a genius program resulting in hours upon hours of fun.