Skip to main content


Topic: Sphere 6502 emulator (Read 3843 times) previous topic - next topic

  • Mooch
  • [*][*][*]
Re: Sphere 6502 emulator
Reply #15
Not sure if you're still playing around with this but I just had a random thought -- the NES and SNES run off of modified 6502 chips. Would it be possible to program an emulator in Sphere if this got up and running?

Re: Sphere 6502 emulator
Reply #16
This is just a basic MOS 6502 emulator, the cpu itself with some stuff for drawing and taking input. For NES emulation, you also need to add code to handle palletes, sprite data, tile data and much more. And while the SNES's CPU is based on the 6502, that would take even more work.
Either way, it definitely wouldn't be at all impossible, but this would end up being a very small fraction of the overall code.

Re: Sphere 6502 emulator
Reply #17
I will go ahead and say that for anything resembling accurate SNES emulation, JS (or really almost any non-native language) is just way too slow. The NES may be another matter, though.

Re: Sphere 6502 emulator
Reply #18
Why is that? There's an x86 virtual machine written in Javascript, and while it obviously doesn't perform as well as it would natively, the x86 instruction set is a lot more complex than the SNES's CPU's instruction set.
  • Last Edit: September 16, 2016, 02:53:23 pm by Eggbert

Re: Sphere 6502 emulator
Reply #19
Making a new thread when this one is still on the first page seems kind of pointless, so I'll just resurrect this one.
Like how I've resurrected the -> miniSphere port! And it actually (sort of) works this time, though rendering is kind of sluggish.

It also has a ROM hexdump function.
  • Last Edit: Today at 03:00:39 am by Eggbertx

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • miniSphere Developer
Re: Sphere 6502 emulator
Reply #20
I'm intrigued and looking forward to seeing more. :D
miniSphere 5.1.3 - Cell compiler - SSj debugger - thread | on GitHub
For the sake of our continued health I very much hope that Fat Cerberus does not become skilled enough at whatever arcane art it would require to cause computers to spawn enourmous man eating pigs ~Rhuan

Re: Sphere 6502 emulator
Reply #21
Aaand done. Thanks for the help, Fat Cerberus and rhuan!