SAM Coupé
Bizmuth emulates the SAM Coupé: a Z80 at 6 MHz with 512 KB of paged RAM and 1 MB of external memory, its four screen modes, the beeper and the SAA1099 sound chip, the keyboard, the mouse and two joysticks, two disk drives and a tape input.
bizmuth --machine samcoupe game.mgtROM
The SAM Coupé runs the 32 KB ROM samcoupe.rom from the ROM folder. First-run setup does not fetch it: copy it into the folder beside the Spectrum ROMs. A file of any other size is refused.
Selection
Machine ▸ SAM Coupé switches to it, and --machine samcoupe starts as it; sam is another name. default_machine set to samcoupe in the Config File starts every launch as it. Opening a .mgt or .sad disk image selects it, as Loading Software describes.
⚠ Preferences does not offer the SAM Coupé as the default machine. It shows samcoupe as the Next, and OK writes next back.
The SAM Coupé loads no snapshot format. File ▸ Save State and Load State save and restore it; see Save States.
Hardware
| Part | Emulated |
|---|---|
| CPU | Z80 at 6 MHz, 119,808 T-states a frame: 312 lines of 384 |
| Memory | a 32 KB ROM, 512 KB of RAM in 32 pages of 16 KB, and 1 MB of external memory, paged by LMPR, HMPR, LEPR and HEPR. Memory and I/O contention |
| Interrupts | the frame interrupt and the line interrupt LINE sets, reported in STATUS |
| Video | the four screen modes VMPR selects, the 16-entry CLUT over the 128-colour palette, the border, and the LPEN, HPEN and ATTR position registers |
| Sound | the beeper, and the SAA1099 on port $FF ($1FF for its address register), mixed in stereo |
| Keyboard | the 9-row matrix, read through ports $FE and $F9 |
| Mouse | the MGT mouse, read through port $FE with a high address byte of $FF |
| Joysticks | joystick 1 on keys 6 to 0, joystick 2 on keys 1 to 5 |
| Disks | two VL1772 drives reading and writing MGT and SAD images |
| Tape | the EAR input, bit 6 of port $FE |
The window shows a 576 × 268 frame at half width, 288 × 268 at 1×: the display, 32 pixels of border each side, and the border lines above and below.
A reset sets the paging registers, VMPR and BORDER to $00. RAM, LINE and the CLUT are kept.
Keyboard
The host keys press the SAM keys by position, not by the character typed.
| SAM key | Host |
|---|---|
| letters, digits, SPACE | the same keys |
| RETURN | Enter |
| SHIFT | Shift |
| SYMBOL | Alt |
| CNTRL | Control |
| DELETE | Backspace or Delete |
| ESC | Esc |
| TAB | Tab |
| CAPS | Caps Lock |
| EDIT | Home or \ |
| INV | Insert or / |
| cursor keys | the arrow keys |
| F1 to F9 | F1 to F9 |
| F0 to F9 | keypad 0 to 9 |
-, + | -, = |
=, " | [, ] |
;, : | ;, ' |
,, . | ,, . |
F1, F5 and F8 are Bizmuth’s own shortcuts, which the emulated machine does not see; the keypad reaches F1, F5 and F8. See Keyboard and Controllers.
The Input menu’s cursor-key modes do not apply: the arrow keys are the SAM’s cursor keys.
--keys and the ADP and Rhai key injection take Spectrum key names, which press the SAM keys in the same places: caps is SHIFT, sym is SYMBOL and enter is RETURN.
Joysticks and mouse
A gamepad on the left port drives joystick 1 and one on the right port joystick 2; see Keyboard and Controllers.
Input ▸ Capture Mouse (Ctrl+M) hands the pointer to the MGT mouse, as on the Next.
Disks
Media ▸ Disk ▸ Insert Disk A and Insert Disk B put an image in drive 1 and drive 2, and Eject Disk A and Eject Disk B take it out. A .mgt of 819,200 bytes (10 sectors a track) or 737,280 bytes (9 sectors), or a .sad, is accepted; any other is refused. Write Protect A sets the tab of drive 1.
A disk the guest has written to is saved to its file as it is ejected, in the format it was read in.
Flip Disk A and Save Disk A As are disabled.
Tape
A .tap or .tzx plays into the EAR input at tape speed, and through the beeper, through Media ▸ Tape ▸ Insert Tape or --tape. The SAM Coupé has no Fast mode: choosing Fast leaves it in Real Time, with a warning in the log. A tape opened with File ▸ Open or dropped on the window switches to the 128K. See Loading Software.
Audio capture
--wav-sources DIR writes the beeper as mono beeper.wav and the SAA1099 as stereo saa.wav. ADP’s audio capture offers mixed, beeper and saa; see ADP.
Hardware test
tests/sam-hw in the Bizmuth source is a self-booting program on an MGT image that measures, on a real SAM Coupé, 28 behaviours the documentation leaves open, and shows each beside what SimCoupe, the MiSTer and McLeod cores and the SAM’s manual predict. tests/sam-hw/build.sh builds sam_hw.mgt. It runs in Bizmuth as:
bizmuth --machine samcoupe tests/sam-hw/sam_hw.mgt \
--keys "200:space 216:b 232:o 248:o 264:t 280:enter" \
--screenshot sam-hw.png --screenshot-frames 1500which presses SPACE, types BOOT and ENTER, and captures the result screen at frame 1500. Its README.md gives the record layout and the hardware run.
See also
- Loading Software: tapes and disks on every machine.
- Keyboard and Controllers: gamepads, the mouse and the shortcuts.