LoginLogin
Nintendo shutting down 3DS + Wii U online services, see our post

Would a DOS (or x86) emulator be possible in SmileBASIC (4)?

Root / General / [.]

HTV04Created:
Could also apply to SmileBASIC 3, but I think it would be more plausible for a DOS emulator to be on SmileBASIC 4, with more memory to work with.

Even SB3 has way more than enough memory, but the real problem is speed.

If I wanted to make a virtual x86 processor in SmileBASIC, how would I go about doing this? I'm mainly looking to do this on SmileBASIC 4.

How much wood would a woodchuck chuck if a woodchuck could chuck wood? in SmileBASIC

60wcps (60 Wood Chucked Per Second)

I am no expert on the subject, but I do see a download link that says source at https://www.dosbox.com/download.php?main=1. Of course you aren't just emulating a CPU. I assume you want a video card, a floppy and or hard drive, a mouse, a keyboard, and probably a sound card too. The file system alone should be a pain since we don't get subfolders and a smilebasic prompt for every file written will be "interesting". I think the graphics system will be working against you and I would not expect anything actually playable/real time. Overall I would not recommend it. Chip8 or Gameboy would make much better emulator starting targets, assuming the attack dog lawyers have not already pounced on you for wrong think.

I am no expert on the subject, but I do see a download link that says source at https://www.dosbox.com/download.php?main=1. Of course you aren't just emulating a CPU. I assume you want a video card, a floppy and or hard drive, a mouse, a keyboard, and probably a sound card too. The file system alone should be a pain since we don't get subfolders and a smilebasic prompt for every file written will be "interesting". I think the graphics system will be working against you and I would not expect anything actually playable/real time. Overall I would not recommend it. Chip8 or Gameboy would make much better emulator starting targets, assuming the attack dog lawyers have not already pounced on you for wrong think.
I was thinking drive changes could be saved to a program slot and saved to a file at every shutdown.

Hopefully you have a way to support many files being changed and binary files in general. Like I said I wouldn't expect any games to run reasonably. I would also start with something far simpler. Maybe something that ran of cartridges or tapes. I would take a look at the dos box code to see the kind of scale of problem you are looking at.