Update trsload80.s to work on real hardware
authorBart <bart-jeroen@hemstra.com>
Mon, 30 Jan 2017 16:06:02 +0000 (17:06 +0100)
committerGitHub <noreply@github.com>
Mon, 30 Jan 2017 16:06:02 +0000 (17:06 +0100)
commitc238eabf028aa20ff765b0f71c12b47f3258d0d0
treecc1a7d182b5f062611d9242e76563cf713b0bc0d
parent4f117698ff69376301f00306c076c78564e7d313
Update trsload80.s to work on real hardware

In order to run Fuzix on a real TRS-80 Model 4 some corrections have to be made to the bootloader:
- The correct mode was not selected, Video Page #1 needs to be selected. The emulator SDLTRS does not behave correctly; on a real Model 4 Video Page #0 starts on FC00 with a distorted screen as result. So: OUT (0x84),#0x86 is working correctly.
- Stackpointer out of the way on 0xEE00, doesn't overwrite code.
- The ctc6845 registers are not loaded correctly, they must be read in reverse order. So INC HL must be DEC HL and the label must be put at the end of the table.
- The Clear Screen routine was not implemented correctly.
- On a real Model 4 a formatted floppy must be used to boot. This will be a SDDD disk, 40 tracks, formatted for TRS-DOS 6 or LS-DOS 6. These formatted disks have 18 sectors per track, starting on sector 0 and ending on 17. So an extra DEC A is used and a test against sector 18 instead of 19.

With these changes the bootloader is still 256 bytes and now works on SDLTRS and on a real Model 4 128K. A real or virtual formatted floppy is necessary, so the instructions need an update as well.
Kernel/platform-trs80/trs80load.s