Skip to main content
Topic: Sphere 6502 emulator (Read 254803 times) previous topic - next topic
0 Members and 4 Guests are viewing this topic.

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 #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 6502asm.com -> miniSphere port! And it actually (sort of) works this time, though rendering is kind of sluggish.

It also has a ROM hexdump function.

Re: Sphere 6502 emulator

Reply #20
I’m intrigued and looking forward to seeing more. :D


Re: Sphere 6502 emulator

Reply #22
This is a pretty awesome little assembler/emulator, me likey. :smiley:  Is there a specific device this is meant to emulate?

Re: Sphere 6502 emulator

Reply #23
As far as I know, it isn't meant to emulate a specific system, and it doesn't have interrupts for input. ASCII values from keypress events are written to memory location $ff, and Math.random()*255 is written to memory location $fe, and for graphics, you simply read from/write to $200-$600 (1 KB or 32x32 px)

Re: Sphere 6502 emulator

Reply #24
This is very neat. I played a little bit of adventure.asm.

I guess in a way this adds compatibility to a whole bunch of (simple) games to miniSphere all at once! :P

 

Re: Sphere 6502 emulator

Reply #25
Glad I could help - I'm almost always happy to spend time optimising code :)

Nice to see this running smoothly at high FPS now.