HAL Laboratory recently (2017) came out with a Z80 computer based on emulation.

Not many people know about this, especially since it's Japan-only, and I recently picked one up. So I thought I'd share. In case you don't know, HAL Laboratory is the same company that made Kirby and Super Smash Bros.

This is what the computer looks like:


The computer is called the Pasocom Mini. It is based off of the Sharp MZ-80C computer from the early 80s, which is a Z80 computer. This is a "mini" version of it, kinda like the mini versions of the NES or the Genesis. It also comes with a few built-in games that you can play, called "Alien", "Chitei", "Jupiter", "Zeplis", and "Zeldis".

Unlike the mini versions of the NES or Genesis, this isn't just meant for gaming, but for programming as well.

The computer actually runs in two modes simultaneously...

The first mode which you see when you boot the computer is called "SmileBASIC". SmileBASIC is a very modernized version of the BASIC programming language. It is also available on 3DS (worldwide) and Wii U (Japan only), and is also supposed to be coming to Nintendo Switch eventually.

The second mode is called "HAL-MONITOR". This mode is your Z80 emulator. It is where you see the output of the Z80 code. It is also where you can play the built-in games.

You switch between these two modes with the press of a key.

SmileBASIC is a fully-fledged programming language in itself, it can do high-level stuff like sound and graphics, but even low-level stuff like controlling the pins on the computer to connect to external hardware.

But one of the more interesting things it can do is control the Z80 emulator.

Here's some code I wrote that clears the Z80 emulator and injects the instruction "LD HL, 4660" into it, then executes the instruction and then prints out the value in the HL register...



Here's the output:



Note that I'm using an incredibly cheap capture card... was like $8, and the HDMI is downscaled to 480i to even be captured. This drops the quality a ton and for some reason adds overscan, so you can't see the command line interface I used to run the code. But trust me there is a SmileBASIC command line interface you use to read/write files, run code, etc.

But as you can see, you can write code in the more modernized and powerful programming language, SmileBASIC, which you can use to write programs purely in SmileBASIC or you can control the Z80 emulator.

Here's a video of someone unboxing it, setting it up, and then playing a Z80 game using the HAL-MONITOR:



Here's a video of something someone programmed using purely SmileBASIC (as you can see, it's a lot more capable):



The board inside the computer is, I think, a Raspberry Pi 1.1 Model A+. The software on the SD card is somehow tied to the board so it won't run on other Pis, even of the same model.

Anyways, I thought this was interesting and I'd share it. It's not every day we get something new that can run Z80 code these days.
Wow that is really cool! I wonder what the graphical performance could be since the videos seem to run well.

Is there talk of an international release?
tr1p1ea wrote:
Wow that is really cool! I wonder what the graphical performance could be since the videos seem to run well.

The Raspberry Pi 1.1 isn't exactly a powerhouse. It has a single-core ARM 700Mhz CPU and 512 MB of RAM, although it seems like only 64 MB of that RAM is usable by SmileBASIC. I find the performance is only a little better than the performance on the original 3DS. And this is BASIC, so you're not getting the full CPU's speed either.

It's not fast, but given this is more of a toy than a serious desktop rig, I find it's fast enough for most purposes.

Quote:
Is there talk of an international release?

The MZ-80C was a Japanese exclusive computer, so it wouldn't make much sense to bring this one over.
I found this good memory map source here for the MZ-80K computers. A good place to store programs in memory is at 0x8000.

Here's some SmileBASIC code to insert a "Hello, World!" program into RAM, which you can then switch to the emulator and actually run it.


Code:
'LD DE, 8020h
EMUMEM &H8000, &H11
EMUMEM &H8001, &H20
EMUMEM &H8002, &H80

'CALL _PUTS
EMUMEM &H8003, &HCD
EMUMEM &H8004, &H15
EMUMEM &H8005, &H00

'CALL _NEWLINE
EMUMEM &H8006, &HCD
EMUMEM &H8007, &H06
EMUMEM &H8008, &H00

'CALL _GETKEY
EMUMEM &H8009, &HCD
EMUMEM &H800A, &HB3
EMUMEM &H800B, &H09

'RET
EMUMEM &H800C, &HC9

'Our string
EMUMEM &H8020, ASC("H")
EMUMEM &H8021, ASC("E")
EMUMEM &H8022, ASC("L")
EMUMEM &H8023, ASC("L")
EMUMEM &H8024, ASC("O")
EMUMEM &H8025, ASC(",")
EMUMEM &H8026, ASC(" ")
EMUMEM &H8027, ASC("W")
EMUMEM &H8028, ASC("o")
EMUMEM &H8029, ASC("r")
EMUMEM &H802A, ASC("l")
EMUMEM &H802B, ASC("d")
EMUMEM &H802C, ASC("!")
EMUMEM &H802D, 13


Run this code, then switch to the emulator and type "G8000" to call that memory and it will run the program.

Of course you probably don't want to be inserting machine code instruction by instruction like this. But you could easily write some code in SmileBASIC to read a binary file and inject that binary file into memory. You could get the binary file from an emulator like SPASM and then just put the compiled binary file onto the SD card.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement