Blame

ef7d22 Bob Green 2026-11-01 15:50:45
1
# SBC3 Emulator
2
3
It's quite a time consuming programming cycle for both the monitor and NetBSD, for different raesons in each case:
4
- for the monitor, you build then have to burn an eprom which takes several minutes
5
- for NetBSD, you have to load a 4MB s-record file over serial - again, that's several minutes
6
7
It would therefore be very beneficial to have an emulator for the board that was good enough for most testing. Obviously, the final proof of the pie still has to be running on the board but with a good enough emulator, development time could be speeded up hugely.
8
9
## Step up, Mame
456d36 Bob Green 2026-11-02 08:55:24
10
Mame already has all the components we need to emulate an SBC-3, so it's simply a matter of creating a machine definition.
ef7d22 Bob Green 2026-11-01 15:50:45
11
12
## Using the emulator
13
ba7c8d Bob Green 2026-11-02 08:54:46
14
### ROM image
15
the emulator runs in two different ways:
16
- Boot into the ROM monitor
17
- Load a program (e.g. netbsd) into RAM and run it
18
19
If you wish to run the monitor, you'll need to provide a copy of it. You need to create a folder in the mame tree and put the file in there. Here's what I did:
20
```
21
bob@bsddev2:~/Mame-SBC/mame$ mkdir -p roms/sbc3
22
bob@bsddev2:~/Mame-SBC/mame$ cd roms/sbc3
23
bob@bsddev2:~/Mame-SBC/mame/roms/sbc3$ wget https://mega-micros.co.uk/system_roms/v2.05b118_68681/system_rom_v2.05b118_27c322.bin
24
bob@bsddev2:~/Mame-SBC/mame/roms/sbc3$ ln -s system_rom_v2.05b118_27c322.bin ./sbc3.bin
25
```
26
I use a symbolic link so that's I can have multiple monitors and use the symlink to set a default.
27
28
**Starting the emulator with the monitor**
ef7d22 Bob Green 2026-11-01 15:50:45
29
```
30
$ ./sbc3-term.sh -hard card.hd -quik netbsd
31
```
ba7c8d Bob Green 2026-11-02 08:54:46
32
33
**Starting the Emulator with a NetBSD image**
34
```
35
$ ./sbc3-term.sh -hard card.hd -quik netbsd
36
```
37
38
### Environment variables
39
Some aspects of the emulator can be overwritten using environment variables. See the table below for more details:
40
| Name | Function | Default |
41
| :--- | :--- | --- |
42
| BAUD | Sets the baud rate for the console port. | 230400 |
43
| JUMPERS | Change which jumpers (connected to IP0-5 on the duart) a present. Specify a list of numbers, from 0 to 5 inclusive. | 0 1 2 |