Author Topic: TI-Nspire GB Emulator  (Read 155072 times)

0 Members and 2 Guests are viewing this topic.

Offline fb39ca4

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1749
  • Rating: +60/-3
    • View Profile
Re: TI-Nspire GB Emulator
« Reply #240 on: November 16, 2010, 09:06:31 pm »
It would be hard to get it fullspeed, though. The GBA runs at 16mhz, and the nspire at 150mhz. A rule of thumb is you need 10-15x the power to emulate something. And then, the GBA has graphics hardware, which the nspire lacks. Then again, they both have ARM CPUs, which makes matters easier.

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: TI-Nspire GB Emulator
« Reply #241 on: November 16, 2010, 09:35:27 pm »
Well, he did say "on later calculators". Though, knowing TI, it might take a long time before they get even close to putting recent hardware in one of their calcs.
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline fb39ca4

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1749
  • Rating: +60/-3
    • View Profile
Re: TI-Nspire GB Emulator
« Reply #242 on: November 16, 2010, 09:57:15 pm »
By that time, people will be asking for DS and N64 emulation on their calc.
EDIT: Autocorrect on my iPod switched calc to calf!
« Last Edit: November 16, 2010, 09:58:42 pm by fb39ca4 »

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: TI-Nspire GB Emulator
« Reply #243 on: November 16, 2010, 09:59:08 pm »
Indeed ;D

Plus I don't even know if the Casio Prizm will even have a processor faster than the Nspire, not to mention it may be a different architecture that is not documented well. It would be cool if Casio switched to ARM.

In other words, before we get a calc powerful enough to run a GBA emu at full speed, emulating all effects, it may take years...
« Last Edit: November 16, 2010, 09:59:58 pm by DJ Omnimaga »

Offline fb39ca4

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1749
  • Rating: +60/-3
    • View Profile
Re: TI-Nspire GB Emulator
« Reply #244 on: November 16, 2010, 10:03:26 pm »
Prerecompilation may work-a computer program that changes a gBA rom into an nspire binary.

EDIT: 400th post!
« Last Edit: November 16, 2010, 10:14:48 pm by fb39ca4 »

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: TI-Nspire GB Emulator
« Reply #245 on: November 16, 2010, 10:05:24 pm »
Hmm... although this would no longer be an actual emulator, it would be cool if we could convert console/handheld games to Nspire ASM code instead of emulating them. It may not sound as cool but maybe they would be faster? I am not sure about their file size, though.

Offline fb39ca4

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1749
  • Rating: +60/-3
    • View Profile
Re: TI-Nspire GB Emulator
« Reply #246 on: November 16, 2010, 10:13:33 pm »
There would be extra code to substitute for the BIOS and graphics routines, but the actual graphics, as in tiles and sprites, can be converted into 4lvl grayscale, cutting down their size fourfold. (GBA has 32,768 colors, so I'm assuming 16bpp

That stupid autocorrect tried to change sprites to spruces, but this time I caught it. :)

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: TI-Nspire GB Emulator
« Reply #247 on: November 16, 2010, 10:28:00 pm »
What you are describing is static recompilation. Unfortunately, this is almost always infeasible:
   With static recompilation, you do the same as in dynamic recompilation, but you follow branches. You end up building a chunk of code that represents all of the code in the program, which can then be executed with no further interference. This would be a great mechanism if it weren't for the following problems:

    * Code that isn't in the program to begin with (e.g. compressed, encrypted, generated/modified at runtime, etc) won't be recompiled, so it won't run
    * It's been proven that finding all the code in a given binary is equivalent to the Halting problem

These combine to make static recompilation completely infeasible in 99% of cases. For more information, Michael Steil has done some great research into static recompilation -- the best I've seen.
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

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: TI-Nspire GB Emulator
« Reply #248 on: November 16, 2010, 10:28:07 pm »
Yeah that too, the lower color depth would cut size down considerably. Btw are you on an iPhone/android or something? I think they got auto-correct and sometimes Eeems posts become weird when he doesn't check carefully. :P I have a spell-checker, but it doesn't auto-correct

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: TI-Nspire GB Emulator
« Reply #249 on: November 16, 2010, 10:32:15 pm »
There would be extra code to substitute for the BIOS and graphics routines, but the actual graphics, as in tiles and sprites, can be converted into 4lvl grayscale, cutting down their size fourfold. (GBA has 32,768 colors, so I'm assuming 16bpp

That stupid autocorrect tried to change sprites to spruces, but this time I caught it. :)
Most GBA graphics are already 4-bit. The actual colors are looked up from a palette. And I'm not sure how exactly you would locate the graphics data in a ROM automatically, anyway. Also, there are not "graphics routines", there is graphics hardware.
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline ExtendeD

  • CoT Emeritus
  • LV8 Addict (Next: 1000)
  • *
  • Posts: 825
  • Rating: +167/-2
    • View Profile
