platform-pcw8256
Folders and files
Name | Name | Last commit date | ||
---|---|---|---|---|
parent directory.. | ||||
An UZI target for the Amstrad PCW series computers 16K banked memory with flexible bank setting. Programs for now (until brk() is done right) get 64K in four consecutive page numbers. The UAREA is mapped high at 0xF900 with the process and irq stacks following and a copy of the common area beyond (so we have a sort of common code area as needed) The very top of memory must be free as the top of bank 3 (top of OS kernel mapping) is "magically" the keyboard mappings. Need to try and keep kernel under 48K or so to make it easier to handle the screen memory, fonts etc. We need to put the screen (720x256 pixels + roller ram table of 512 bytes or so = ~ 24K) in the low 128K WIP - lots to do to add swap support and memory map needs a re-arrange so we can get fork() going FIXME: - Move disk buffers into own bank and use external disk buffers to keep under the 48K line Supported Hardware (all only in early test) ------------------ Amstrad PCW 8256 Amstrad PCW 8512 Joyce emulation of the above Planned: Amstrad PCW 9256/9256+/9512/9512+/PCW10 (need a subtly different boot disk) Options: CF2 floppy CF2DD floppy 3.5" floppy (need to sort seek rates better) UIDE Fake IDE on xjoyce CPS8256 and clones (parallel port not yet done) AMX mouse Kempston Mouse Kempston Joystick Planned: Keyboard mouse/joystick hacks Centronics on CPS8256 Standalone centronics DKTronics sound Not Supported: Other printers SCA Mark2 RTC Locolink Other hard disk controllers Building A Boot Image --------------------- edit Makefile and set it to z80, platform pcw8256 make clean; make cd platform-pcw8256/BOOTBLOCK zmac 765.s # Make a blank disc dd if=/dev/zero of=bootdisk.raw bs=512 count=360 # Add the boot block in sector 0 dd if=platform-pcw8256/BOOBLOCK/765.cim of=bootdisk.raw conv=notrunc # Add the kernel dd if=fuzix.bin of=bootdisk.raw bs=512 seek=1 conv=notrunc # Start the emulator xjoyce Hit F3 (Boot from alternative disc) Boot From =>Other Enter filename for disc image Disc file... select bootdisk.raw Advanced Raw disc image file OK OK Should boot and detect the drives then prompt bootdev: At that point the keyboard should work. The floppy driver is incomplete but given a rootfs image on /dev/fd1 you should be able to at least get it to mount device 256 = fd0 257 = fd1 (0-255 are the UIDE hard disks, or FID hard disks on Joyce) Mixed boot/root images are not currently supported (this just needs a modified boot block that starts at a different offset) Memory ------ Then PCW8256 memory is split into multiple banks not all of which can be used for any purpose The display takes 23040 bytes of video line memory. Each line must be within the low 128K and is indexed by the roller RAM The roller RAM must also be within the low 128K and is 512 bytes. The keyboard magically replaces the top 16 bytes of bank 3. Our loader puts the screen into bank 4 and bank 5 (part of), then loads the OS into bank 0/1/2/3. Other work needed here is to put the buffer cache at the end followed by the font data if we do it this way, then discard. At that point we can move the font into video mappings. Right now bank 0-3 are fully used if we do the buffer reclaim (which gets us a nice 12 or so extra buffers), bank 4 is all video and bank 5 would have 5K left after the fonts. An obvious use for that would be to go to 256 byte tty queues and add ptys - (costing us about 3K) Other candidates would be the low level graphics rendering routines as we'll want those for a graphics mode (or we need to support an mmap like mode for direct mapping a 16K graphics window over the app memory)