• Please review our updated Terms and Rules here

CP/M-65 ported to the SNES / Super Famicom

hjalfi

Experienced Member
Joined
Feb 11, 2017
Messages
267
Location
Zürich, Switzerland
Yes, really!


Okay, so you do need some keyboard and floppy drive hardware that Nintendo prototyped, didn't release, and now is only known about from references in other source code, but that still counts, right? There are real keyboard and floppy drive peripherals for the Super Nintendo, but I was unable to find an emulator which supported them.

The SNES is based on a 65816 and luckily the memory map is just right to set up a 64kB virtual 65c02 address space. Running at 7MHz makes it substantially faster than, say, the Apple II port and it's really snappy and comfortable to use. You get a fast 64x28 console (using SNES mode 5, so it's a 'hardware text mode'). I think I've just become the first person to compile a Pascal compiler on a Super Nintendo.

Source and a precompiled image (and a link to the emulator you'll need for it): https://github.com/davidgiven/cpm65
 
This makes me wonder about the possibility of porting Microsoft Basic to the SNES...

Maybe I should try with the IIgs first, so I have it specifically coded around the 65816 _before_ I try messing around with the SNES.
 
It should be dead easy. You wouldn't even need a 65816 port, as it's completely compatible with the 6502. You're welcome to steal the console code from this, BTW (the docs on SNES mode 5 are... approximate, as I discovered).

I am actually looking for a Microsoft BASIC clone for CP/M-65 but unfortunately it's unusable for license reasons --- while there is source out there, it's all based on reverse engineered disassemblies or leaked code. I have actually been debating writing one myself.
 
I've thought of it too, but I know I don't have the mad skillz (I tried writing a Microsoft-style BASIC in C89, because FPBASIC and GW-BASIC were the first two languages I did much coding in, and when I finally moved off BASIC as my main language it was to C89, though initially I was actually using a C86 compiler - would've then tried rewriting it in 65C02).

The reason I mentioned 65816-specific stuff was that that would allow me to allocate even more RAM to program code and data.
 
Back
Top