Shop OBEX P1 Docs P2 Docs Learn Events
MSX Computer Emulator — Parallax Forums

MSX Computer Emulator

Hello,

Since I have all the cpu, audio and video components, here is the MSX Computer Emulator.

It uses the wonderful ZiKore Z80 CPU emulator, with my TMS9918 video and AY-3-8912 sound emulators, with some glue logic to replicate the MSX standard ROM/RAM mapping.

The emulated system is a basic MSX-1 computer: Z80 CPU @ 3.5MHz, 32K ROM, 64K RAM, TMS9918 Video with 16K VRAM and AY-3-8912 sound chip.

It can run some basic ROM games (those that don't require a dedicated mapper).



It can also load programs from a tape player.

The PS/2 keyboard follows the layout of a real MSX keyboard and is a bit unusual, the source code has a simple diagram that shows how the keys are mapped. Hope to find a better solution in the future.

As usual, the real MSX ROM with the Microsoft BASIC interpreter can't be distributed, however included is the free CBIOS implementation that allows to run the cartriges (no basic interpreter included) if available.

Enjoy!

Comments

  • roglohrogloh Posts: 5,837
    edited 2022-04-07 10:32

    Looks cool macca. :smile:

    Some time back using the P1 I extended my original Z80 microbee system to do colour video using VGA output with the P1 acting as a HW peripheral in the actual Z80 system and also running a CP/M filesystem off SD card files hosted by the Propeller. I am thinking these days I could probably go and emulate the entire platform itself in a single P2. Its specs are quite similar to the above, and it used a cassette interface as well as disk. It uses a 6545 CRTC chip, the PIO of course, a FDC2793 IIRC and some custom bank switching stuff but the rest is a pretty simple Z80 implementation. I've already emulated the 6545 on the P1.

  • Nice! Gonna have to try this!

  • I haven't actually tried any of your stuff properly yet. Will have to figure out how to graft USB keyboard onto it one of these days. Yet, inexplicably, my USB keyboard is actually just a PS/2 to USB adapter box, but like, I'm too lazy to build an actual PS/2 socket adapter. From messing with it, the USB code is all PASM, so I think it just needs symbol prefixing to work in a bare PASM envirovment.

  • pik33pik33 Posts: 2,388
    edited 2022-04-08 06:28

    I have this RPi small keyboard which is not recognized by P2's USB driver (it has a hub inside) - I made a RPi Zero based OS-less interface for it. The interface reports via serial port. The main problem with it today is... the RPi Zero is an animal very hard to hunt, but I have enough of them to play. The interface code ready to run is here: https://github.com/pik33/P2-retromachine/tree/main/Ultibo/Zero/Release - all kind of USB keyboard and a lot of mice are supported.

  • @Wuerfel_21 said:
    I haven't actually tried any of your stuff properly yet. Will have to figure out how to graft USB keyboard onto it one of these days. Yet, inexplicably, my USB keyboard is actually just a PS/2 to USB adapter box, but like, I'm too lazy to build an actual PS/2 socket adapter. From messing with it, the USB code is all PASM, so I think it just needs symbol prefixing to work in a bare PASM envirovment.

    Not surprising, several (if not all) USB keyboards can sense the connection and switch to PS/2 mode, you just need the proper adapter. Maybe just an USB connector wired to the PS/2 lines (not sure where D+/D- goes where DATA or CLOCK) and a couple of pull-up resistors.

    This also reminded me that I have that USB thing to test...

  • No, the keyboards I'm using are vintage PS/2-only ones, the adapter is active (and also has a mouse socket, but while I have like 5+ PS/2 keyboards, I can't seem to find any mice)

Sign In or Register to comment.