Author Topic: NESpire general discussion thread  (Read 129506 times)

0 Members and 1 Guest are viewing this topic.

Offline annoyingcalc

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1953
  • Rating: +140/-72
  • Found in Eclipse.exe
    • View Profile
Re: Would an NES emulator be possible on Nspire?
« Reply #330 on: January 28, 2012, 07:29:16 pm »
can you make sonic work for me it gives a blank screen
This used to contain a signature.

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Would an NES emulator be possible on Nspire?
« Reply #331 on: January 28, 2012, 07:45:02 pm »
...oh. my bad.
Sig wipe!

Offline Reo

  • LV3 Member (Next: 100)
  • ***
  • Posts: 64
  • Rating: +15/-0
    • View Profile
Re: Would an NES emulator be possible on Nspire?
« Reply #332 on: January 28, 2012, 09:03:12 pm »
I'm unable to compile this with a "stock" build environment. I'm getting all kinds of abnormal errors from the assembler as if something's not set up right, and yet, I'm able to compile the "hella" example as well as C++ examples with no problems. Any kind of obvious solution?
EDIT: Because "abnormal errors" was too vague:
« Last Edit: January 28, 2012, 09:21:48 pm by Reo »

Offline Goplat

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 289
  • Rating: +82/-0
    • View Profile
Re: Would an NES emulator be possible on Nspire?
« Reply #333 on: January 28, 2012, 09:39:55 pm »
can you make sonic work for me it gives a blank screen

Sonic has anti-emulator protection (or possibly just bad programming), which is not so easy to fix. It's getting stuck in the following loop:

E4DC   AD 02 20   LDA $2002
E4DF   10 FB      BPL $E4DC


This loop waits for the high bit of address $2002 to become set. The NES sets this bit at the beginning of the vertical blanking interval of each video frame. However, the NES *also* invokes an interrupt handler at the same time, and this game's interrupt handler takes so long that by the time it returns, the vertical blanking interval is already over, so $2002's high bit is clear again - the loop can never exit. The only reason it works on real NES hardware is because eventually the vertical blanking interval will happen to start in the middle of reading the LDA instruction, so the instruction reads a value with the high bit as set, because the interrupt won't be called until the instruction is finished. I can't emulate things happening in the middle of instructions; having to check for that would be extremely slow.

It seems to work if you just patch out that offending routine - hex-edit a copy of the ROM and change the byte at 3E4EC from AD to 60 (a return instruction).

Reo: Those errors imply you're trying to use an x86 assembler, rather than the ARM assembler required.
« Last Edit: January 28, 2012, 09:42:23 pm by Goplat »
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 Reo

  • LV3 Member (Next: 100)
  • ***
  • Posts: 64
  • Rating: +15/-0
    • View Profile
Re: Would an NES emulator be possible on Nspire?
« Reply #334 on: January 28, 2012, 09:45:17 pm »
But I'm using your makefile, so it should be calling arm-none-eabi-gcc.
EDIT: I changed "%.o : %.S" to "%.o : %.s", and it's working better. However, it's still saying...

