platform-sbcv2
Folders and files
Name | Name | Last commit date | ||
---|---|---|---|---|
parent directory.. | ||||
Retrobrew (formerly N8VEM *) SBCv2 This port is intended as a reference port for simple systems. The mark 2 SBC is a single board hobby Z80 based computer. It has 512K of RAM and 512K or 1MB of Flash. The upper 32K of the address space is fixed as the top 32K of the 512K RAM. The lower 32K can be switched to any 32K bank of the ROM or RAM. Onboard I/O is limited to a 16550A UART providing a serial port and some modem control lines, and an 8255 PIO that is normally used to connect a PPIDE adapter. A bitbanged DS1302 real time clock is also provided but no timer interrupt. The only interrupt available is either from the optional ECB backplane and add in cards, or from the 16550A, but not both. The onboard firmware (ROMWBW) provides a monitor, BIOS and also CP/M or ZSystem. For simplicity Fuzix is currently booted from the OS. (*) Andrew N8VEM is no longer involved in the SBC project and it was renamed at his request to avoid confusion. Supported Hardware SBC v2 Optional PPIDE adapter for IDE disks or CF cards Optional ECB PropIOv2 for keyboard/VGA console/SD card interface (currently the PropIOv2 is required - this will get fixed soon) RBC-MC (only emulation tested so far) A similar system but with slightly different memory mapping registers Hardware For more information, where to get boards etc please see: http://www.retrobrewcomputers.org Implementation This platform uses the standard banked memory model. One lower 32K bank is assigned to the kernel (Bank 14). The upper memory is fixed at bank 15, and bank 0-13 are available to applications, one per bank. During execution the current per process data and stack (udata) live in the upper bank near the top of memory. When a process is switched out they are saved into the top of the low 32K space. Memory Layout Kernel 0000-00FF Interrupt vectors 0100-7FFF Kernel code User 0000-00FF Interrupt vectors 0100-7DFF User process (currently 7CFF needs fixing) 7E00-7FFF Copy of task kernel stack and variables 8000-???? Kernel ????-EFFF Disk buffers F000-FDFF Kernel common area and stacks FE00-FFFF Reserved for firmware Notes There are a variety of clever things that could be done to make this platform more useful but at a cost. Firstly there is a lot of space free in the top 32K so 8000-AFFF could probably be made user space and copied in and out each task switch. As a single user machine doesn't switch much the cost isn't too high and more becomes possible. Oddities The SBCv2 by default has no timer interrupt. This means that time based pre-emption cannot be performed, and the terminal will only be responsive when the system is waiting for user activity (except the UART if it has interrupts enabled). The code supports connecting a 10Hz clock source to a serial control line to provide a real clock, and also routing the ECB interrupt using the same hack. Some ECB cards can provide a timer interrupt. These are not presently supported. Working With The Simulator Making A Filesystem Build a 16MB file system cd Standalone/filesystem-src ./build-filesystem fuzix.fs 256 32768 For IDE makedisk 3 rbc.ide dd if=rbc.ide of=rbc.raw bs=512 skip=2 fdisk rbc.raw Create a 16MB partition at sector offset 2048 - and any others you want Write the changes Quit dd if=fuzix.fs of=rbc.raw bs=512 seek=2048 conv=notrunc dd if=fuzix.romwbw of=rbc.raw bs=512 seek=2 conv=notrunc dd if=rbc.raw of=rbc.ide bs=512 seek=2 conv=notrunc If you need to update the filesystem then ucp supports offsets. You need a 2050 sector offset so you can do ucp rbc.ide:1049600 SD is similar but doesn't have the 1K header so you don't need to do the final step. Run the rbcv2 emulator with the option -t and at the boot prompt add the parameter "msr" in order to use 10Hz timer tick mode.