Re: TI-Nspire GB Emulator
« Reply #250 on: November 17, 2010, 04:43:41 am »
Even better - an OS hook to run ROMs directly from the my documents screen.

This could be a feature request for Ndless. Ndless already puts an hook on the documents opening.
Ndless could manage a map of file extensions (.gb/.gbc in the case of gbc4nspire) to programs, updated by the programs when run from the first time, and pass the file name as an argument to the main() function of the program.
« Last Edit: November 17, 2010, 04:44:12 am by ExtendeD »
Ndless.me with the finest TI-Nspire programs

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: TI-Nspire GB Emulator
« Reply #251 on: November 17, 2010, 02:13:27 pm »
Hmm that would be cool actually, like on computers. It would be much faster to run stuff. :)

Offline calcforth

  • LV3 Member (Next: 100)
  • ***
  • Posts: 62
  • Rating: +4/-4
    • View Profile
Re: TI-Nspire GB Emulator
« Reply #252 on: November 17, 2010, 06:29:09 pm »
Most GBA graphics are already 4-bit. The actual colors are looked up from a palette. And I'm not sure how exactly you would locate the graphics data in a ROM automatically, anyway. Also, there are not "graphics routines", there is graphics hardware.
You don't need to locate graphics data in a ROM, you only need to block access to HW and emulate it in signal handler. Should be simple to do if Nspire's CPU includes proper MMU. The only question is if it'll be fast enough: context switch is slow business and Nspire is only 10 times faster then GBA...

In other words, before we get a calc powerful enough to run a GBA emu at full speed, emulating all effects, it may take years...
It's not a question of power: Nspire is more then capable enough. It's question of doing the actual work. Compare XBox (original, not XBox360) emulation with PS2 emulation. It's actually harder to emulate PS2 - but people want it so it works (not perfectly, but compatibility was over 50% two years ago, by now I think it's about 80-90%) while XBox... well, you can run one or two games - and that's all.

So ironically enough while I agree that "it may take years" I don't agree that we need new hardware: it'll take years, but the end result will probably be GBA emulator for Nspire, not for some exotic new platform.

Offline fb39ca4

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1749
  • Rating: +60/-3
    • View Profile
Re: TI-Nspire GB Emulator
« Reply #253 on: November 17, 2010, 09:15:00 pm »
Yeah, I wanted to play some xbox games on my computer, but emulation for that is well, pathetic, compared to GC, PS2, and even Wii.

This time autocorrect tried to change xbox into shod. ???

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: TI-Nspire GB Emulator
« Reply #254 on: November 18, 2010, 07:24:38 pm »
Most GBA graphics are already 4-bit. The actual colors are looked up from a palette. And I'm not sure how exactly you would locate the graphics data in a ROM automatically, anyway. Also, there are not "graphics routines", there is graphics hardware.
You don't need to locate graphics data in a ROM, you only need to block access to HW and emulate it in signal handler. Should be simple to do if Nspire's CPU includes proper MMU. The only question is if it'll be fast enough: context switch is slow business and Nspire is only 10 times faster then GBA...

In other words, before we get a calc powerful enough to run a GBA emu at full speed, emulating all effects, it may take years...
It's not a question of power: Nspire is more then capable enough. It's question of doing the actual work. Compare XBox (original, not XBox360) emulation with PS2 emulation. It's actually harder to emulate PS2 - but people want it so it works (not perfectly, but compatibility was over 50% two years ago, by now I think it's about 80-90%) while XBox... well, you can run one or two games - and that's all.

So ironically enough while I agree that "it may take years" I don't agree that we need new hardware: it'll take years, but the end result will probably be GBA emulator for Nspire, not for some exotic new platform.

So I'll be able to play PS3 games on my computer soon! ;D

Just kidding, but yeah GBA emulation was attempted on the Nspire before. The person who worked on it for a while told me a bit about it. It was about twice slower than the original GBA and most special effects did not work. That said, with the time, new tricks will be discovered to find faster ways to do stuff. After all, it took 8 years before a GB emu arrives on the 84+ and now a faster one is being written.