Code: [Select]
main.s: Assembler messages:
main.s:75: Error: ARM register expected -- `mov cpu_a,#0'
main.s:76: Error: ARM register expected -- `mov cpu_x,#0'
main.s:77: Error: ARM register expected -- `mov cpu_y,#0'
main.s:78: Error: ARM register expected -- `mov cpu_sp,#0x100'
main.s:79: Error: ARM register expected -- `mov cpu_flags,#0'
make: *** [main.o] Error 1

...which makes me think it's not including nes.inc. Still, I don't have much to solve at this point. (I think)
« Last Edit: January 28, 2012, 09:56:52 pm by Reo »

Offline Goplat

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 289
  • Rating: +82/-0
    • View Profile
Re: Would an NES emulator be possible on Nspire?
« Reply #335 on: January 28, 2012, 09:57:04 pm »
But I'm using your makefile, so it should be calling arm-none-eabi-gcc.
EDIT: I changed "%.o : %.S" to "%.o : %.s", and it's working better. However, it's still saying...
It has to be a capital S; gcc won't use the preprocessor if the input file is named with a lowercase s.

...and I just realized I screwed up and named the files with a lowercase s anyway, which doesn't matter on Windows (case insensitive) but would be a problem on Unix (case sensitive). If you're using a Unix-like OS, just rename the files to have a capital S and it should fix it.
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 Reo

  • LV3 Member (Next: 100)
  • ***
  • Posts: 64
  • Rating: +15/-0
    • View Profile
Re: Would an NES emulator be possible on Nspire?
« Reply #336 on: January 28, 2012, 10:16:02 pm »
Aha, that worked! I'm using MinGW, so the case-sensitivity was the problem.

The reason I'm trying to build it is because I wanted a build with the controls being both on the right side and closer together. I'll attach my changes + source to this post. I've tested it with Super Mario Bros, but I doubt what I changed broke anything.

Offline JasonCheeseballs

  • LV0 Newcomer (Next: 5)
  • Posts: 2
  • Rating: +0/-0
    • View Profile
Re: Would an NES emulator be possible on Nspire?
« Reply #337 on: February 02, 2012, 06:37:04 am »
Uh I need help. I have the t-nspire cx cas ( colour screen) and I can't get nespire v0.30 working.

Ok so I have nespire v. 0.30 and SuperMarioWorld.nes.tns

I'm inside the emulator and it displays SuperMarioWorld.nes.tns

I press shift to start and nothing happens....

it then says ERROR: unimplemented mapper

What do I do? I've spent hours trying to find the answer but can't find it.

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: Would an NES emulator be possible on Nspire?
« Reply #338 on: February 02, 2012, 08:39:42 am »
Looks like NESpire is signaling you that the game uses something it doesn't know how to emulate. In that case, all you can do is wait for it to be implemented some day (if possible) ;)
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Would an NES emulator be possible on Nspire?
« Reply #339 on: February 02, 2012, 09:02:24 am »
Plus, Super Mario World is not a NES game. (Unless you're using some sort of rom hack of a NES game, but in that case it probably sucks anyway)
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline AzNg0d1030

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 522
  • Rating: +45/-4
  • Hardcore anime watcher.
    • View Profile
Re: Would an NES emulator be possible on Nspire?
« Reply #340 on: February 02, 2012, 10:23:51 pm »
Plus, Super Mario World is not a NES game. (Unless you're using some sort of rom hack of a NES game, but in that case it probably sucks anyway)
Unless he meant Super Mario Bros. :P
You just lost the game.



Offline ralphdspam

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 841
  • Rating: +38/-1
  • My name is actually Matt.
    • View Profile
Re: Would an NES emulator be possible on Nspire?
« Reply #341 on: February 02, 2012, 10:32:35 pm »
Plus, Super Mario World is not a NES game. (Unless you're using some sort of rom hack of a NES game, but in that case it probably sucks anyway)
Unless he meant Super Mario Bros. :P
There is a Mario World clone for the NES.  It's not great, but it does exist.  :P
ld a, 0
ld a, a

Offline JasonCheeseballs

  • LV0 Newcomer (Next: 5)
  • Posts: 2
  • Rating: +0/-0
    • View Profile
Re: Would an NES emulator be possible on Nspire?
« Reply #342 on: February 03, 2012, 01:52:16 am »
I have street fighter III and starwars which are .nes.tns and those give the same error message. Plus if goplat released v0.30 isn't it supposed to work? I'm pretty sure it should just work with the colour calc.

*edit* Uh Well so far only I managed to get super mario bros 3 working so that means the other roms were fake or unrecognized.
« Last Edit: February 03, 2012, 09:20:56 am by Art_of_camelot »

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: Would an NES emulator be possible on Nspire?
« Reply #343 on: February 03, 2012, 09:20:10 am »
Hey, welcome here Please use the modify button if you have something to add. Double posting is not allowed unless 24 hours have passed or you are posting a project update. I combined your two posts.

Offline Goplat

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 289
  • Rating: +82/-0
    • View Profile
Re: Would an NES emulator be possible on Nspire?
« Reply #344 on: February 03, 2012, 02:58:10 pm »
ERROR: unimplemented mapper
Guess I had better explain this. The NES hardware only provided 32kB of memory space for program ROM and 8kB for character ROM. This wasn't enough for most games, so to overcome these limits they would add hardware in the cartridge, called a "mapper", that the game could use to map different parts of ROM (and sometimes RAM) into memory. Some mappers would have other functions as well.

There are over 100 different kinds of mappers that have been used, and some are very complicated, so being able to emulate every one of them is a tall order. I've implemented only a few of the most common ones.
« Last Edit: February 03, 2012, 02:59:46 pm by Goplat »
Numquam te deseram; numquam te deficiam; numquam circa curram et te desolabo
Numquam te plorare faciam; numquam valedicam; numquam mendacium dicam et te vulnerabo