Platform Sanyo - marinus-lab/z88dk GitHub Wiki
- Native console output
- Native console input
- ANSI vt100 engine
- Generic console
- Redefinable font
- UDG support
- Paper colour
- Ink colour
- Inverse attribute
- Bold attribute
- Underline attribute
- Lores graphics
- Hires graphics (partial support)
- PSG sound
- One bit sound
- Inkey driver
- Hardware joystick
- File I/O
- Interrupts
- RS232
The Sanyo MBC models are CP/M compatible, so the same base library can be used.
Library extras include the high resolution graphics support (640x400).
zcc +cpm -subtype=mbc200 -create-app program.c
A .imd disc image (including a .COM file) will be created as a result.
All the Sanyo models (including MBC1000/2000/3000, all identified by the SANYO define) share the character set and the basic ESC sequences. The MBC200/1200 models have extra ESC functions and graphics capabilities.
$07 -> BEL
$08 -> BS backspace, does NOT touch the right side of the text line
$09 -> TAB
$0A -> LF
$0D -> CR
$1A -> CLS
$1B (ESC)
ESC "Q"
ESC "K"
ESC "A" <<<--- 40 lines mode (not all the text attributes are supported, slow scroll)
ESC "F"
ESC "C" YY XX ?
ESC "=" 32+Y 32+X -> change current text cursor/position (considering 0,0 as top-left position)
ESC "S" YY XX -> set pixel
ESC "R" YY XX -> reset pixel
ESC "T" -> clear text up to end of the current line
ESC "I" -> insert line at the current cursor position (scroll down the remaining text)
ESC "B" -> delete line at the current cursor position (scroll up the remaining text)
ESC "L" #..# ---> Upload custom routine at $2000, lenght follows (MSB/LSB), max 3960 bytes
ESC "JP" ---> Jump to custom routine at $2000
ESC "G"
ESC "M" <<<--- 33 lines mode (default)
ESC "D" -> disable..?
ESC "E" -> enable..?
ESC "P0" YY XX YY XX
ESC "P1" YY XX YY XX
ESC "HR" -> get dump data from screen ($7D00 bytes)
ESC "HT" n nnnn -> dump data to screen ($7D00 bytes)
ESC "N" -> Invert the current picture
ESC "?" -> reset terminal (cold reset)
ESC "t" 0 -> attributes off
ESC "t" 2 -> underline
ESC "t" 4 -> Inverse on
ESC "t" 6 -> Inverse on "+ underline"
ESC "t" 8 -> line on top of the the text
MAME was recently updated and an issue related to the floppy disk access on drive B been solved, and the overall emulation status is better.
The command line options to boot CP/M and use the created disk image will be something like:
mame mbc200 -flop1 smbc1200.td0
After the CP/M boot, change the virtual floppy disk image (choose A.IMD). In the future drive B will be valid on MAME (-flop2 a.imd)
The file A.COM is built together with the packaged A.IMD
The <arch/mbc200.h>
header supplies a set of functions that perform non-portable MBC-200 specific behaviour.
Send a byte to the video section (faster than putc)
mbc_sendchar(int chr)
CLS effect (text characters shifted right)
mbc_fade()
Get a byte from the video section (untested)
mbc_getbyte()
Receive a little-endian word from the video section (untested)
mbc_getword()
Set console cursor position, top-left=(0;0)
mbc_setcursorpos(int x, int y)
Set a single register in the 6845 CRTC
set_crtc_reg(unsigned char register, unsigned char value)
zcc is configured to chain appmake for the following disk types:
-
mbc200 or mbc1160 : DSDD 96 tpi 5.25" (with or without mbc200/1200 extras)
-
mbc1100 : DSDD 48 tpi 5.25" (also readable as F: by the MBC200 series)
-
mbc2000 : SSDD 96 tpi 5.25", 8085 CPU
It is possible to use CPMTOOLS to edit existing disk images for the Sanyo MBC computers family
# SAN1 Sanyo MBC-1000/1100/1150 - DSDD 48 tpi 5.25" - 256 x 16
diskdef san1
seclen 256
tracks 80
sectrk 16
blocksize 2048
maxdir 64
skew 3
boottrk 2
os 2.2
end
# Sanyo MBC-1200/1250 - DSDD 96 tpi 5.25" - 256 x 16
# Probably valid also for MBC-250/225/200
# 256 byte sector, 1-16, 1:1, 96 tpi
diskdef san2
seclen 256
# tracks 160
sectrk 16
blocksize 4096
maxdir 128
skew 3
tracks 80
heads 2
sides outback
boottrk 4
os 2.2
end
# Sanyo MBC-2000 - SSDD 96 tpi 5.25" - 256 x 16
diskdef san3
seclen 256
tracks 80
sectrk 16
blocksize 2048
maxdir 64
skew 5
boottrk 4
os 2.2
end
# Sanyo MBC-3000 - DSDD 8" - 256 x 26
diskdef san4
seclen 256
heads 2
sides outback
sectrk 26
blocksize 4096
maxdir 128
skew 6
boottrk 4
os 2.2
offset 3328
end
- System disks: http://www.retroarchive.org/maslin/disks/sanyo/index.html
- ROM and BIOS disassembly: https://github.com/z88dk/techdocs/tree/master/targets