diff --git a/.gitignore b/.gitignore index 74ad88cc..bbedf387 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,7 @@ Binary/**/*.mym Binary/**/*.pt3 +!Binary/cpnos-wbw.sys Source/**/eeprom Source/Apps/Assign.com @@ -94,8 +95,8 @@ Tools/unix/zx/zx !Source/ZPM3/*.[Cc][Oo][Mm] !Source/ZSDOS/*.[Cc][Oo][Mm] !Source/ZRC/*.bin -!Source/ZZR/*.bin -!Source/ZZR/*.hex +!Source/ZZRC/*.bin +!Source/ZZRC/*.hex !Tools/cpm/** !Tools/unix/zx/* !Tools/zx/* diff --git a/Binary/RomList.txt b/Binary/RomList.txt deleted file mode 100644 index 49173a01..00000000 --- a/Binary/RomList.txt +++ /dev/null @@ -1,260 +0,0 @@ -*********************************************************************** -*** *** -*** R o m W B W *** -*** *** -*** Z80/Z180 System Software *** -*** *** -*********************************************************************** - -This directory ("Binary") is part of the RomWBW System Software -distribution archive. Refer to the ReadMe.txt file in this -directory for more information on the overall contents of the -directory. - -When distributed, RomWBW contains a set of pre-built ROM images that -are ready to program onto the EEPROM of any of the Z80/Z180 based -RetroBrew Computers CPU boards. Additionally, any custom built ROM -images will be placed in this directory. - -All of the pre-built ROM images are 512KB. This size is compatible -with all of the Z80/Z180 systems. Some systems can accept different -size ROM images. Creating alternative sizes requires a custom ROM -build (see ReadMe.txt in the Source directory). - -It is critical that the right ROM Imgae be selected for the target -platform being used. The table below indicates the correct ROM -image to use for each platform: - - SBC V1/V2 SBC_std.rom - SBC SimH SBC_simh.rom - Zeta V1 ZETA_std.rom - Zeta V2 ZETA2_std.rom - N8 N8_std.rom - Mark IV MK4_std.rom - RC2014 w/ Z80 RCZ80_std.rom - RC2014 w/ Z180 RCZ180_nat.rom (native Z180 memory addressing) - RC2014 w/ Z180 RCZ180_ext.rom (external 512K RAM/ROM module) - SC-series SC126, SC130, SC131 - Easy Z80 EZZ180_std.rom - Dyno DYNO_std.rom - -You will find there is one additional ROM image called -"UNA_std.rom". This ROM image is an UNA-based RomWBW ROM image. As -such, this ROM image can be used on any Z80/Z180 platform supported -by John Coffman's UNA BIOS. Refer to RetroBrew Computers Wiki for -more information on UNA hardware support. - -For each of the ROM Images (".rom"), there are corresponding files -with the extensions of ".com" and ".img". The .com variant can be -copied to a functional RomWBW-based system and executed like a -normal application under CP/M or Z-System. This will load the new -ROM on-the-fly. It is an excellent way to test a ROM Image before -actually burning it. Similarly, the .img files can be loaded using -the UNA FAT loader for testing. - -All of the standard ROM Images are configured for: - - 512KB ROM Disk - - 512KB RAM Disk - - 38.4Kbps baud serial console (*) - - Auto-discovery of all serial ports - -* RC2014 and Stephen Cousins' kits run at 115,200Kbps baud - -All hard disk type devices (IDE, PPIDE, CF Card, SD Card) will be -automatically assigned at least two drive letters per device. The -drive letters will refer to the first 2 slices of the device. The -ASSIGN command can be used to display and reassign drives to disk -devices and slices as desired. - -Standard ROM Image Notes ------------------------- - -The standard ROM images will detect and install support for certain -devices and peripherals that are on-board or frequently used with -each platform as documented below. If the device or peripheral is -not detected at boot, the ROM will simply bypass support -appropriately. - -SBC (SBC_std.rom): - - CPU speed is detected at startup - - Console on onboard UART serial port at 38400 baud - - Includes support for PPIDE/CF Card(s) connected to on-board - parallel port. - - Includes support for CVDU and VGA3 boards. If detected at - startup, support for video and keyboard is installed - including VT-100/ANSI terminal emulation. - - Auto detects DiskIO v3 floppy disk controller and installs - support for two attached 3.5" floppy disks if found - - Auto-detects PropIO or PropIO V2 and installs associated - video, keyboard and SD Card support if present. - - If PropIO, PropIO V2, CVDU, or VGA hardware is detected, - initial console output is determined by JP2. If JP2 is - shorted, console will go to on-board serial port, if JP2 - is open, console will go to the detected video and keyboard - ports. - - SBC V1 has a known race condition in the bank switching - circuit which is likely to cause system instability. SBC - V2 does not have this issue. - -SBC (SBC_simh.rom): - - SBC variant customized to run under SimH - - Implments two emulated SimH hard disk images - - Uses SimH RTC - -ZETA (ZETA_std.rom): - - CPU speed is detected at startup - - Console on onboard UART serial port at 38400 baud - - Auto-detects FDC and installs 3.5" disk support - if found - - Auto detects on-board floppy disk controller and installs - support for one attached 3.5" floppy disk if found - - Auto-detects ParPortProp and includes support for it if it - is attached. - - If ParPortProp is installed, initial console output is - determined by JP1. If JP1 is shorted, console will go to - on-board serial port, if JP1 is open, console will go to - ParPortProp video and keyboard ports. - -ZETA2 (ZETA2_std.rom): - - CPU speed is detected at startup - - Console on onboard UART serial port at 38400 baud - - Auto detects on-board floppy disk controller and installs - support for one attached 3.5" floppy disk if found - - Auto-detects ParPortProp and includes support for it if it - is attached. - - Uses CTC to generate periodic timer interrupts. - - If ParPortProp is installed, initial console output is - determined by JP1. If JP1 is shorted, console will go to - on-board serial port, if JP1 is open, console will go to - ParPortProp video and keyboard ports. - -N8 (N8_std.rom): - - CPU speed is detected at startup - - Console on Z180 onboard primary ASCI serial port at 38400 baud - - Auto detects onboard floppy disk controller and installs - support for two attached 3.5" floppy disks if found - - Includes support for on-board TMS9918 video and keyboard - including VT-100/ANSI terminal emulation. - - Includes support for on-board SD Card as hard disk and - assumes a production level N8 board (date code >= 2312). - -MK4 (MK4_std.rom): - - CPU speed is detected at startup - - Console on Z180 onboard primary ASCI serial port at 38400 baud - - Includes support for on-board IDE port (CF Card via adapter). - - Includes support for on-board SD Card port. - - Auto detects Dual IDE floppy disk controller and installs - support for two attached 3.5" floppy disks if found - - Auto-detects PropIO or PropIO V2 and installs associated - video, keyboard and SD Card support if present. - - Includes support for CVDU and VGA3 boards. If detected at - startup, support for video and keyboard is installed - including VT-100/ANSI terminal emulation. - -RCZ80 (RCZ80_std.rom): - - Assumes CPU oscillator of 7.3728 MHz - - Requires 512K RAM/ROM module - - Auto detects Serial I/O Module (ACIA), Dual Serial - Module (SIO/2), and EP Dual UART. - - Console on whichever serial module is installed, - order of priority is UART, SIO, then ACIA. - - Baud rate is determined by hardware, but normally 115200. - - Auto support for RC2014 Compact Flash Module - - Auto support for RC2014 PPIDE Module - - Support for Scott Baker SIO board may be enabled in config - - Auto detects WDC floppy disk controller and installs - support for two attached 3.5" floppy disks if found - - Support for SMC floppy controller may be enabled in config - - Support for J.B. Lang TMS9918 video card may be enabled in config - - Support for PropIO V2 may be enabled in config (PRPENABLE). If - enabled, will auto-detect and install associated - video, keyboard and SD Card support if present. - -RCZ80 w/ KIO (RCZ80_kio.rom): - - Same as RCZ80_std - - Requires KIO module - - SIO ports provided by KIO - -RCZ180 (RCZ180_nat.rom & RCZ180_ext.rom): - - Assumes CPU oscillator of 18.432 MHz - - Console on Z180 onboard primary ASCI serial port at 115200 baud - - Auto support for RC2014 Compact Flash Module - - Auto support for RC2014 PPIDE Module - - Support for alternative serial modules may be enabled in config - - Auto detects WDC floppy disk controller and installs - support for two attached 3.5" floppy disks if found - - Support for SMC floppy controller may be enabled in config - - Support for J.B. Lang TMS9918 video card may be enabled in config - - You must pick the variant (_ext or _nat) depending - on which memory module you are using: - - RCZ180_ext.rom uses external bank management to access - memory, such as the 512K RAM/ROM module. - - RCZ180_nat.rom uses the built-in Z180 memory manager - for use with memory modules using direct physical - addressing of memory, such as the SC119. - - Support for PropIO V2 may be enabled in config (PRPENABLE). If - enabled, will auto-detect and install associated - video, keyboard and SD Card support if present. - -RCZ280 (RCZ280_ext.rom, RCZ280_nat.rom, RCZ280_nat_zz.rom): - - Assumes CPU oscillator of 24 MHz - - Bus clock will be 6 MHz or 12 MHz, so does not match RC2014 standard!!! - - Requires 512K RAM/ROM module (unless using ZZ80MB) - - Auto detects Serial I/O Module (ACIA), Dual Serial - Module (SIO), EP Dual UART (DUART), and built-in Z280 UART (Z2U). - - ACIA module is only supported on _ext variant. - - Built-in Z280 UART (Z2U) is buffered and interrupt driven only - on _nat and _nat_zz variants. It uses polling I/O on _ext. - - Console on whichever serial module is installed, - order of priority is Z2U, UART, SIO, DUART, ACIA - - Baud rate is determined by hardware, but normally 115200. - - Auto support for RC2014 Compact Flash Module - - Auto support for RC2014 PPIDE Module - - Support for Scott Baker SIO board may be enabled in config - - Auto detects WDC floppy disk controller and installs - support for two attached 3.5" floppy disks if found - - Support for SMC floppy controllers may be enabled in config - - Support for J.B. Lang TMS9918 video card may be enabled in config - - You must pick the variant (_ext, _nat, or _nat_zz) depending - on which platform or memory module you are using: - - RCZ280_ext.rom uses external bank management to access - memory, such as the 512K RAM/ROM module. - - RCZ280_nat.rom uses the built-in Z280 memory manager - for use with memory modules using direct physical - addressing of memory, such as the SC119. - - RCZ280_nat_zz.rom is specifically for the ZZ80MB platform - which has both CPU and memory onboard. - - Support for PropIO V2 may be enabled in config (PRPENABLE). If - enabled, will auto-detect and install associated - video, keyboard and SD Card support if present. - -SCZ180 (SCZ180_126.rom, SCZ180_130.rom, SCZ180_131.rom, SCZ140.rom): - - Same as RCZ180 - - Adds auto support for onboard SPI SD Card - - The 4 different variants of SCZ180 are provided to match the - 4 corresponding systems (SC126, SC130, SC131, and SC140) - designed by Stephen Cousins. - - Support for PropIO V2 may be enabled in config (PRPENABLE). If - enabled, will auto-detect and install associated - video, keyboard and SD Card support if present. - -EZZ80 (EZZ80_std.rom): - - Assumes CPU oscillator of 10.000 MHz - - Console on primary SIO serial port at 115200 baud - - Includes support for on-board SIO - - Auto support for RC2014 Compact Flash Module - - Auto support for RC2014 PPIDE Module - - Auto detects WDC floppy disk controller and installs - support for two attached 3.5" floppy disks if found - - Support for SMC floppy controllers may be enabled in config - - Support for PropIO V2 may be enabled in config (PRPENABLE). If - enabled, will auto-detect and install associated - video, keyboard and SD Card support if present. - -DYNO (DYNO_std.rom): - - Assumes CPU oscillator of 18.432 MHz - - Console on Z180 onboard serial ports at 38400 baud - - Includes support for BQ4842 RTC - - Auto detects Dyno floppy disk controller and installs - support for two attached 3.5" floppy disks if found - - Includes support for onboard PPIDE diff --git a/Binary/cpnos-wbw.sys b/Binary/cpnos-wbw.sys new file mode 100644 index 00000000..f0bdc137 Binary files /dev/null and b/Binary/cpnos-wbw.sys differ diff --git a/Doc/ChangeLog.txt b/Doc/ChangeLog.txt index 44d037c0..50cfed09 100644 --- a/Doc/ChangeLog.txt +++ b/Doc/ChangeLog.txt @@ -68,6 +68,7 @@ Version 3.1.1 - L?N: Updated ZDE to v1.8 including time stamp preservation fixes - D?M: Minor update to CP/NET client files, fix to CPNBOOT - WBW: Added p-System IV.0 Z80 implementation +- WBW: Hacked SURVEY to work around bank switching crash Version 3.1 ----------- diff --git a/Doc/RomWBW Applications.pdf b/Doc/RomWBW Applications.pdf index 23001114..bceb29e6 100644 Binary files a/Doc/RomWBW Applications.pdf and b/Doc/RomWBW Applications.pdf differ diff --git a/Doc/RomWBW Disk Catalog.pdf b/Doc/RomWBW Disk Catalog.pdf index b3326d38..58790083 100644 Binary files a/Doc/RomWBW Disk Catalog.pdf and b/Doc/RomWBW Disk Catalog.pdf differ diff --git a/Doc/RomWBW Errata.pdf b/Doc/RomWBW Errata.pdf index 1a718b77..fddb16bf 100644 Binary files a/Doc/RomWBW Errata.pdf and b/Doc/RomWBW Errata.pdf differ diff --git a/Doc/RomWBW ROM Applications.pdf b/Doc/RomWBW ROM Applications.pdf index 809b01ac..95eb34f0 100644 Binary files a/Doc/RomWBW ROM Applications.pdf and b/Doc/RomWBW ROM Applications.pdf differ diff --git a/Doc/RomWBW System Guide.pdf b/Doc/RomWBW System Guide.pdf index 475a2e63..e9dc86a1 100644 Binary files a/Doc/RomWBW System Guide.pdf and b/Doc/RomWBW System Guide.pdf differ diff --git a/Doc/RomWBW User Guide.pdf b/Doc/RomWBW User Guide.pdf index b38d638e..1cae6c7e 100644 Binary files a/Doc/RomWBW User Guide.pdf and b/Doc/RomWBW User Guide.pdf differ diff --git a/Doc/Z180 ASCI Baud Rate Options.pdf b/Doc/Z180 ASCI Baud Rate Options.pdf index 0786fcbe..9e48d821 100644 Binary files a/Doc/Z180 ASCI Baud Rate Options.pdf and b/Doc/Z180 ASCI Baud Rate Options.pdf differ diff --git a/ReadMe.md b/ReadMe.md index f3d034a3..03041195 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -3,7 +3,7 @@ **RomWBW ReadMe** \ Version 3.1 Pre-release \ Wayne Warthen ([wwarthen@gmail.com](mailto:wwarthen@gmail.com)) \ -07 Feb 2023 +13 Feb 2023 # Overview diff --git a/ReadMe.txt b/ReadMe.txt index 8bd8b8b4..27a9166f 100644 --- a/ReadMe.txt +++ b/ReadMe.txt @@ -1,6 +1,6 @@ RomWBW ReadMe Wayne Warthen (wwarthen@gmail.com) -07 Feb 2023 +13 Feb 2023 diff --git a/Source/Apps/Build.cmd b/Source/Apps/Build.cmd index 675d1f44..1396ca29 100644 --- a/Source/Apps/Build.cmd +++ b/Source/Apps/Build.cmd @@ -21,9 +21,6 @@ call :asm rtchb || exit /b zxcc Z80ASM -SYSGEN/F || exit /b -zxcc MAC SURVEY.ASM -$PO || exit /b -zxcc MLOAD25 -SURVEY.COM=SURVEY.HEX || exit /b - pushd XM && call Build || exit /b & popd pushd FDU && call Build || exit /b & popd pushd Tune && call Build || exit /b & popd @@ -34,6 +31,7 @@ pushd ZMD && call Build || exit /b & popd pushd Dev && call Build || exit /b & popd pushd VGM && call Build || exit /b & popd pushd cpuspd && call Build || exit /b & popd +pushd Survey && call Build || exit /b & popd copy *.com %APPBIN%\ || exit /b diff --git a/Source/Apps/Clean.cmd b/Source/Apps/Clean.cmd index 198f461d..e60ceb53 100644 --- a/Source/Apps/Clean.cmd +++ b/Source/Apps/Clean.cmd @@ -17,3 +17,4 @@ pushd ZMD && call Clean || exit /b 1 & popd pushd Dev && call Clean || exit /b 1 & popd pushd VGM && call Clean || exit /b 1 & popd pushd cpuspd && call Clean || exit /b 1 & popd +pushd Survey && call Clean || exit /b 1 & popd diff --git a/Source/Apps/Makefile b/Source/Apps/Makefile index 96d2411c..03bacb2c 100644 --- a/Source/Apps/Makefile +++ b/Source/Apps/Makefile @@ -1,13 +1,9 @@ -OBJECTS = sysgen.com survey.com \ - syscopy.com assign.com format.com talk.com mode.com rtc.com \ - timer.com rtchb.com -SUBDIRS = XM FDU FAT Tune Test ZMP ZMD Dev VGM cpuspd +OBJECTS = sysgen.com syscopy.com assign.com format.com talk.com \ + mode.com rtc.com timer.com rtchb.com +SUBDIRS = XM FDU FAT Tune Test ZMP ZMD Dev VGM cpuspd Survey DEST = ../../Binary/Apps TOOLS =../../Tools include $(TOOLS)/Makefile.inc USETASM = 1 - -survey.com: USETASM = 0 - diff --git a/Source/Apps/Survey/Build.cmd b/Source/Apps/Survey/Build.cmd new file mode 100644 index 00000000..f8b59a23 --- /dev/null +++ b/Source/Apps/Survey/Build.cmd @@ -0,0 +1,16 @@ +@echo off +setlocal + +set TOOLS=..\..\..\Tools + +set PATH=%TOOLS%\zxcc;%PATH% + +set CPMDIR80=%TOOLS%/cpm/ + +:: zxcc MAC survey.asm -$PO || exit /b +:: zxcc MLOAD25 survey || exit /b + +zxcc M80 -,=survey/L/R +zxcc L80 -survey,survey/N/E + +copy /Y survey.com ..\..\..\Binary\Apps\ || exit /b diff --git a/Source/Apps/Survey/Clean.cmd b/Source/Apps/Survey/Clean.cmd new file mode 100644 index 00000000..14eed93d --- /dev/null +++ b/Source/Apps/Survey/Clean.cmd @@ -0,0 +1,8 @@ +@echo off +setlocal + +if exist *.hex del *.hex +if exist *.rel del *.rel +if exist *.prn del *.prn +if exist *.lst del *.lst +if exist *.com del *.com diff --git a/Source/Apps/Survey/Makefile b/Source/Apps/Survey/Makefile new file mode 100644 index 00000000..5fbf081e --- /dev/null +++ b/Source/Apps/Survey/Makefile @@ -0,0 +1,6 @@ +OBJECTS = survey.com +DEST = ../../../Binary/Apps +TOOLS = ../../../Tools +OTHERS = *.hex + +include $(TOOLS)/Makefile.inc diff --git a/Source/Apps/survey.asm b/Source/Apps/Survey/survey.mac similarity index 90% rename from Source/Apps/survey.asm rename to Source/Apps/Survey/survey.mac index f049be90..b341e485 100644 --- a/Source/Apps/survey.asm +++ b/Source/Apps/Survey/survey.mac @@ -15,6 +15,10 @@ ; ;VERSION LIST - Most recent version first. ; +;10/Feb/23 - Total hack to avoid crash on ECB SBC +; RomWBW now required by this version +; Wayne Warthen +; ;16/Dec/17 - Handle 16-bit port addressing using ; Z80 IN A,(C) instruction. Wayne Warthen ; @@ -234,7 +238,21 @@ TABS EQU 9 ; Tab columns ; MAIN PROGRAM ; ;***********************; ; - ORG 100H + ;ORG 100H +; +; +; + .Z80 + LD HL,IMGORG + LD DE,START + LD BC,IMGEND-IMGORG + LDIR + JP START + .8080 +; +IMGORG: +; + .PHASE 8000H ; START: LXI H,0 ; Save stack pointer @@ -242,7 +260,8 @@ START: SHLD OLDSP LXI SP,FINIS+64 CALL TYPE ; Type initial CRLF - DB TAB,TAB,'*** System Survey (December 17) ***' + DW CRLF,CRLF + DB TAB,'*** RomWBW System Survey (Feb 2023) ***' DW CRLF,CRLFE ;DISK SURVEY @@ -586,6 +605,13 @@ PDLY: MOV A,H ; ON CONSOLE STATUS PORT ORA L JNZ PDLY +; + .Z80 + ; RECORD THE ACTIVE BANK + LD A,(0FFE0H) ; GET CURRENT HBIOS BANK ID + LD (BANK),A ; AND SAVE IT + .8080 +; LXI H,0 ; Init active port counter mvi d,0 ; Init port counter mvi e,0ffh ; init port group variable @@ -596,11 +622,23 @@ PORTLP: CPI SKIPORT JZ ISPORT ; Print mask port ENDIF - +; mov c,a ; port number to reg c mvi b,0 ; for 16 bit port addressing - db 0edh,078h ; z80: in a,(c) + .Z80 + in a,(c) + .8080 +; + .Z80 + ; MAKE SURE CORRECT BANK IS STILL SELECTED! + push af + ld a,(BANK) + call 0FFF3H + pop af + .8080 +; ; inactive port could return 0xFF or 0x78 or the port address +; cmp c jz nextpt cpi 0FFh @@ -708,7 +746,6 @@ BITSHF: JNZ BITSHF RET - ;***********************; ; DATA STORAGE ; ;***********************; @@ -722,6 +759,12 @@ RAMF: DS 1 ; RAM good flag EMPF: DS 1 ; Empty so far flag BLKSHF: DS 1 ; block shift factor MAXALL: DS 2 ; maximum block number +BANK: DS 1 ; saved HBIOS bank id FINIS EQU $ ; End of program +; + .DEPHASE +; +IMGEND: +; END  \ No newline at end of file diff --git a/Source/Build.cmd b/Source/Build.cmd index 82506681..e349a4d1 100644 --- a/Source/Build.cmd +++ b/Source/Build.cmd @@ -8,7 +8,7 @@ call BuildShared || exit /b call BuildImages || exit /b call BuildROM %* || exit /b call BuildZRC || exit /b -call BuildZZR || exit /b +call BuildZZRC || exit /b if "%1" == "dist" ( call Clean || exit /b diff --git a/Source/BuildZZR.cmd b/Source/BuildZZR.cmd deleted file mode 100644 index 36ec56a7..00000000 --- a/Source/BuildZZR.cmd +++ /dev/null @@ -1,4 +0,0 @@ -@echo off -setlocal - -pushd ZZR && call Build || exit /b & popd diff --git a/Source/BuildZZRC.cmd b/Source/BuildZZRC.cmd new file mode 100644 index 00000000..4f5d2fa1 --- /dev/null +++ b/Source/BuildZZRC.cmd @@ -0,0 +1,4 @@ +@echo off +setlocal + +pushd ZZRC && call Build || exit /b & popd diff --git a/Source/CPM3/genbnk.dat b/Source/CPM3/genbnk.dat index 7ece8384..4dccf1fb 100644 --- a/Source/CPM3/genbnk.dat +++ b/Source/CPM3/genbnk.dat @@ -9,7 +9,7 @@ BNKSWT = Y COMBAS = 80 LERROR = Y NUMSEGS = 04 -MEMSEG00 = 01,43,00 +MEMSEG00 = 01,17,00 MEMSEG01 = 0E,72,02 MEMSEG02 = 01,7F,03 MEMSEG03 = 01,7F,04 diff --git a/Source/Clean.cmd b/Source/Clean.cmd index d3b69d40..ebd9f7d4 100644 --- a/Source/Clean.cmd +++ b/Source/Clean.cmd @@ -20,3 +20,5 @@ pushd Images && call Clean & popd pushd Prop && call Clean & popd pushd RomDsk && call Clean & popd pushd Doc && call Clean & popd +pushd ZRC && call Clean & popd +pushd ZZRC && call Clean & popd diff --git a/Source/Doc/Basic.h b/Source/Doc/Basic.h index e43876e9..4cf403cd 100644 --- a/Source/Doc/Basic.h +++ b/Source/Doc/Basic.h @@ -34,10 +34,12 @@ colorlinks: true # sansfont: helvetic sansfont: roboto # sansfont: bera +# sansfont: DejaVuSans # sansfont: arial monofont: roboto-mono # monofont: bera # monofont: inconsolata +# monofont: DejaVuSansMono monofontoptions: 'Scale=0.75' header-includes: - | diff --git a/Source/Doc/Build.cmd b/Source/Doc/Build.cmd index dc15293c..14ac1187 100644 --- a/Source/Doc/Build.cmd +++ b/Source/Doc/Build.cmd @@ -42,7 +42,7 @@ echo Processing document %1... ::gpp -o %1.tmp -U "" "" "(" "," ")" "(" ")" "#" "" -M "#" "\n" " " " " "\n" "(" ")" %1.md gpp -o %1.tmp -U "$" "$" "{" "}{" "}$" "{" "}" "@@@" "" -M "$" "$" "{" "}{" "}$" "{" "}" %1.md || exit /b -::pandoc %1.tmp -f markdown -s -o %1.tex --default-image-extension=pdf || exit /b +::pandoc %1.tmp -f markdown -t latex -s -o %1.tex --default-image-extension=pdf || exit /b ::::rem texify --pdf --clean %1.ltx || exit /b ::texify --pdf --clean --engine=luatex --verbose %1.tex || exit /b ::goto :eof diff --git a/Source/Doc/SystemGuide.md b/Source/Doc/SystemGuide.md index e9837a7a..6cd9c50e 100644 --- a/Source/Doc/SystemGuide.md +++ b/Source/Doc/SystemGuide.md @@ -1,41 +1,44 @@ $define{doc_title}{System Guide}$ $include{"Book.h"}$ -Overview -======== - -RomWBW provides a complete firmware package for all of the Z80 and Z180 -based systems that are available in the RetroBrew Computers Community -(see -[http://www.retrobrewcomputers.org](http://www.retrobrewcomputers.org/)) -as well as support for the RC2014 platform. Each of these systems -provides for a fairly large ROM memory (typically, 512KB or more). -RomWBW allows you to configure and build appropriate contents for such a -ROM. - -Typically, a computer will contain a small ROM that contains the BIOS -(Basic Input/Output System) functions as well as code to start the -system by booting an operating system from a disk. Since the RetroBrew -Computers Projects provide a large ROM space, RomWBW provides a much -more comprehensive software package. In fact, it is entirely possible to -run a fully functioning RetroBrew Computers System with nothing but the -ROM. - -RomWBW firmware includes: - -* System startup code (bootstrap) +# Overview + +The objective of RomWBW is to provide firmware, operating systems, +and applications targeting the Z80 family of CPUs. The firmware, +in the form of a ROM module, acts as the hardware interface layer +with a well-defined API (the HBIOS). The associated operating +systems and applications are adapted to the HBIOS API, not specific +hardware. + +The HBIOS is modular and configurable. New hardware interfaces can +be added in the form of straightforward driver modules. Within certain +constraints, new hardware platforms can be supported by simply +adjusting values in a build configuration file. + +RomWBW is geared toward hardware being developed in modern +retro-computing hobbyist communities, not as a replacement for +legacy hardware. As a result, RomWBW requires at least 128KB +of bank switched RAM. + +The CP/M family of operating systems has been adapted to run under +RomWBW including CP/M 2.2, Z-System, CP/M 3, and several other +variants. + +RomWBW firmware (ROM) includes: + +* System startup code (bootstrap) and bootloader * A basic system/debug monitor -* HBIOS (Hardware BIOS) providing support for the vast majority of -RetroBrew Computers I/O components +* HBIOS (Hardware BIOS) with support for most typical hardware + components used in Z80 family computers * Diagnostics and customizable debugging information. -* A complete operating system (either CP/M 2.2 or ZSDOS 1.1) +* ROM-hosted operating systems (both CP/M 2.2 and Z-System) -* A built-in CP/M filesystem containing the basic applications and -utilities for the operating system and hardware being used +* A ROM disk containing the standard OS applications and a + RAM disk for working storage. It is appropriate to note that much of the code and components that make up a complete RomWBW package are derived from pre-existing work. Most @@ -43,44 +46,40 @@ notably, the embedded operating system is simply a ROM-based copy of generic CP/M or ZSDOS. Much of the hardware support code was originally produced by other members of the RetroBrew Computers Community. -The remainder of this document will focus on the HBIOS portion of the -ROM. HBIOS contains the vast majority of the custom-developed code for -the RetroBrew Computers hardware platforms. It provides a formal, -structured interface that allows the operating system to be hosted with -relative ease. +The remainder of this document focuses on HBIOS which is the +fundamental basis of RomWBW. -Background -========== +# Background The Z80 CPU architecture has a limited, 64K address range. In general, this address space must accommodate a running application, disk operating system, and hardware support code. -All RetroBrew Computers Z80 CPU platforms provide a physical address -space that is much larger than the CPU address space (typically 512K or -1MB physical RAM). This additional memory can be made available to the -CPU using a technique called bank switching. To achieve this, the -physical memory is divided up into chunks (banks) of 32K each. A +Modern retro-computing Z80 CPU platforms provide a physical address +space that is much larger than the CPU address space (typically 512K or +1MB of physical RAM). This additional memory can be made available to +the CPU using a technique called bank switching. To achieve this, the +physical memory is divided up into chunks (banks) of 32K each. A designated area of the CPU's 64K address space is then reserved to "map" -any of the physical memory chunks. You can think of this as a window -that can be adjusted to view portions of the physical memory in 32K -blocks. In the case of RetroBrew Computers platforms, the lower 32K of -the CPU address space is used for this purpose (the window). The upper -32K of CPU address space is assigned a fixed 32K area of physical memory -that never changes. The lower 32K can be "mapped" on the fly to any of -the 32K banks of physical memory at a time. The only constraint is that -the CPU cannot be executing code in the lower 32K of CPU address space -at the time that a bank switch is performed. - -By cleverly utilizing the pages of physical RAM for specific purposes -and swapping in the correct page when needed, it is possible to utilize -substantially more than 64K of RAM. Because the RetroBrew Computers -Project has now produced a very large variety of hardware, it has become -extremely important to implement a bank switched solution to accommodate -the maximum range of hardware devices and desired functionality. - -General Design Strategy -======================= + any of the physical memory chunks. You can think of this as a window +that can be adjusted to view portions of the physical memory in 32K +blocks. In the case of RomWBW, the lower 32K of the CPU address space is + used for this purpose (the window). The upper 32K of CPU address space +is assigned a fixed 32K area of physical memory that never changes. The +lower 32K can be "mapped" on the fly to any of the 32K banks of physical + memory at a time. The only constraint is that the CPU cannot be +executing code in the lower 32K of CPU address space at the time that a +bank switch is performed. + +By utilizing the pages of physical RAM for specific purposes and +swapping in the correct page when needed, it is possible to utilize +substantially more than 64K of RAM. Because the retro-computing +community has now produced a very large variety of hardware, it has +become extremely important to implement a bank switched solution to +accommodate the maximum range of hardware devices and desired +functionality. + +# General Design Strategy The design goal is to locate as much of the hardware dependent code as possible out of normal 64KB CP/M address space and into a bank switched @@ -99,7 +98,7 @@ functions. Since the HBIOS proxy occupies only 512 bytes at the top of memory, the vast majority of the CPU memory is available to the operating system and the running application. As far as the operating system is concerned, all of the hardware driver code has been magically -implemented inside of a small 512 byte area at the top of the CPU +implemented inside of the small 512 byte area at the top of the CPU address space. Unlike some other Z80 bank switching schemes, there is no attempt to @@ -116,43 +115,67 @@ it is necessary that the customization of these operating systems take into account the banks of memory used by HBIOS and not attempt to use those specific banks. -Note that all code and data are located in RAM memory during normal -execution. While it is possible to use ROM memory to run code, it would -require that more upper memory be reserved for data storage. It is -simpler and more memory efficient to keep everything in RAM. At startup -(boot) all required code is copied to RAM for subsequent execution. +Note that all code and data are located in RAM memory during normal +execution. While it is possible to use ROM memory to run code, it would +require that more upper memory be reserved for data storage. It is +simpler and more memory efficient to keep everything in RAM. At startup +(boot) all required code is copied to RAM (shadowed) for subsequent +execution. -Runtime Memory Layout -===================== +# Runtime Memory Layout ![Bank Switched Memory Layout](Graphics/BankSwitchedMemory){ width=100% } -System Boot Process -=================== +# System Boot Process A multi-phase boot strategy is employed. This is necessary because at cold start, the CPU is executing code from ROM in lower memory which is the same area that is bank switched. -Boot Phase 1 copies the phase 2 code to upper memory and jumps to it to -continue the boot process. This is required because the CPU starts at -address $0000 in low memory. However, low memory is used as the area -for switching ROM/RAM banks in and out. Therefore, it is necessary to -relocate execution to high memory in order to initialize the RAM memory -banks. - -Boot Phase 2 manages the setup of the RAM page banks for HBIOS -operation, performs hardware initialization, and then executes the boot -loader. - -Boot Phase 3 is the loading of the selecting operating system (or debug -monitor) by the Boot Loader. The Boot Loader is responsible for -prompting the user to select a target operating system to load, loading -it into RAM, then transferring control to it. The Boot Loader is capable -of loading a target operating system from a variety of locations -including disk drives and ROM. - -Note that the entire boot process is entirely operating system agnostic. +RomWBW supports multiple boot techniques as described below. The +most common of these is the ROM boot. + +## ROM Boot + +The ROM boot process normally begins with a system cold start (power on +or hardware reset). The hardware is responsible for ensuring that the +lower 32K of CPU memory (bank window) is mapped to the initial 32K of +the ROM. The Z80 CPU begins execution at address zero which will be +address zero of the ROM. + +The following steps occur during the ROM boot process: + +#. The ROM code performs basic hardware initialization and ensures + that the top 32K of CPU memory is mapped to the proper RAM bank. + +#. The ROM code installs the HBIOS proxy code into the top 512 + bytes of the CPU memory (0xFE00-0xFFFF). + +#. Using the proxy code services, the full HBIOS code is copied + from the ROM bank to the RAM bank that it will use for normal + processing. + +#. Again using the proxy code services, the RAM copy of HBIOS is + activated in the bank window and execution transitions to the + RAM copy of HBIOS. + +#. The HBIOS initializes the system console so that output can now + be displayed to the user. + +#. The HBIOS now performs the full hardware discovery and initialization + process while displaying it's progress. + +#. The HBIOS displays a final summary of the hardware device unit + assignments and various configuration information. + +#. The HBIOS loads the RomWBW Boot Loader from ROM into RAM and + jumps to it. + +At this point, the user would normally use Boot Loader commands +to select and launch an operating system or applications from either +ROM or disk. + +Note that the boot process is entirely operating system agnostic. It is unaware of the operating system being loaded. The Boot Loader prompts the user for the location of the binary image to load, but does not know anything about what is being loaded (the image is usually an @@ -162,49 +185,17 @@ control to it. Assuming the typical situation where the image was an operating system, the loaded operating system will then perform it's own initialization and begin normal operation. -There are actually two ways to perform a system boot. The first, and -most commonly used, method is a "ROM Boot". This refers to booting the -system directly from the startup code contained on the physical ROM -chip. A ROM Boot is always performed upon power up or when a hardware -reset is performed. - -Once the system is running (operating system loaded), it is possible to -reboot the system from a system image contained on the file system. This -is referred to as an "Application Boot". This mechanism allows a -temporary copy of the system to be uploaded and stored on the file -system of an already running system and then used to boot the system. -This boot technique is useful to: 1) test a new build of a system image -before programming it to the ROM; or 2) easily switch between system -images on the fly. - -A more detailed explanation of these two boot processes is presented -below. - -ROM Boot --------- - -At power on (or hardware reset), ROM page 0 is automatically mapped to -lower memory by hardware level system initialization. Page Zero (first -256 bytes of the CPU address space) is reserved to contain dispatching -instructions for interrupt instructions. Address $0000 performs a jump -to the start of the phase 1 code so that this first page can be -reserved. - -The phase 1 code now copies the phase 2 code from lower memory to upper -memory and jumps to it. The phase 2 code now initializes the HBIOS by -copying the ROM resident HBIOS from ROM to RAM. It subsequently calls -the HBIOS initialization routine. Finally, it starts the Boot Loader -which prompts the user for the location of the target system image to -execute. - -Once the boot loader transfers control to the target system image, all -of the Phase 1, Phase 2, and Boot Loader code is abandoned and the space -it occupied is normally overwritten by the operating system. - -Application Boot ----------------- - -When a new system image is built, one of the output files produced is an +## Application Boot + +Once the system is running (operating system loaded), it is possible to +reboot the system from a system image (file) contained on the OS file +system. This is referred to as an "Application Boot". The process is +similar to a ROM boot, but the HBIOS code is loaded from an image file +instead of ROM. This boot technique is useful to: 1) test a new build +of a system image before programming it to the ROM; or 2) easily switch +between system images on the fly. + +During the RomWBW build process, one of the output files produced is an actual CP/M application (an executable .COM program file). Once you have a running CP/M (or compatible) system, you can upload/copy this application file to the filesystem. By executing this file, you will @@ -212,43 +203,35 @@ initiate an Application Boot using the system image contained in the application file itself. Upon execution, the Application Boot program is loaded into memory by -the previously running operating system starting at $0100. Note that -program image contains a copy of the HBIOS to be installed and run. Once +the previously running operating system starting at $0100. Note that the +program image contains a full copy of the HBIOS to be installed and run. Once the Application Boot program is loaded by the previous operating system, control is passed to it and it performs a system initialization similar -to the ROM Boot, but using the image loaded in RAM. +to the ROM Boot, but using the image loaded in RAM. Once te new +HBIOS completes it's initialization, it will launch the Boot Loader +just like a ROM boot. -Specifically, the code at $0100 (in low memory) copies phase 2 boot -code to upper memory and transfers control to it. The phase 2 boot code -copies the HBIOS image from application RAM to RAM, then calls the HBIOS -initialization routine. At this point, the prior HBIOS code has been -discarded and overwritten. Finally, the Boot Loader is invoked just like -a ROM Boot. +The Application Boot program actually contains two other components +beyond the new HBIOS. It has a copy of the Boot Loader and a copy of +the Z-System OS. This is done in case the new HBIOS requires updated +versions of the Boot Loader or OS to run. The Boot Loader is aware +of this boot mode and automatically adapts it's menu appropriately. -ROM-less Boot -------------- +If you restart your system, then it will revert to a ROM Boot from +the currently installed ROM. -Some hardware supported by RomWBW has a special mechanism for loading -the initial code. These systems have no ROM chips. However, they -have a small hardware bootstrap that loads a chunk of code from a -disk device directlly into RAM at system startup. +## RAM Boot + +Some hardware supported by RomWBW has a special mechanism for loading +the boot and HBIOS code. These systems have no ROM chips. However, +they have a small hardware bootstrap that loads a chunk of code from a +disk device directly into RAM at system startup. The startup then proceeds very much like the Application Boot process described above. HBIOS is installed in it's operating bank -and control is passed to the loader. - -Notes ------ - -1. Size of ROM disk and RAM disk will be decreased as needed to -accommodate RAM and ROM memory bank usage for the banked BIOS. - -2. There is no support for interrupt driven drivers at this time. Such -support should be possible in a variety of ways, but none are yet -implemented. +and control is passed to the Boot Loader. -Driver Model -============ +# Driver Model The framework code for bank switching also allows hardware drivers to be implemented mostly without concern for memory management. Drivers are @@ -259,19 +242,31 @@ requested function based on parameters passed in registers. Upon return, the bank switching framework takes care of restoring the original memory layout expected by the operating system and application. -However, the one constraint of hardware drivers is that any data buffers -that are to be returned to the operating system or applications must be -allocated in high memory. Buffers inside of the driver's memory bank -will be swapped out of the CPU address space when control is returned to -the operating system. +Drivers do need to be aware of the bank switching if a buffer address +is being used in the function call. -If the driver code must make calls to other code, drivers, or utilities -in the driver bank, it must make those calls directly (it must not use -RST 08). This is to avoid a nested bank switch which is not supported at +* If the buffer address is in the lower 32K of RAM, then the memroy + it points to will be from the User Bank, not the HBIOS bank which + is now active. In this case, the driver must use an inter-bank + copy to access the data. + +* If the buffer address is in the top 32K of RAM, then the driver will + have access to it directly even after a bank switch, so no special + steps are required. + +For some functions, the location of the buffer is required to be +in the top 32K of RAM to simplify the operation of the driver. + +It is usually better if the OS or application calling a buffered +function places the buffer in the top 32K because this may avoid +a double-copy operation. + +If driver code must make calls to other code, drivers, or utilities in +the HBIOS bank, it must make those calls directly (it must not use RST +08). This is to avoid a nested bank switch which is not supported at this time. -Character / Emulation / Video Services -====================================== +# Character / Emulation / Video Services In addition to a generic set of routines to handle typical character input/output, HBIOS also includes functionality for managing built-in @@ -312,642 +307,718 @@ desired emulation and specific physical VDA device to target. Likewise, the VDA Services may need to be initialized to put the specific video hardware into the proper mode, etc. -HBIOS Reference -=============== - -Invocation ----------- - -HBIOS functions are invoked by placing the required parameters in CPU -registers and executing an RST 08 instruction. Note that HBIOS does not -preserve register values that are unused. However, it will not modify the -Z80 alternate registers or IX/IY (these registers may be used within HBIOS, -but will be saved and restored internally). - -Normally, applications will not call HBIOS functions directly. It is -intended that the operating system makes all HBIOS function calls. -Applications that are considered system utilities may use HBIOS, but must -be careful not to modify the operating environment in any way that the -operating system does not expect. - -In general, the desired function is placed in the B register. Register C is -frequently used to specify a subfunction or a target device unit number. -Additional registers are used as defined by the specific function. Register -A should be used to return function result information. A=0 should -indicate success, other values are function specific. - -The character, disk, and video device functions all refer to target devices -using a logical device unit number that is passed in the C register. Keep -in mind that these unit numbers are assigned dynamically at HBIOS -initialization during the device discovery process. The assigned unit -numbers are displayed on the consoled at the conclusion of device -initialization. The unit assignments will never change after HBIOS -initialization. However, they can change at the next boot if there have -been hardware or BIOS customization changes. Code using HBIOS functions -should not assume fixed unit assignments. - -Some functions utilize pointers to memory buffers. Unless otherwise stated, -such buffers can be located anywhere in the Z80 CPU 64K address space. -However, performance sensitive buffers (primarily disk I/O buffers) will -require double-buffering if the caller’s buffer is in the lower 32K of CPU -address space. For optimal performance, such buffers should be placed in -the upper 32K of CPU address space. - -Error Codes ------------ - -The following error codes are defined generically for all HBIOS functions. -Most function calls will return a result in register A. - -_Code_ | _Meaning_ ------- | --------- -0 | function succeeded --1 | undefined error --2 | function not implemented --3 | invalid function --4 | invalid unit numberr --5 | out of memory --6 | parameter out of range --7 | media not present --8 | hardware not present --9 | I/O error --10 | write request to read-only media --11 | device timeout --12 | invalid configuration +# HBIOS Reference + +## Invocation + +HBIOS functions are invoked by placing the required parameters in CPU +registers and executing an RST 08 instruction. Note that HBIOS does not +preserve register values that are unused. However, the values of the Z80 +alternate registers and IX/IY will be preserved (these registers may be +used within HBIOS, but will be saved and restored internally). + +An alternate method of invoking HBIOS functions is to use `CALL 0xFFF0`. +Since the RST 08 vector exists in page zero of the CPU address space, +it may be paged out when alternate memory banks are selected. If this +may be true when you are invoking a function, you should use the `CALL` +method. + +Normally, applications will not call HBIOS functions directly. It is +intended that the operating system makes all HBIOS function calls. +Applications that are considered system utilities may use HBIOS, but +must be careful not to modify the operating environment in any way that +the operating system does not expect. + +In general, the desired function is placed in the B register. Register C +is frequently used to specify a subfunction or a target device unit +number. Additional registers are used as defined by the specific +function. Register A should be used to return function result +information. See below for result code definitions. + +The character, disk, and video device functions all refer to target +devices using a logical device unit number that is passed in the C +register. Keep in mind that these unit numbers are assigned dynamically +at HBIOS initialization during the device discovery process. The +assigned unit numbers are displayed on the console at the conclusion of +device initialization. The unit assignments will never change after +HBIOS initialization. However, they can change at the next boot if there +have been hardware or BIOS customization changes. Code using HBIOS +functions should not assume fixed unit assignments. + +Some functions utilize pointers to memory buffers. Unless otherwise +stated, such buffers can be located anywhere in the Z80 CPU 64K address +space. However, performance sensitive buffers (primarily disk I/O +buffers) will require double-buffering if the caller’s buffer is in the +lower 32K of CPU address space. For optimal performance, such buffers +should be placed in the upper 32K of CPU address space. + +## Result Codes + +The following function result codes are defined generically for all +HBIOS functions. Most function calls will return a result in register A. + +| **Code** | **Definition** | +|---------:|----------------------------------------| +| 0 | function succeeded | +| -1 | undefined error | +| -2 | function not implemented | +| -3 | invalid function | +| -4 | invalid unit numberr | +| -5 | out of memory | +| -6 | parameter out of range | +| -7 | media not present | +| -8 | hardware not present | +| -9 | I/O error | +| -10 | write request to read-only media | +| -11 | device timeout | +| -12 | invalid configuration | `\clearpage`{=latex} -Character Input/Output (CIO) ----------------------------- - -Character input/output functions require that a Character Unit be specified -in the C register. This is the logical device unit number assigned during -the boot process that identifies all character I/O devices uniquely. A -special value of 0x80 can be used for Unit to refer to the current console -device. +## Character Input/Output (CIO) + +Character Input/Output functions require that a Character Unit number be +specified in register C. This is the logical device unit number +assigned during the boot process that identifies all character +devices uniquely. A special value of 0x80 can be used for the Character +Unit to refer to the current console device. + +All character units are assigned a Device Type ID which indicates +the specific hardware device driver that handles the unit. The table +below enumerates these values. + +| **Device Type** | **ID** | **Description** | **Driver** | +|-----------------|-------:|------------------------------------------|------------| +| CIODEV_UART | 0x00 | 16C550 Family Serial Interface | uart.asm | +| CIODEV_ASCI | 0x10 | Z180 Built-in Serial Ports | asci.asm | +| CIODEV_TERM | 0x20 | Terminal | ansi.asm | +| CIODEV_PRPCON | 0x30 | PropIO Serial Console Interface | prp.asm | +| CIODEV_PPPCON | 0x40 | ParPortProp Serial Console Interface | ppp.asm | +| CIODEV_SIO | 0x50 | Zilog Serial Port Interface | sio.asm | +| CIODEV_ACIA | 0x60 | MC68B50 Asynchronous Interface | acia.asm | +| CIODEV_PIO | 0x70 | Zilog Parallel Interface Controller | pio.asm | +| CIODEV_UF | 0x80 | FT232H-based ECB USB FIFO | uf.asm | +| CIODEV_DUART | 0x90 | SCC2681 Family Dual UART | duart.asm | +| CIODEV_Z2U | 0xA0 | Zilog Z280 Built-in Serial Ports | z2u.asm | +| CIODEV_LPT | 0xB0 | Parallel I/O Controller | lpt.asm | Character devices can usually be configured with line characteristics such as speed, framing, etc. A word value (16 bit) is used to describe the line characteristics as indicated below: -_Bits_ | _Function_ ------- | ---------- -15-14 | Reserved (set to 0) -13 | RTS -12-8 | Baud Rate (see below) -7 | DTR -6 | XON/XOFF Flow Control -5-3 | Parity (???) -2 | Stop Bits (???) -1-0 | Data Bits (???) - -The 5-bit baud rate value (V) is encoded as V = 75 * 2^X * 3^Y. The +| **Bits** | **Characteristic** | +|---------:|----------------------------------------| +| 15-14 | Reserved (set to 0) | +| 13 | RTS | +| 12-8 | Baud Rate (see below) | +| 7 | DTR | +| 6 | XON/XOFF Flow Control | +| 5 | Stick Parity (set for true) | +| 4 | Even Parity (set for true) | +| 3 | Parity Enable (set for true) | +| 2 | Stop Bits (set for true) | +| 1-0 | Data Bits (5-8 encoded as 0-3) | + +The 5-bit Baud Rate value (V) is encoded as V = 75 * 2^X * 3^Y. The bits are defined as YXXXX. +Actual character values are a single byte (8 bits). The Character I/O +functions do not modify or interpret the values being sent/received +so they can be used to pass 8-bit binary data without corruption. Note +that some OSes will modify character data (truncate to 7 bits, etc.). + ### Function 0x00 -- Character Input (CIOIN) -| **Inputs** | **Outputs** | +| **Entry Parameters** | **Returned Values** | |----------------------------------------|----------------------------------------| -| B: 0x00 | A: Status (0-OK, else error) | -| C: Serial Device Unit Number | E: Character Received | -| C: Serial Device Unit Number | E: Character Received | -| C: Serial Device Unit Number | E: Character Received | - - - +| B: 0x00 | A: Status | +| C: Character Unit | E: Character | -| _Entry Parameters_ -| B: 0x00 -| C: Serial Device Unit Number - -| _Exit Results_ -| A: Status (0=OK, else error) -| E: Character Received - -Read a character from the device unit specified in register C and return -the character value in E. If no character(s) are available, this function -will wait indefinitely. +Read and return a Character (E) from the specified Character Unit +(C). If no character(s) are available in the unit's input buffer, this +function will wait indefinitely. The returned Status (A) is a standard +HBIOS result code. ### Function 0x01 -- Character Output (CIOOUT) -| _Entry Parameters_ -| B: 0x01 -| C: Serial Device Unit Number -| E: Character to Send - -| _Exit Results_ -| A: Status (0=OK, else error) +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x01 | A: Status (0-OK, else error) | +| C: Character Unit | | +| E: Character | | -Send character value in register E to device specified in register C. If -device is not ready to send, function will wait indefinitely. +Send a Character (E) via the specified Character Unit (C). If +there is no space available in the unit's output buffer, the function +will wait indefinitely. The returned Status (A) is a standard HBIOS result code. ### Function 0x02 -- Character Input Status (CIOIST) -| _Entry Parameters_ -| B: 0x02 -| C: Serial Device Unit Number +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x02 | A: Status / Characters Pending | +| C: Character Unit | | -| _Exit Results_ -| A: Bytes Pending +Return the count of Characters Pending (A) in the input buffer of the +specified Character Unit (C). If the unit has no input buffer or the +buffer utilization is not available, the function may return simply 0 or +1 where 0 means there is no character available and 1 means there is at +least one character available. -Return the number of characters available to read in the input buffer of -the unit specified. If the device has no input buffer, it is acceptable to -return simply 0 or 1 where 0 means there is no character available to read -and 1 means there is at least one character available to read. +The value returned in register A is used as both a Status (A) code and +the return value. Negative values (bit 7 set) indicate a standard HBIOS +result (error) code. Otherwise, the return value represents the number +of characters in the input buffer. ### Function 0x03 -- Character Output Status (CIOOST) -| _Entry Parameters_ -| B: 0x03 -| C: Serial Device Unit Number - -| _Exit Results_ -| A: Output Buffer Bytes Available - -Return the space available in the output buffer expressed as a character -count. If a 16 byte output buffer contained 6 characters waiting to be -sent, this function would return 10, the number of positions available in -the output buffer. If the port has no output buffer, it is acceptable to -return simply 0 or 1 where 0 means the port is busy and 1 means the port is -ready to output a character. - -### Function 0x04 -- Character IO Initialization (CIOINIT) - -| _Entry Parameters_ -| B: 0x04 -| C: Serial Device Unit Number -| DE: Line Characteristics - -| _Exit Results_ -| A: Status (0=OK, else error) - -Setup line characteristics (baudrate, framing, etc.) of the specified unit. -Register pair DE specifies line characteristics. If DE contains -1 -(0xFFFF), then the device will be reinitialized with the last line -characteristics used. Result of function is returned in A with zero -indicating success. - -### Function 0x05 -- Character IO Query (CIOQUERY) - -| _Entry Parameters_ -| B: 0x05 -| C: Serial Device Unit Number - -| _Exit Results_ -| A: Status (0=OK, else error) -| DE: Line Characteristics - -Reports the line characteristics (baudrate, framing, etc.) of the specified -unit. Register pair DE contains the line characteristics upon return. - -### Function 0x06 -- Character IO Device (CIODEVICE) - -| _Entry Parameters_ -| B: 0x06 -| C: Serial Device Unit Number - -| _Exit Results_ -| A: Status (0=OK, else error) -| C: Serial Device Attributes -| D: Serial Device Type -| E: Serial Device Number -| H: Serial Device Unit Mode -| L: Serial Device Unit I/O Base Address - -Reports information about the character device unit specified. Register C -indicates the device attributes: 0=RS-232 and 1=Terminal. Register D -indicates the device type (driver) and register E indicates the physical -device number assigned by the driver. - -Each character device is handled by an appropriate driver (UART, ASCI, -etc.). The driver can be identified by the Device Type. The assigned Device -Types are listed below. - -_Id_ | _Device Type / Driver_ ----- | ---------------------- -0x00 | UART -0x10 | ASCI -0x20 | Terminal -0x30 | PropIO VGA -0x40 | ParPortProp VGA -0x50 | SIO -0x60 | ACIA -0x70 | PIO -0x80 | UF +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x03 | A: Status / Space Free | +| C: Character Unit | | + +Return the count of buffer Space Free (A) for the specified +Character Unit (C). For example, if a 16 byte output buffer contains 6 +characters waiting to be sent out the unit's serial interface, this +function would return 10; the number of positions available in the +output buffer. If the port has no output buffer or the buffer +utilization is not available, the function may return simply 0 or 1 +where 0 means there is no buffer space available and 1 means there is +space in the output buffer for at least one character. + +The return value in register A is used as both a status code and the +return value. Negative values (bit 7 set) indicate a standard HBIOS +result (error) code. Otherwise, the return value represents the buffer +space available. + +### Function 0x04 -- Character I/O Initialization (CIOINIT) + +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x04 | A: Status | +| C: Character Unit | | +| DE: Line Characteristics | | + +Condition the interface of the specified Character Unit (C) according to +the specified Line Characteristics (DE). The definition of the line +characteristics value is described above. If DE contains -1 (0xFFFF), +then the device will be reinitialized with the previous line +characteristics used (a reset) and any buffer contents will be flushed. +The Status (A) is a standard HBIOS result code. + +Not all line characteristics are supported by all character interfaces. +It is up to the driver of the character unit to decide how to deal +with characteristics that are not available. For example, many +character drivers do not allow flow control settings (RTS/CTS, XON/XOFF) +to be modified dynamically. In most cases, these settings are ignored +by the driver in this function call. + +### Function 0x05 -- Character I/O Query (CIOQUERY) + +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x05 | A: Status | +| C: Character Unit | DE: Line Characteristics | + +Returns the current Line Characteristics (DE) of the specified Character + Unit (C). The definition of the line characteristics value is described + above. The returned status (A) is a standard HBIOS result code. + +### Function 0x06 -- Character I/O Device (CIODEVICE) + +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x06 | A: Status | +| C: Character Unit | C: Device Attributes | +| | D: Device Type | +| | E: Device Number | +| | H: Device Mode | +| | L: Device I/O Base Address | + +Returns device information for the specified Character Unit (C). The +status (A) is a standard HBIOS result code. + +Device Attribute (C) values are: 0 = RS/232, 1 = Terminal, 2 = Parallel. + +Device Type (D) indicates the specific hardware driver that handles the +specified Character Unit. Values are listed at the start of this +section. Device Number (E) indicates the physical device number assigned +per driver. For example, a Device Type of 0x50 with a Device Number +of 2 refers to the third port being handled by the SIO driver. + +Device Mode (H) is used to indicate the variant of the chip or +circuit that is used by the specified unit. For example, for a UART, +the value indicates the chip variant. The Device I/O Base Address (L) +indicates the starting port address of the hardware interface that is +servicing the specified unit. Both of these values are considered +driver specific. Refer to the associated hardware driver for the +values used. `\clearpage`{=latex} -Disk Input/Output (DIO) ------------------------ - -Disk input/output functions require that a disk unit be specified -in the C register. This is the logical disk unit number assigned during -the boot process that identifies all disk i/o devices uniquely. - -A fixed set of media types are defined. The currently defined media types -are listed below. Each driver will support a subset of the defined media -types. - -**Media ID** | **Value** | **Format** ------------- | --------- | ---------- -MID_NONE | 0 | No media installed -MID_MDROM | 1 | ROM Drive -MID_MDRAM | 2 | RAM Drive -MID_RF | 3 | RAM Floppy (LBA) -MID_HD | 4 | Hard Disk (LBA) -MID_FD720 | 5 | 3.5" 720K Floppy -MID_FD144 | 6 | 3.5" 1.44M Floppy -MID_FD360 | 7 | 5.25" 360K Floppy -MID_FD120 | 8 | 5.25" 1.2M Floppy -MID_FD111 | 9 | 8" 1.11M Floppy -MID_HDNEW | 10 | Hard Disk with 1024 Directory entries +## Disk Input/Output (DIO) + +Disk Input/Output functions require that a Disk Unit number be specified +in register C. This is the logical device unit number assigned +during the boot process that identifies all disk devices uniquely. + +All character units are assigned a Device Type ID which indicates +the specific hardware device driver that handles the unit. The table +below enumerates there values. + +| **Device Type** | **ID** | **Description** | **Driver** | +|-----------------|-------:|------------------------------------------|------------| +| DIODEV_MD | 0x00 | Memory Disk | md.asm | +| DIODEV_FD | 0x10 | Floppy Disk | fd.asm | +| DIODEV_RF | 0x20 | RAM Floppy | rf.asm | +| DIODEV_IDE | 0x30 | IDE Disk | ide.asm | +| DIODEV_ATAPI | 0x40 | ATAPI Disk (not implemented) | | +| DIODEV_PPIDE | 0x50 | PPIDE Disk | ppide.asm | +| DIODEV_SD | 0x60 | SD Card | sd.asm | +| DIODEV_PRPSD | 0x70 | PropIO SD Card | prp.asm | +| DIODEV_PPPSD | 0x80 | ParPortProp SD Card | ppp.asm | +| DIODEV_HDSK | 0x90 | SIMH HDSK Disk | hdsk.asm | + +A fixed set of media types are defined. The currently defined media +types identifiers are listed below. Each driver will support one or +more of the defined media types. + +| **Media** | **ID** | **Format** | +|---------------|-------:|--------------------------------------------| +| MID_NONE | 0 | No media installed | +| MID_MDROM | 1 | ROM Drive | +| MID_MDRAM | 2 | RAM Drive | +| MID_RF | 3 | RAM Floppy (LBA) | +| MID_HD512 | 4 | Hard Disk (LBA) w/ 512 directory entries | +| MID_FD720 | 5 | 3.5" 720K Floppy | +| MID_FD144 | 6 | 3.5" 1.44M Floppy | +| MID_FD360 | 7 | 5.25" 360K Floppy | +| MID_FD120 | 8 | 5.25" 1.2M Floppy | +| MID_FD111 | 9 | 8" 1.11M Floppy | +| MID_HD1K | 10 | Hard Disk (LBA) w/ 1024 directory entries | + +HBIOS supports both Cylinder/Head/Sector (CHS) and Logical Block +Addresses (CHS) when locating a sector for I/O (see DIOSEEK function). +For devices that are natively CHS (e.g., floppy disk), the HBIOS driver +can convert LBA values to CHS values according to the geometry of the +current media. For devices that are natively LBA (e.g., hard disk), the + HBIOS driver simulates CHS using a fictitious geometry provided by the +driver (typically 16 sectors per track and 16 heads per cylinder). ### Function 0x10 -- Disk Status (DIOSTATUS) -| _Entry Parameters_ -| B: 0x10 -| C: Disk Device Unit ID +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x10 | A: Status | +| C: Disk Unit | | + +Returns the driver specific Status (A) of the specified disk device unit +(C) based on the last operation performed. -| _Exit Results_ -| A: Status (0=OK, else error) +The return value in register A is used as both a device status and a +standard HBIOS result code. Negative values (bit 7 set) indicate a +standard HBIOS result (error) code. Otherwise, the return value +represents a driver-specific device status. In call cases, the value 0 +means OK. ### Function 0x11 -- Disk Reset (DIORESET) -| _Entry Parameters_ -| B: 0x11 -| C: Disk Device Unit ID +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x11 | A: Status | +| C: Disk Unit | | -| _Exit Results_ -| A: Status (0=OK, else error) +This function performs a device dependent reset operation on the Disk +Unit specified (C). The driver will clear any error status on the disk +unit, attempt to reset the interface, and flag the disk unit for +initialization on the next I/O function call. Any prior media +identification will be cleared. The returned Status (A) is a standard +HBIOS result code. -Reset the physical interface associated with the specified unit. Flag -all units associated with the interface for unit initialization at next -I/O call. Clear media identified unless locked. Reset result code of all -associated units of the physical interface. +If the specified disk unit (C) is one of multiple units on a single +hardware bus, then all units on that bus will be reset. For example, +if the master disk on an IDE bus is reset, then the slave disk will +also be reset. ### Function 0x12 -- Disk Seek (DIOSEEK) -| _Entry Parameters_ -| B: 0x12 -| C: Disk Device Unit ID -| D7: Address Type (0=CHS, 1=LBA) +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x12 | A: Status | +| C: Disk Unit | | +| DEHL: Sector Address | | -| if CHS: -| D6-0: Head -| E: Sector -| HL: Track +This function will set the desired sector to be used for the next I/O +operation on the specified Disk Unit (C). The returned Status (A) is a +standard HBIOS result code. -| if LBA: -| DE:HL: Block Address +An actual seek operation is generally not performed on the disk hardware +by this function. The function typically just records the sector +address for subsequent I/O function calls. -| _Exit Results_ -| A: Status (0=OK, else error) +The double-word Sector Address (DEHL) can represent either a Logical +Block Address (LBA) or a Cylinder/Head/Sector (CHS). If the high bit of +register D is set, then an LBA value is specified. Otherwise, the +value is CHS. -Update target CHS or LBA for next I/O request on designated unit. Physical -seek is typically deferred until subsequent I/O operation. +For LBA mode operation, the high bit is cleared and the entire +double-word is then treated as the logical sector address. -Bit 7 of D indicates whether the disk seek address is specified as -cylinder/head/sector (CHS) or Logical Block Address (LBA). If D:7=1, then -the remaining bits of of the 32 bit register set DE:HL specify a linear, -zero offset, block number. If D:7=0, then the remaining bits of D specify -the head, E specifies sector, and HL specifies track. +For CHS mode operation, the Sector Address (DEHL) registers are +interpreted as: D=Head, E=Sector, and HL=Track. All values (including +sector) are 0 relative. -Note that not all devices will accept both types of addresses. -Specifically, floppy disk devices must have CHS addresses. All other -devices will accept either CHS or LBA. The DIOGEOM function can be used to -determine if the device supports LBA addressing. +Prior versions of the floppy driver did not accept LBA mode addresses. +However, this restriction has been removed as of HBIOS v3.1. At this +point, all disk drivers support both LBA and CHS addressing. ### Function 0x13 -- Disk Read (DIOREAD) -| _Entry Parameters_ -| B: 0x13 -| C: Disk Device Unit ID -| D: Bank ID -| E: Block Count -| HL: Buffer Address - -| _Exit Results_ -| A: Status (0=OK, else error) -| E: Blocks Read - -Read Block Count sectors to buffer address starting at current target -sector. Current sector must be established by prior seek function; however, -multiple read/write/verify function calls can be made after a seek -function. Current sector is incremented after each sector successfully -read. On error, current sector is sector where error occurred. -Blocks read indicates number of sectors successfully read. - -Caller must ensure: 1) buffer address is large enough to contain data for -all sectors requested, and 2) does not cross a 32k memory bank boundary. +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x13 | A: Status | +| C: Disk Unit | E: Sectors Read | +| D: Buffer Bank ID | | +| E: Sector Count | | +| HL: Buffer Address | | + +Read Sector Count (E) sectors into the buffer located in Buffer Bank ID (D) +at Buffer Address (HL) starting at the Current Sector. The returned +Status (A) is a standard HBIOS result code. + +The Current Sector is established by a prior DIOSEEK function call; +however, multiple read/write/verify function calls can be made after a +seek function. The Current Sector is incremented after each sector +successfully read. On error, the Current Sector will be the sector where +the error occurred. Sectors Read (E) indicates the number of sectors +successfully read. + +The caller must ensure that the Buffer Address is large enough to +contain all sectors requested. Disk data transfers will be faster if +the buffer resides in the top 32K of memory because it avoids a +double buffer copy. ### Function 0x14 -- Disk Write (DIOWRITE) -| _Entry Parameters_ -| B: 0x14 -| C: Disk Device Unit ID -| D: Bank ID -| E: Block Count -| HL: Buffer Address - -| _Exit Results_ -| A: Status (0=OK, else error) -| E: Blocks Written +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x14 | A: Status | +| C: Disk Unit | E: Sectors Written | +| D: Buffer Bank ID | | +| E: Sector Count | | +| HL: Buffer Address | | + +Write Sector Count (E) sectors from the buffer located in Buffer Bank ID (D) +at Buffer Address (HL) starting at the Current Sector. The returned +Status (A) is a standard HBIOS result code. + +The Current Sector is established by a prior DIOSEEK function call; +however, multiple read/write/verify function calls can be made after a +seek function. The Current Sector is incremented after each sector +successfully written. On error, the Current Sector will be the sector +where the error occurred. Sectors Written (E) indicates the number of +sectors successfully written. + +Disk data transfers will be faster if the buffer resides in the top 32K +of memory because it avoids a double copy. -Write Block Count sectors to buffer address starting at current target -sector. Current sector must be established by prior seek function; however, -multiple read/write/verify function calls can be made after a seek -function. Current sector is incremented after each sector successfully -written. On error, current sector is sector where error occurred. -Blocks written indicates number of sectors successfully written. +### Function 0x15 -- Disk Verify (DIOVERIFY) -Caller must ensure the source buffer does not cross a 32k memory bank boundary. +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x15 | A: Status | +| C: Disk Unit | E: Sectors Verified | +| E: Sector Count | | -### Function 0x15 -- Disk Verify (DIOVERIFY) +**\*\*\* Function Not Implemented \*\*\*** -| _Entry Parameters_ -| B: 0x15 -| C: Disk Device Unit ID -| HL: Buffer Address -| E: Block Count +### Function 0x16 -- Disk Format (DIOFORMAT) -| _Exit Results_ -| A: Status (0=OK, else error) -| E: Blocks Verified +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x16 | A: Status | +| C: Disk Unit | | +| D: Head | | +| E: Fill Byte | | +| HL: Cylinder | | -\*\*\*Not Implemented\*\*\* +**\*\*\* Function Not Implemented \*\*\*** -### Function 0x16 -- Disk Format (DIOFORMAT) +### Function 0x17 -- Disk Device (DIODEVICE) -| _Entry Parameters_ -| B: 0x16 -| C: Disk Device Unit ID -| D: Head -| E: Fill Byte -| HL: Cylinder - -| _Exit Results_ -| A: Status (0=OK, else error) - -\*\*\*Not Implemented\*\*\* - -### Function 0x17 -- Disk DEVICE (DIODEVICE) - -| _Entry Parameters_ -| B: 0x17 -| C: Disk Device Unit ID - -| _Exit Results_ -| A: Status (0=OK, else error) -| C: Attributes -| D: Device Type -| E: Device Number -| H: Disk Device Unit Mode -| L: Disk Device Unit I/O Base Address - -Reports information about the character device unit specified. Register D -indicates the device type (driver) and register E indicates the physical -device number assigned by the driver. - -Register C reports the following device attributes: - -Bit 7: 1=Floppy, 0=Hard Disk (or similar, e.g. CF, SD, RAM) - -| If Floppy: -| Bits 6-5: Form Factor (0=8", 1=5.25", 2=3.5", 3=Other) -| Bit 4: Sides (0=SS, 1=DS) -| Bits 3-2: Density (0=SD, 1=DD, 2=HD, 3=ED) -| Bits 1-0: Reserved - -| If Hard Disk: -| Bit 6: Removable -| Bits: 5-3: Type (0=Hard, 1=CF, 2=SD, 3=USB, -| 4=ROM, 5=RAM, 6=RAMF, 7=FLASH) -| Bits 2-0: Reserved - -Each disk device is handled by an appropriate driver (IDE, SD, -etc.) which is identified by a device type id from the table below. - -**Type ID** | **Disk Device Type** ------------ | -------------------- -0x00 | Memory Disk -0x10 | Floppy Disk -0x20 | RAM Floppy -0x30 | IDE Disk -0x40 | ATAPI Disk (not implemented) -0x50 | PPIDE Disk -0x60 | SD Card -0x70 | PropIO SD Card -0x80 | ParPortProp SD Card -0x90 | SIMH HDSK Disk +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x17 | A: Status | +| C: Disk Unit | C: Device Attributes | +| | D: Device Type | +| | E: Device Number | +| | H: Device Unit Mode | +| | L: Device I/O Base Address | + +Reports device information about the specified Disk Unit (C). The +Status (A) is a standard HBIOS result code. + +Bit 7 of the Device Attribute (C) value returned indicates whether the +device is a floppy disk. If it is a floppy disk, the Device Attribute +(C) value is encoded as follows: + +| **Bits** | **Definition** | +|---------:|--------------------------------------------------| +| 7 | = 1 (Floppy Disk) | +| 6-5 | Form Factor: 0=8", 1=5.25", 2=3.5", 3=Other | +| 4 | Sides: 0=SS, 1=DS | +| 3-2 | Density: 0=SD, 1=DD, 2=HD, 3=ED | +| 1-0 | Reserved | + +If the Disk Unit (C) specified is a not floppy disk, then the Device +Attribute (C) encoding is as follows: + +| **Bits** | **Definition** | +|---------:|--------------------------------------------------| +| 7 | = 0 (not Floppy Disk) | +| 6 | Removable | +| 5-3 | Type: 0=Hard, 1=CF, 2=SD, 3=USB, | +| | 4=ROM, 5=RAM, 6=RAMF, 7=FLASH | +| 2-0 | Reserved | + +Device Type (D) indicates the specific hardware driver that handles the +specified Disk Unit (C). Values are listed at the start of this +section. Device Number (E) indicates the physical device number assigned +per driver. For example, a Device Type of 0x30 with a Device Number +of 1 refers to the second disk being handled by the IDE driver. + +Device Mode (H) is used to indicate the variant of the chip or circuit +that is used by the specified unit. For example, for an IDE unit, the +value indicates the IDE circuit variant. The Device I/O Base Address +(L) indicates the starting port address of the hardware interface that +is servicing the specified unit. Both of these values are considered +driver specific. Refer to the associated hardware driver for the values +used. ### Function 0x18 -- Disk Media (DIOMEDIA) -| _Entry Parameters_ -| B: 0x18 -| C: Disk Device Unit ID -| E0: Enable Media Discovery - -| _Exit Results_ -| A: Status (0=OK, else error) -| E: Media ID +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x18 | A: Status | +| C: Disk Unit | E: Media ID | +| E: Flags | | -Report the media definition for media in specified unit. If bit 0 of E is -set, then perform media discovery or verification. If no media in device, -function will return an error status. +Report the Media ID (E) for the for media in the specified Disk Unit +(C). If bit 0 of Flags (E) is set, then media discovery or verification +will be performed. The Status (A) is a standard HBIOS result code. If +there is no media in device, function will return an error status. ### Function 0x19 -- Disk Define Media (DIODEFMED) -| _Entry Parameters_ -| B: 0x19 -| C: Disk Device Unit ID -| E: Media ID - -| _Exit Results_ -| A: Status (0=OK, else error) +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x19 | A: Status | +| C: Disk Unit | | +| E: Media ID | | -\*\*\* Not implemented \*\*\* +**\*\*\* Function Not Implemented \*\*\*** ### Function 0x1A -- Disk Capacity (DIOCAPACITY) -| _Entry Parameters_ -| B: 0x1A -| C: Disk Device Unit ID +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x1A | A: Status | +| C: Disk Unit | DEHL: Sector Count | +| | BC: Block Size | -| _Exit Results_ -| A: Status (0=OK, else error) -| DE:HL: Blocks on Device -| BC: Block Size +Report the current media capacity information for the specified Disk Unit (C). +The Sector Count (DEHL) is a double-word number representing the +total number of blocks on the device. Block Size (BC) contains the block +size in bytes. The Status (A) is a standard HBIOS result code. If the +media is unknown, an error will be returned. -Report current media capacity information. DE:HL is a 32 bit number -representing the total number of blocks on the device. BC contains the -block size. If media is unknown, an error will be returned. +This function will not attempt to discover or verify the media loaded in +the unit specified. You can use precede this function with the +DIOMEDIA function to force this if desired. ### Function 0x1B -- Disk Geometry (DIOGEOMETRY) -| _Entry Parameters_ -| B: 0x1B -| C: Disk Device Unit ID - -| _Exit Results_ -| A: Status (0=OK, else error) -| HL: Cylinders -| D7: LBA Capability -| BC: Block Size - -Report current media geometry information. If media is unknown, return -error (no media). +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x1B | A: Status | +| C: Disk Unit | D: Heads | +| | E: Sectors | +| | HL: Cylinder Count | +| | BC: Block Size | + +Report the geometry for the media in the specified Disk Unit (C). If a +device uses LBA mode addressing natively, then the drivers simulated +geometry will be returned. The Status (A) is a standard HBIOS result +code. If the media is unknown, an error will be returned. + +Heads (D) refers to the number of heads per cylinder. Sectors (E) +refers to the number of sectors per track. Cylinder Count (HL) is the +total number of cylinders addressable for the media. Block Size (BC) +is the number of bytes in one sector. `\clearpage`{=latex} -Real Time Clock (RTC) ---------------------- +## Real Time Clock (RTC) The Real Time Clock functions provide read/write access to the clock and related Non-Volatile RAM. -The time functions (RTCGTM and RTCSTM) require a 6 byte date/time buffer -of the following format. Each byte is BCD encoded. - -**Offset** | **Contents** ----------- | ------------ -0 | Year (00-99) -1 | Month (01-12) -2 | Date (01-31) -3 | Hours (00-24) -4 | Minutes (00-59) -5 | Seconds (00-59) +HBIOS only supports a single RTC device since there is no reason to have +more than one at a time. The RTC unit is assigned a Device Type ID +which indicates the specific hardware device driver that handles the +unit. The table below enumerates these values. + +| **Device Type** | **ID** | **Description** | **Driver** | +|-----------------|-------:|------------------------------------------|------------| +| RTCDEV_DS | 0x00 | Maxim DS1302 Real-Time Clock w/ NVRAM | dsrtc.asm | +| RTCDEV_BQ | 0x10 | BQ4845P Real Time Clock | bqrtc.asm | +| RTCDEV_SIMH | 0x20 | SIMH Simulator Real-Time Clock | simrtc.asm | +| RTCDEV_INT | 0x30 | Interrupt-based Real Time Clock | intrtc.asm | +| RTCDEV_DS7 | 0x40 | Maxim DS1307 PCF I2C RTC w/ NVRAM | ds7rtc.asm | +| RTCDEV_RP5 | 0x50 | Ricoh RPC01A Real-Time Clock w/ NVRAM | rp5rtc.asm | + +The time functions to get and set the time (RTCGTM and RTCSTM) require a +6 byte date/time buffer in the following format. Each byte is BCD +encoded. + +| **Offset** | **Contents** | +|-----------:|-----------------------------------------| +| 0 | Year (00-99) | +| 1 | Month (01-12) | +| 2 | Date (01-31) | +| 3 | Hours (00-24) | +| 4 | Minutes (00-59) | +| 5 | Seconds (00-59) | ### Function 0x20 -- RTC Get Time (RTCGETTIM) -| _Entry Parameters_ -| B: 0x20 -| HL: Time Buffer Address - -| _Exit Results_ -| A: Status (0=OK, else error) +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x20 | A: Status | +| HL: Date/Time Buffer Address | | -Read the current value of the clock and store the date/time in the -buffer pointed to by HL. +Read the current value of the real-time clock and store the date/time in +the Date/Time Buffer pointed to by HL. The Status (A) is a standard +HBIOS result code. ### Function 0x21 -- RTC Set Time (RTCSETTIM) -| _Entry Parameters_ -| B: 0x21 -| HL: Time Buffer Address - -| _Exit Results_ -| A: Status (0=OK, else error) +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x21 | A: Status | +| HL: Date/Time Buffer Address | | -Set the current value of the clock based on the date/time in the buffer -pointed to by HL. +Set the current value of the real-time clock based on the Date/Time +Buffer pointed to by HL. The Status (A) is a standard HBIOS result +code. ### Function 0x22 -- RTC Get NVRAM Byte (RTCGETBYT) -| _Entry Parameters_ -| B: 0x22 -| C: Index - -| _Exit Results_ -| A: Status (0=OK, else error) -| E: Value +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x22 | A: Status | +| C: Index | E: Value | -Read a single byte value from the Non-Volatile RAM at the index specified -by C. The value is returned in register E. +Read a single byte Value (E) from the Non-Volatile RAM of the RTC at the +byte offset Index (C). The Status (A) is a standard HBIOS result code. ### Function 0x23 -- RTC Set NVRAM Byte (RTCSETBYT) -| _Entry Parameters_ -| B: 0x23 -| C: Index - -| _Exit Results_ -| A: Status (0=OK, else error) -| E: Value +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x23 | A: Status | +| C: Index | | +| E: Value | | -Write a single byte value into the Non-Volatile RAM at the index specified -by C. The value to be written is specified in E. +Set a single byte Value (E) of the Non-Volatile RAM of the RTC at the +byte offset Index (C). The Status (A) is a standard HBIOS result code. ### Function 0x24 -- RTC Get NVRAM Block (RTCGETBLK) -| _Entry Parameters_ -| B: 0x24 -| HL: Buffer - -| _Exit Results_ -| A: Status (0=OK, else error) +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x24 | A: Status | +| HL: Buffer Address | | -Read the entire contents of the Non-Volatile RAM into the buffer pointed -to by HL. HL must point to a location in the top 32K of CPU address space. +Read the entire contents of the Non-Volatile RAM into to a buffer +pointed to by Buffer Address (HL). The Status (A) is a standard HBIOS +result code. ### Function 0x25 -- RTC Set NVRAM Block (RTCSETBLK) -| _Entry Parameters_ -| B: 0x25 -| HL: Buffer - -| _Exit Results_ -| A: Status (0=OK, else error) +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x25 | A: Status | +| HL: Buffer Address | | -Write the entire contents of the Non-Volatile RAM from the buffer pointed -to by HL. HL must point to a location in the top 32K of CPU address space. +Write the entire contents of the Non-Volatile RAM from the buffer +pointed to by Buffer Address (HL). The Status (A) is a standard HBIOS +result code. ### Function 0x26 -- RTC Get Alarm (RTCGETALM) -| _Entry Parameters_ -| B: 0x26 - -| _Exit Results_ -| A: Status (0=OK, else error) +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x26 | A: Status | +| HL: Date/Time Buffer Address | | -Documentation required... +Work in progress, documentation required... ### Function 0x27 -- RTC Set Alarm (RTCSETALM) -| _Entry Parameters_ -| B: 0x27 - -| _Exit Results_ -| A: Status (0=OK, else error) +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x27 | A: Status | +| HL: Date/Time Buffer Address | | -Documentation required... +Work in progress, documentation required... ### Function 0x28 -- RTC DEVICE (RTCDEVICE) -| _Entry Parameters_ -| B: 0x28 -| C: RTC Device Unit ID - -| _Exit Results_ -| A: Status (0=OK, else error) -| D: Device Type -| E: Device Number -| H: RTC Device Unit Mode -| L: RTC Device Unit I/O Base Address - -Reports information about the RTC device unit specified. Register D -indicates the device type (driver) and register E indicates the physical -device number assigned by the driver. - -Each RTC device is handled by an appropriate driver (DSRTC, BQRTC, -etc.) which is identified by a device type id from the table below. - -**Type ID** | **RTC Device Type** ------------ | -------------------- -0x00 | DS1302 -0x10 | BQ4845P -0x20 | SIMH -0x30 | System Periodic Timer -0x40 | DS1307 (I2C) +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x28 | A: Status | +| | C: Device Attributes | +| | D: Device Type | +| | E: Device Number | +| | H: Device Unit Mode | +| | L: Device I/O Base Address | + +Returns device information for the RTC unit. The Status (A) is a +standard HBIOS result code. + +Device Attribute (C) values are not yet defined. Device Type (D) +indicates the specific hardware driver that handles the specified +character unit. Values are listed at the start of this section. Device +Number (E) indicates the physical device number assigned per driver +which is always 0 for RTC. + +Device Mode (H) is used to indicate the variant of the chip or circuit +that is used by the specified unit. The Device I/O Base Address (L) +indicates the starting port address of the hardware interface that is +servicing the specified unit. Both of these values are considered +driver specific. Refer to the associated hardware driver for the values +used. `\clearpage`{=latex} -Video Display Adapter (VDA) ---------------------------- +## Video Display Adapter (VDA) The VDA functions are provided as a common interface to Video Display Adapters. Not all VDAs will include keyboard hardware. In this case, the keyboard functions should return a failure status. +All video units are assigned a Device Type ID which indicates +the specific hardware device driver that handles the unit. The table +below enumerates there values. + +| **Device Type** | **ID** | **Description** | **Driver** | +|-----------------|-------:|------------------------------------------|------------| +| VDADEV_VDU | 0x00 | MC6845 Family Video Display Controller | vdu.asm | +| VDADEV_CVDU | 0x10 | MC8563-based Video Display Controller | cvdu.asm | +| VDADEV_GDC | 0x20 | uPD7220 Video Display Controller | gdc.asm | +| VDADEV_TMS | 0x30 | TMS9918/38/58 Video Display Controller | tms.asm | +| VDADEV_VGA | 0x40 | HD6445CP4-based Video Display Controller | vga.asm | + Depending on the capabilities of the hardware, the use of colors and attributes may or may not be supported. If the hardware does not support these capabilities, they will be ignored. @@ -958,415 +1029,449 @@ the background color and the low four bits determine the foreground color. This results in 16 unique color values for both foreground and background. The following table illustrates the color byte value construction: -  | **Bit** | **Color** ----------- | ------- | --------- -Background | 7 | Intensity -  | 6 | Blue -  | 5 | Green -  | 4 | Red -Foreground | 3 | Intensity -  | 2 | Blue -  | 1 | Green -  | 0 | Red +|   | **Bit** | **Color** | +|------------|--------:|-----------| +| Background | 7 | Intensity | +|   | 6 | Blue | +|   | 5 | Green | +|   | 4 | Red | +| Foreground | 3 | Intensity | +|   | 2 | Blue | +|   | 1 | Green | +|   | 0 | Red | The following table illustrates the resultant color for each of the possible 16 values for foreground or background: -**Foreground** | **Background** | **Color** ------------------- | ------------------ | ---------------- -n0 nnnn0000 | 0n 0000nnnn | Black -n1 nnnn0001 | 1n 0001nnnn | Red -n2 nnnn0010 | 2n 0010nnnn | Green -n3 nnnn0011 | 3n 0011nnnn | Brown -n4 nnnn0100 | 4n 0100nnnn | Blue -n5 nnnn0101 | 5n 0101nnnn | Magenta -n6 nnnn0110 | 6n 0110nnnn | Cyan -n7 nnnn0111 | 7n 0111nnnn | White -n8 nnnn1000 | 8n 1000nnnn | Gray -n9 nnnn1001 | 9n 1001nnnn | Light Red -nA nnnn1010 | An 1010nnnn | Light Green -nB nnnn1011 | Bn 1011nnnn | Yellow -nC nnnn1100 | Cn 1100nnnn | Light Blue -nD nnnn1101 | Dn 1101nnnn | Light Magenta -nE nnnn1110 | En 1110nnnn | Light Cyan -nF nnnn1111 | Fn 1111nnnn | Bright White +| **Foreground** | **Background** | **Color** | +|--------------------|--------------------| ----------------| +| n0 nnnn0000 | 0n 0000nnnn | Black | +| n1 nnnn0001 | 1n 0001nnnn | Red | +| n2 nnnn0010 | 2n 0010nnnn | Green | +| n3 nnnn0011 | 3n 0011nnnn | Brown | +| n4 nnnn0100 | 4n 0100nnnn | Blue | +| n5 nnnn0101 | 5n 0101nnnn | Magenta | +| n6 nnnn0110 | 6n 0110nnnn | Cyan | +| n7 nnnn0111 | 7n 0111nnnn | White | +| n8 nnnn1000 | 8n 1000nnnn | Gray | +| n9 nnnn1001 | 9n 1001nnnn | Light Red | +| nA nnnn1010 | An 1010nnnn | Light Green | +| nB nnnn1011 | Bn 1011nnnn | Yellow | +| nC nnnn1100 | Cn 1100nnnn | Light Blue | +| nD nnnn1101 | Dn 1101nnnn | Light Magenta | +| nE nnnn1110 | En 1110nnnn | Light Cyan | +| nF nnnn1111 | Fn 1111nnnn | Bright White | Attribute byte values are constructed using the following bit encoding: -**Bit** | **Effect** -------- | ---------- -7 | n/a (0) -6 | n/a (0) -5 | n/a (0) -4 | n/a (0) -3 | n/a (0) -2 | Reverse -1 | Underline -0 | Blink +| **Bit** | **Effect** | +|--------:|------------| +| 7 | n/a (0) | +| 6 | n/a (0) | +| 5 | n/a (0) | +| 4 | n/a (0) | +| 3 | n/a (0) | +| 2 | Reverse | +| 1 | Underline | +| 0 | Blink | The following codes are returned by a keyboard read to signify non-ASCII keystrokes: -**Value** | **Keystroke** | **Value** | **Keystroke** ---------- | ------------- | --------- | ------------- -0xE0 | F1 | 0xF0 | Insert -0xE1 | F2 | 0xF1 | Delete -0xE2 | F3 | 0xF2 | Home -0xE3 | F4 | 0xF3 | End -0xE4 | F5 | 0xF4 | PageUp -0xE5 | F6 | 0xF5 | PadeDown -0xE6 | F7 | 0xF6 | UpArrow -0xE7 | F8 | 0xF7 | DownArrow -0xE8 | F9 | 0xF8 | LeftArrow -0xE9 | F10 | 0xF9 | RightArrow -0xEA | F11 | 0xFA | Power -0xEB | F12 | 0xFB | Sleep -0xEC | SysReq | 0xFC | Wake -0xED | PrintScreen | 0xFD | Break -0xEE | Pause | 0xFE | -0xEF | App | 0xFF | +| **Value** | **Keystroke** | **Value** | **Keystroke** | +|----------:|---------------|----------:|---------------| +| 0xE0 | F1 | 0xF0 | Insert | +| 0xE1 | F2 | 0xF1 | Delete | +| 0xE2 | F3 | 0xF2 | Home | +| 0xE3 | F4 | 0xF3 | End | +| 0xE4 | F5 | 0xF4 | PageUp | +| 0xE5 | F6 | 0xF5 | PadeDown | +| 0xE6 | F7 | 0xF6 | UpArrow | +| 0xE7 | F8 | 0xF7 | DownArrow | +| 0xE8 | F9 | 0xF8 | LeftArrow | +| 0xE9 | F10 | 0xF9 | RightArrow | +| 0xEA | F11 | 0xFA | Power | +| 0xEB | F12 | 0xFB | Sleep | +| 0xEC | SysReq | 0xFC | Wake | +| 0xED | PrintScreen | 0xFD | Break | +| 0xEE | Pause | 0xFE | | +| 0xEF | App | 0xFF | | ### Function 0x40 -- Video Initialize (VDAINI) -| _Entry Parameters_ -| B: 0x40 -| C: Video Device Unit ID -| E: Video Mode (device specific) -| HL: Font Bitmap Buffer Address (optional) - -| _Exit Results_ -| A: Status (0=OK, else error) - -Performs a full (re)initialization of the specified video device. The -screen is cleared and the keyboard buffer is flushed. If the specified -VDA supports multiple video modes, the requested mode can be specified -in E (set to 0 for default/not specified). Mode values are specific to -each VDA. - -HL may point to a location in memory with the character bitmap to be -loaded into the VDA video processor. The location MUST be in the top 32K -of the CPU memory space. HL must be set to zero if no character bitmap -is specified (the VDA video processor will utilize a default character +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x40 | A: Status | +| C: Video Unit | | +| E: Video Mode | | +| HL: Font Bitmap | | + +Performs a full (re)initialization of the specified Video Unit (C). The +screen is cleared and the keyboard buffer is flushed. If the specified +Video Unit (C) supports multiple video modes, a Video Mode (E) can be +specified (set to 0 for default/not specified). Video Mode (E) values +are specific to each VDA. The returned Status (A) is a standard HBIOS +result code. + +If the hardware and driver support it, you can specify a Font Bitmap +(HL) buffer address containing the character bitmap data to be loaded +into the video processor. The buffer **must** be located entirely in the +top 32K of the CPU memory space. HL must be set to zero if no character +bitmap is specified (the driver will utilize a default character bitmap). ### Function 0x41 -- Video Query (VDAQRY) -| _Entry Parameters_ -| B: 0x41 -| C: Video Device Unit ID -| HL: Font Bitmap Buffer Address (optional) - -| _Exit Results_ -| A: Status (0=OK, else error) -| C: Video Mode -| D: Row Count -| E: Column Count -| HL: Font Bitmap Buffer Address (0 if N/A) - -Return information about the specified video device. C will be set to -the current video mode. DE will return the dimensions of the video -display as measured in rows and columns. Note that this is the **count** -of rows and columns, not the **last** row/column number. +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x41 | A: Status | +| C: Video Unit | C: Video Mode | +| HL: Font Bitmap | D: Rows | +| | E: Columns | +| | HL: Font Bitmap | + +Return information about the specified Video Unit (C). Video Mode (C) +will be set to the current video mode. Rows (D) and Columns (E) will +return the dimensions of the video display as measured in rows and +columns. Note that this is the **count** of rows and columns, not the +**last** row/column number. The returned Status (A) is a standard HBIOS +result code. + +If the hardware and driver support it, you can specify a Font Bitmap (HL) +buffer address that will be filled with the current +character bitmap data. The buffer **must** be located entirely in the +top 32K of the CPU memory space. Font Bitmap (HL) **must** be set to +zero if it does not point to a proper buffer area or memory corruption +will result. If HL is not zero, it must point to a suitably sized memory buffer in the upper 32K of CPU address space that will be filled with the current character bitmap data. It is critical that HL be set to zero if it does -not point to a proper buffer area or memory corruption will result. The -video device driver may not have the ability to provide character bitmap -data. In this case, on return, HL will be set to zero. +not point to a proper buffer area or memory corruption will result. If +the video device driver does not have the ability to provide character bitmap +data, then Font Bitmap (HL) will be set to zero on return. ### Function 0x42 -- Video Reset (VDARES) -| _Entry Parameters_ -| B: 0x42 -| C: Video Device Unit ID - -| _Exit Results_ -| A: Status (0=OK, else error) +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x42 | A: Status | +| C: Video Unit | | -Performs a soft reset of the Video Display Adapter. Should clear the -screen, home the cursor, restore active attribute and color to defaults. -Keyboard should be flushed. +Performs a soft reset of the specified Video Unit (C). Will clear the +screen, home the cursor, and restore active attribute/color to defaults. +Keyboard will be flushed. The current video mode will not be changed. +The returned Status (A) is a standard HBIOS result code. ### Function 0x43 -- Video Device (VDADEV) -| _Entry Parameters_ -| B: 0x43 -| C: Video Device Unit ID - -| _Exit Results_ -| A: Status (0=OK, else error) -| D: Device Type -| E: Device Number -| H: VDA Device Unit Mode -| L: VDA Device Unit I/O Base Address - -Reports information about the video device unit specified. - -Register D reports the video device type (see below). - -Register E reports the driver relative physical device number. - -The currently defined video device types are: - -VDA ID | Value | Device ----------- | ----- | ------ -VDA_NONE | 0x00 | No VDA -VDA_VDU | 0x10 | ECB VDU board -VDA_CVDU | 0x20 | ECB Color VDU board -VDA_7220 | 0x30 | ECB uPD7220 video display board -VDA_N8 | 0x40 | TMS9918 video display built-in to N8 -VDA_VGA | 0x50 | ECB VGA board +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x43 | A: Status | +| C: Video Unit | C: Device Attributes | +| | D: Device Type | +| | E: Device Number | +| | H: Device Unit Mode | +| | L: Device I/O Base Address | + +Reports device information about the specified Video Unit (C). The +Status (A) is a standard HBIOS result code. + +Device Attribute (C) values are not yet defined. + +Device Type (D) indicates the specific hardware driver that handles the +specified Video Unit (C). Values are listed at the start of this +section. Device Number (E) indicates the physical device number assigned +per driver. + +Device Mode (H) is used to indicate the variant of the chip or circuit +that is used by the specified unit. For example, for an TMS video unit, the +value indicates the TMS circuit variant. The Device I/O Base Address +(L) indicates the starting port address of the hardware interface that +is servicing the specified unit. Both of these values are considered +driver specific. Refer to the associated hardware driver for the values +used. ### Function 0x44 -- Video Set Cursor Style (VDASCS) -| _Entry Parameters_ -| B: 0x44 -| C: Video Device Unit ID -| D: Start/End Pixel Row -| E: Style - -| _Exit Results_ -| A: Status (0=OK, else error) - -If supported by the video hardware, adjust the format of the cursor such -that the cursor starts at the pixel specified in the top nibble of D and -end at the pixel specified in the bottom nibble of D. So, if D=$08, a -block cursor would be used that starts at the top pixel of the character -cell and ends at the ninth pixel of the character cell. - -Register E is reserved to control the style of the cursor (blink, +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x44 | A: Status | +| C: Video Unit | | +| D: Start/End | | +| E: Style | | + +If supported by the specified Video Unit (C), adjust the format of the +cursor such that the cursor starts at the pixel specified in the top +nibble of Start/End (D) and ends at the pixel specified in the bottom +nibble of Start/End (D). So, if D=0x08, a block cursor would be used +that starts at the top pixel of the character cell and ends at the ninth +pixel of the character cell. The Status (A) is a standard HBIOS result +code. + +Style (E) is reserved to control the style of the cursor (blink, visibility, etc.), but is not yet implemented. Adjustments to the cursor style may or may not be possible for any given -video hardware. +video hardware and may be dependent on the active video mode. ### Function 0x45 -- Video Set Cursor Position (VDASCP) -| _Entry Parameters_ -| B: 0x45 -| C: Video Device Unit ID -| D: Row (0 indexed) -| E: Column (0 indexed) - -| _Exit Results_ -| A: Status (0=OK, else error) +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x45 | A: Status | +| C: Video Unit | | +| D: Row | | +| E: Column | | -Reposition the cursor to the specified row and column. Specifying a -row/column that exceeds the boundaries of the display results in -undefined behavior. Cursor coordinates are 0 based (0,0 is the upper -left corner of the display). +Reposition the cursor of the specified Video Unit (C) to the specified +Row (D) and Column (E). Specifying a row/column that exceeds the +boundaries of the display results in undefined behavior. Cursor +coordinates are 0 based (0,0 is the upper left corner of the display). +The Status (A) is a standard HBIOS result code. ### Function 0x46 -- Video Set Character Attribute (VDASAT) -| _Entry Parameters_ -| B: 0x46 -| C: Video Device Unit ID -| E: Character Attribute Code - -| _Exit Results_ -| A: Status (0=OK, else error) +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x46 | A: Status | +| C: Video Unit | | +| E: Attribute | | -Assign the specified character attribute code to be used for all -subsequent character writes/fills. This attribute is used to fill new -lines generated by scroll operations. Refer to the character attribute -for a list of the available attribute codes. Note that a given video -display may or may not support any/all attributes. +Assign the specified character Attribute (E) code to be used for all +subsequent character writes/fills on the specified Video Unit (C). This +attribute is used to fill new lines generated by scroll operations. The +character attributes values are listed abovev. Note that a given video +display may or may not support any/all attributes. The Status (A) is a +standard HBIOS result code. ### Function 0x47 -- Video Set Character Color (VDASCO) -| _Entry Parameters_ -| B: 0x47 -| C: Video Device Unit ID -| E: Character Color Code - -| _Exit Results_ -| A: Status (0=OK, else error) - -Assign the specified color code to be used for all subsequent character -writes/fills. This color is also used to fill new lines generated by -scroll operations. Refer to color code table for a list of the available -color codes. Note that a given video display may or may not support -any/all colors. +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x47 | A: Status | +| C: Video Unit | | +| E: Color | | -### Function 0x48 -- Video Set Write Character (VDAWRC) +Assign the specified Color (E) code to be used for all subsequent +character writes/fills. This color is also used to fill new lines +generated by scroll operations. Refer to the color code table above for +a list of the available color codes. Note that a given video display may +or may not support any/all colors. The Status (A) is a standard HBIOS +result code. -| _Entry Parameters_ -| B: 0x48 -| C: Video Device Unit ID -| E: Character +### Function 0x48 -- Video Write Character (VDAWRC) -| _Exit Results_ -| A: Status (0=OK, else error) +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x48 | A: Status | +| C: Video Unit | | +| E: Character | | -Write the character specified in E. The character is written starting at -the current cursor position and the cursor is advanced. If the end of -the line is encountered, the cursor will be advanced to the start of the -next line. The display will **not** scroll if the end of the screen is -exceeded. +Write the Character (E) value to the display of the specified Video Unit +(C). The character is written starting at the current cursor position +and the cursor is advanced. If the end of the line is encountered, the +cursor will be advanced to the start of the next line. The display will +**not** scroll if the end of the screen is exceeded. The Status (A) is +a standard HBIOS result code. ### Function 0x49 -- Video Fill (VDAFIL) -| _Entry Parameters_ -| B: 0x49 -| C: Video Device Unit ID -| E: Character -| HL: Count - -| _Exit Results_ -| A: Status (0=OK, else error) - -Write the character specified in E to the display the number of times -specified in HL. Characters are written starting at the current cursor -position and the cursor is advanced by the number of characters written. -If the end of the line is encountered, the characters will continue to -be written starting at the next line as needed. The display will **not** -scroll if the end of the screen is exceeded. +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x49 | A: Status | +| C: Video Unit | | +| E: Character | | +| HL: Count | | + +Write the Character (E) value to the Video Unit (C) display the number +of times specified by Count (HL). Characters are written starting at the +current cursor position and the cursor is advanced by the number of +characters written. If the end of the line is encountered, the +characters will continue to be written starting at the next line as +needed. The display will **not** scroll if the end of the screen is +exceeded. Writing characters beyond the end of the screen results in +undefined behavior. The Status (A) is a standard HBIOS result code. ### Function 0x4A -- Video Copy (VDACPY) -| _Entry Parameters_ -| B: 0x4A -| C: Video Device Unit ID -| D: Source Row -| E: Source Column -| L: Count - -| _Exit Results_ -| A: Status (0=OK, else error) - -Copy count (L) bytes from the source row/column (DE) to current cursor -position. The cursor position is not updated. The maximum count is 255. -Copying to/from overlapping areas is not supported and will have an -undefined behavior. The display will **not** scroll if the end of the -screen is exceeded. Copying beyond the active screen buffer area is not -supported and results in undefined behavior. +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x4A | A: Status | +| C: Video Unit | | +| D: Source Row | | +| E: Source Column | | +| L: Count | | + +Copy Count (L) bytes from the specified Video Unit (C) display Source +Row (D) and Source Column (E) to the current cursor position. The cursor +position is not updated. The maximum Count (L) value is 255. Copying +to/from overlapping areas is not supported and will have an undefined +behavior. The display will **not** scroll if the end of the screen is +exceeded. Copying beyond the active screen buffer area is not supported +and results in undefined behavior. The Status (A) is a standard HBIOS +result code. ### Function 0x4B -- Video Scroll (VDASCR) -| _Entry Parameters_ -| B: 0x4B -| C: Video Device Unit ID -| E: Scroll Distance (Line Count) - -| _Exit Results_ -| A: Status (0=OK, else error) - -Scroll the video display by the number of lines specified in E. If E -contains a negative number, then reverse scroll should be performed. +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x4B | A: Status | +| C: Video Unit | | +| E: Lines | | + +Scroll the video display of the specified Video Unit (C) forward or +backwards by number of Lines (E) specified. If Lines (E) is positive, +then a forward scroll is performed. If Lines (E) contains a negative +number, then a reverse scroll will be performed. This function will +scroll the entire screen contents. New lines revealed during the scroll + operation will be filled with space characters (0x20) using the active +character attribute and color. The cursor position will **not** be +updated. The Status (A) is a standard HBIOS result code. ### Function 0x4C -- Video Keyboard Status (VDAKST) -| _Entry Parameters_ -| B: 0x4C -| C: Video Device Unit ID +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x4C | A: Status / Codes Pending | +| C: Video Unit | | -| _Exit Results_ -| A:Count of Key Codes in Keyboard Buffer +Return a count of the number of key Codes Pending (A) in the keyboard +buffer for the specified Video Unit (C). If it is not possible to +determine the actual number in the buffer, it is acceptable to return 1 +to indicate there are key codes available to read and 0 if there are +none available. -Return a count of the number of key codes in the keyboard buffer. If it -is not possible to determine the actual number in the buffer, it is -acceptable to return 1 to indicate there are key codes available to read -and 0 if there are none available. +The value returned in register A is used as both a Status (A) code and +the return value. Negative values (bit 7 set) indicate a standard HBIOS +result (error) code. Otherwise, the return value represents the number +of key codes pending. ### Function 0x4D -- Video Keyboard Flush (VDAKFL) -| _Entry Parameters_ -| B: 0x4D -| C: Video Device Unit ID - -| _Exit Results_ -| A: Status (0=OK, else error) +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x4D | A: Status | +| C: Video Unit | | -If a keyboard buffer is in use, it should be purged and all contents -discarded. +If a keyboard buffer is in use on the Video Unit (C) specified, it +should be purged and all contents discarded. The Status (A) is a +standard HBIOS result code. ### Function 0x4E -- Video Keyboard Read (VDAKRD) -| _Entry Parameters_ -| B: 0x4E -| C: Video Device Unit ID - -| _Exit Results_ -| A: Status (0=OK, else error) -| C: Scancode -| D: Keystate -| E: Keycode - -Read next key code from keyboard. If a keyboard buffer is used, return -the next key code in the buffer. If no key codes are available, wait for -a keypress and return the keycode. - -The scancode value is the raw scancode from the keyboard for the -keypress. Scancodes are from scancode set 2 standard. - -The keystate is a bitmap representing the value of all modifier keys and -shift states as they existed at the time of the keystroke. The bitmap is -defined as: - -Bit | Keystate Indication ---- | -------------------------------- -7 | Key pressed was from the num pad -6 | Caps Lock was active -5 | Num Lock was active -4 | Scroll Lock was active -3 | Windows key was held down -2 | Alt key was held down -1 | Control key was held down -0 | Shift key was held down - -Keycodes are generally returned as appropriate ASCII values, if -possible. Special keys, like function keys, are returned as reserved -codes as described at the start of this section. +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x4E | A: Status | +| C: Video Unit | C: Scancode | +| | D: Keystate | +| | E: Keycode | + +Read the next key data from keyboard of the specified Video Unit (C). If + a keyboard buffer is used, return the next key code in the buffer. If +no key data is available, this function will wait indefinitely for a +keypress. The Status (A) is a standard HBIOS result code. + +The Scancode (C) value is the raw scancode from the keyboard for the +keypress. Scancodes are from the PS/2 scancode set 2 standard. + +The Keystate (D) is a bitmap representing the value of all modifier keys + and shift states as they existed at the time of the keystroke. The +bitmap is defined as: + +| **Bit** | **Keystate Indication** | +|---------|----------------------------------| +| 7 | Key pressed was from the num pad | +| 6 | Caps Lock was active | +| 5 | Num Lock was active | +| 4 | Scroll Lock was active | +| 3 | Windows key was held down | +| 2 | Alt key was held down | +| 1 | Control key was held down | +| 0 | Shift key was held down | + +The Keycode (E) is generally returned as appropriate ASCII values, if +possible. Special keys, like function keys and arrows, are returned as +reserved codes as described at the start of this section. `\clearpage`{=latex} ### Function 0x4F -- Read a character at current video position (VDARDC) -| _Entry Parameters_ -| B: 0x4F -| C: Video Device Unit ID +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x4F | A: Status | +| C: Video Unit | E: Character | +| | B: Color | +| | E: Attribute | + +This function will return the character data from the current cursor +position of the display of the specified Video Unit (C). The data +returned includes the Character (E) value, the Color (B), and the +Attribute (E) corresponding to the current cursor position. If the +display does not support colors or attributes then this function will +return color white on black with no attributes. The ability to perform +this function may not be available for all video devices. The Status (A) +is a standard HBIOS result code. -| _Exit Results_ -| A: Status (0=OK, else error) -| E: Character -| B: Character Color Code -| C: Character Attribute Code +`\clearpage`{=latex} -Read a character from the current cursor position including it's colour -and attributes. If the display does not support colours or attributes -then return colour white on black and no attributes. If the device does -not support the ability to read a character, return error status +## Sound (SND) -`\clearpage`{=latex} +Sound functions require that a Sound Unit number be specified in +register C. This is the logical device unit number assigned during the +boot process that identifies all sound devices uniquely. -Sound (SND) ------------- +All sound units are assigned a Device Type ID which indicates +the specific hardware device driver that handles the unit. The table +below enumerates these values. -### Function 0x50 -- Sound Reset (SNDRESET) +| **Device Type** | **ID** | **Description** | **Driver** | +|-----------------|-------:|----------------------------------------------|-------------| +| SNDDEV_SN76489 | $00 | SN76489 Programmable Sound Generator | sn76489.asm | +| SNDDEV_AY38910 | $10 | AY-3-8910/YM2149 Programmable Sound Generator| ay38910.asm | +| SNDDEV_BITMODE | $20 | Bit-bang Speaker | spk.asm | +| SNDDEV_YM2612 | $30 | YM2612 Programmable Sound Generator | ym2612.asm | -| _Entry Parameters_ -| B: 0x50 -| C: Audio Device Unit ID +The Sound functions defer the actual programming of the sound chip +until the SNDPLAY function is called. You will call the volume +and period/note functions to preset the desired sound output, then +call SNDPLAY when you want the sound to change. -| _Exit Results_ -| A: Status (0=OK, else error) +The Sound functions do not manage the duration of the sound +played. A sound will play +indefinitely -- the caller must implement an appropriate timing +mechanism to manage the playing of a series of sounds. -Reset the sound chip. Turn off all sounds and set volume on all -channels to silence. +``` +HBIOS B=51 C=00 L=80 ; Set volume to half level +HBIOS B=53 C=00 HL=152 ; Select Middle C (C4) +HBIOS B=54 C=00 D=01 ; Play note on Channel 1 +``` -### Function 0x51 -- Sound Volume (SNDVOL) +### Function 0x50 -- Sound Reset (SNDRESET) + +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x50 | A: Status | +| C: Sound Unit | | -| _Entry Parameters_ -| B: 0x51 -| C: Audio Device Unit ID -| L: Volume (00=Silence, FF=Maximum) +Reset the sound chip of specified Sound Unit (C). Turn off all sounds +and set volume on all channels to silence. The returned Status (A) is a +standard HBIOS result code. -| _Exit Results_ -| A: Status (0=OK, else error) +### Function 0x51 -- Sound Volume (SNDVOL) + +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x51 | A: Status | +| C: Sound Unit | | +| L: Volume | | -This function sets the sound chip volume parameter. The volume will -be applied when the next SNDPLAY function is invoked. +This function sets the sound chip Volume (L) for the specified Sound +Unit (C). Volume (L) is a binary value ranging from 0 (silence) to 255 +(maximum). The volume will be applied when the next SNDPLAY function is +invoked. The returned Status (A) is a standard HBIOS result code. Note that not all sounds chips implement 256 volume levels. The driver will scale the volume to the closest possible level the @@ -1374,428 +1479,413 @@ chip provides. ### Function 0x52 -- Sound Period (SNDPRD) -| _Entry Parameters_ -| B: 0x52 -| C: Audio Device Unit ID -| HL: Period - -| _Returned Values_ -| A: Status (0=OK, else error) +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x52 | A: Status | +| C: Sound Unit | | +| HL: Period | | -This function sets the sound chip period parameter. The period will -be applied when the next SNDPLAY function is invoked. +This function sets the sound chip Period (HL) for the specified Sound +Unit (C). The period will be applied when the next SNDPLAY function is +invoked. The returned Status (A) is a standard HBIOS result code. -The period value is a driver specific value. To play standardized -notes, use the SNDNOTE function. A higher value will generate a lower -note. The maximum value that can be used is driver specific. If value -supplied is beyond driver capabilities, register A will be set to $FF. +The Period (HL) value is **not** a standardized value. The value is +programmed directly into the period or frequency register of the sound +chip. It is therefore a hardware dependent value. To play standardized +notes, use the SNDNOTE function. ### Function 0x53 -- Sound Note (SNDNOTE) -| _Entry Parameters_ -| B: 0x53 -| C: Audio Device Unit ID -| HL: Value of note to play - -| _Returned Values_ -| A: Status (0=OK, else error) - -This function sets the sound chip period parameter with steps of quarter -of a semitone. The value of 0 (lowest) corresponds to Bb/A# in octave 0. - -Increase by steps of 4 to select the next corresponding note. - -Increase by steps of 48 to select the same note in next octave. - -If the driver is able to generate the requested note, a success (0) is -returned, otherwise a non-zero error value will be returned. - -The sound chip resolution and its oscillator limit the range and -accuracy of the notes played. The typical range of the AY-3-8910 -is six octaves, Bb2/A#2-A7, where each value is a unique tone. Values -above and below can still be played but each quarter tone step may not -result in a note change. - -The following table shows the mapping of the input value in HL -to the corresponding octave and note. - -| Note | Oct 0 | Oct 1 | Oct 2 | Oct 3 | Oct 4 | Oct 5 | Oct 6 | Oct 7 | -|:----- | -----:| -----:| -----:| -----:| -----:| -----:| -----:| -----:| -| C | X | 8 | 56 | 104 | 152 | 200 | 248 | 296 | -| C#/Db | X | 12 | 60 | 108 | 156 | 204 | 252 | 300 | -| D | X | 16 | 64 | 112 | 160 | 208 | 256 | 304 | -| D#/Eb | X | 20 | 68 | 116 | 164 | 212 | 260 | 308 | -| E | X | 24 | 72 | 120 | 168 | 216 | 264 | 312 | -| F | X | 28 | 76 | 124 | 172 | 220 | 268 | 316 | -| F#/Gb | X | 32 | 80 | 128 | 176 | 224 | 272 | 320 | -| G | X | 36 | 84 | 132 | 180 | 228 | 276 | 324 | -| G#/Ab | X | 40 | 88 | 136 | 184 | 232 | 280 | 328 | -| A | X | 44 | 92 | 140 | 188 | 236 | 284 | 332 | -| A#/Bb | 0 | 48 | 96 | 144 | 192 | 240 | 288 | 336 | -| B | 4 | 52 | 100 | 148 | 196 | 244 | 292 | 340 | +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x53 | A: Status | +| C: Sound Unit | | +| HL: Note | | + +This function sets the frequency generated by the sound of the specified +Sound Unit (C). The frequency is standardized and is specified by +using values that correspond to musical notes. The frequency will be +applied when the next SNDPLAY function is invoked. The returned Status +(A) is a standard HBIOS result code. + +The Note (HL) values correspond to quarter notes. Increasing/decreasing +the value by 4 results in a full note increment/decrement. +Increasing/decreasing the value by 48 results in a full octave +increment/decrement. The value 0 corresponds to Bb/A# in octave 0. + +The sound chip resolution and its oscillator limit the range and +accuracy of the notes played. The typical range of the AY-3-8910 is six +octaves: Bb2/A#2 to A7, where each value is a unique tone. Values above +and below can still be played but each quarter tone step may not result +in a note change. + +The following table shows the mapping of the Note (HL) value to the +corresponding octave and note. + ++------------+-------+-------+-------+-------+-------+-------+-------+-------+ +| | **Octave** | +| +-------+-------+-------+-------+-------+-------+-------+-------+ +| **Note** | **0** | **1** | **2** | **3** | **4** | **5** | **6** | **7** | ++============+=======+=======+=======+=======+=======+=======+=======+=======+ +| **C** | \- | 8 | 56 | 104 | 152 | 200 | 248 | 296 | ++------------+-------+-------+-------+-------+-------+-------+-------+-------+ +| **C#/Db** | \- | 12 | 60 | 108 | 156 | 204 | 252 | 300 | ++------------+-------+-------+-------+-------+-------+-------+-------+-------+ +| **D** | \- | 16 | 64 | 112 | 160 | 208 | 256 | 304 | ++------------+-------+-------+-------+-------+-------+-------+-------+-------+ +| **D#/Eb** | \- | 20 | 68 | 116 | 164 | 212 | 260 | 308 | ++------------+-------+-------+-------+-------+-------+-------+-------+-------+ +| **E** | \- | 24 | 72 | 120 | 168 | 216 | 264 | 312 | ++------------+-------+-------+-------+-------+-------+-------+-------+-------+ +| **F** | \- | 28 | 76 | 124 | 172 | 220 | 268 | 316 | ++------------+-------+-------+-------+-------+-------+-------+-------+-------+ +| **F#/Gb** | \- | 32 | 80 | 128 | 176 | 224 | 272 | 320 | ++------------+-------+-------+-------+-------+-------+-------+-------+-------+ +| **G** | \- | 36 | 84 | 132 | 180 | 228 | 276 | 324 | ++------------+-------+-------+-------+-------+-------+-------+-------+-------+ +| **G#/Ab** | \- | 40 | 88 | 136 | 184 | 232 | 280 | 328 | ++------------+-------+-------+-------+-------+-------+-------+-------+-------+ +| **A** | \- | 44 | 92 | 140 | 188 | 236 | 284 | 332 | ++------------+-------+-------+-------+-------+-------+-------+-------+-------+ +| **A#/Bb** | 0 | 48 | 96 | 144 | 192 | 240 | 288 | 336 | ++------------+-------+-------+-------+-------+-------+-------+-------+-------+ +| **B** | 4 | 52 | 100 | 148 | 196 | 244 | 292 | 340 | ++------------+-------+-------+-------+-------+-------+-------+-------+-------+ ### Function 0x54 -- Sound Play (SNDPLAY) -| _Entry Parameters_ -| B: 0x54 -| C: Audio Device Unit ID -| D: Channel - -| _Returned Values_ -| A: Status (0=OK, else error) +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x54 | A: Status | +| C: Sound Unit | | +| D: Channel | | -This function applies the previously specified volume and period by -programming the sound chip with the appropriate values. The values -are applied to the specified channel of the chip. +This function applies the previously specified volume and frequency of +the specified Sound Unit (C) by programming the sound chip with the +appropriate values. The values are applied to the specified Channel (D) +of the chip. The returned Status (A) is a standard HBIOS result code. -For example, to play a specific note on Audio Device Unit 0, -the following HBIOS calls would need to be made: +Note that there is no duration for the sound output -- the programmed +sound will be played indefinitely. It is up to the user to wait the +desired amount of time, then change or silence the sound output as +desired. -``` -HBIOS B=51 C=00 L=80 ; Set volume to half level -HBIOS B=53 C=00 HL=152 ; Select Middle C (C4) -HBIOS B=54 C=00 D=01 ; Play note on Channel 1 -``` +The number of channels available on a sound chip varies. It is up to +the caller to ensure that the appropriate number of channels are being +programmed. ### Function 0x55 -- Sound Query (SNDQUERY) -| _Entry Parameters_ -| B: 0x55 -| C: Audio Device Unit ID -| E: Subfunction - -| _Returned Values_ -| A: Status (0=OK, else error) +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x55 | A: Status | +| C: Sound Unit | | +| E: Subfunction | | -This function will return the status of the current pending command or -key aspects of the specific Audio Device. +This function will return a variety of information for a specified Sound +Unit (C) according to the Subfunction (E) specified. The returned +Status (A) is a standard HBIOS result code. #### SNDQUERY Subfunction 0x01 -- Get count of audio channels supported (SNDQ_CHCNT) -| _Entry Parameters_ -| B: 0x55 -| E: 0x01 - -| _Returned Values_ -| A: Status (0=OK, else error) -| B: Count of standard tone channels -| C: Count of noise tone channels +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x55 | A: Status | +| C: Sound Unit | B: Tone Channels | +| E: 0x01 | C: Noise Channels | #### SNDQUERY Subfunction 0x02 -- Get current volume setting (SNDQ_VOL) -| _Entry Parameters_ -| B: 0x55 -| E: 0x02 - -| _Returned Values_ -| A: Status (0=OK, else error) -| H: 0 -| L: Current volume setting - -#### SNDQUERY Subfunction 0x03 -- Get current period setting (SNDQ_PERIOD) +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x55 | A: Status | +| C: Sound Unit | L: Volume | +| E: 0x02 | | -| _Entry Parameters_ -| B: 0x55 -| E: 0x03 +#### SNDQdERY Subfunction 0x03 -- Get current period setting (SNDQ_PERIOD) -| _Returned Values_ -| A: Status (0=OK, else error) -| HL: Current period setting +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x55 | A: Status | +| C: Sound Unit | HL: Period | +| E: 0x03 | | #### SNDQUERY Subfunction 0x04 -- Get device details (SNDQ_DEV) -| _Entry Parameters_ -| B: 0x55 -| E: 0x04 - -| _Returned Values_ -| A: Status (0=OK, else error) -| B: Driver identity -| HL: Driver specific port settings -| DE: Driver specific port settings - -Reports information about the audio device unit specified. +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x55 | A: Status | +| C: Sound Unit | B: Driver Identity | +| E: 0x04 | HL: Ports | +| | DE: Ports | -Register B reports the audio device type (see below). +This subfunction reports detailed device informatoin for the specified +Sound Unit (C). -Registers HL and DE contain relevant port addresses for the hardware -specific to each device type. +Driver Identity (B) reports the audio device type. Ports (HL & DE) +return relevant port addresses for the hardware specific to each device +type. -The currently defined audio device types are: +The following table defines the specific port information per device +type: -AUDIO ID | Value | Device | Returned registers --------------- | ----- | ---------- | -------------------------------------------- -SND_SN76489 | 0x01 | SN76489 | E: Left channel port, L: Right channel port -SND_AY38910 | 0x02 | AY-3-8910 | D: Address port, E: Data port -SND_BITMODE | 0x03 | I/O PORT | D: Address port, E: Bit mask -SND_YM2612 | 0x04 | YM2612 | D: Part 0 Address port, E: Part 0 Data port - | | | H: Part 1 Address port, L: Part 1 Data port +| *Audio ID* | *Value* | *Device* | *Returned Registers* | +|----------------| -------:|------------|---------------------------------------------| +| SND_SN76489 | 0x01 | SN76489 | E=Left channel port, L=Right channel port | +| SND_AY38910 | 0x02 | AY-3-8910 | D=Address port, E=Data port | +| SND_BITMODE | 0x03 | I/O PORT | D=Address port, E=Bit mask | +| SND_YM2612 | 0x04 | YM2612 | Part 0: D=Address port, E=Data port | +| | | | Part 1: D=Address port, L=Part 1 Data port | ### Function 0x56 -- Sound Duration (SNDDUR) -| _Entry Parameters_ -| B: 0x56 -| C: Audio Device Unit ID -| HL: Duration - -| _Returned Values_ -| A: Status (0=OK, else error) +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x56 | A: Status | +| C: Sound Unit | | +| HL: Duration | | -This function sets the duration of the note to be played in milliseconds. +This function sets the Duration (HL) of the note to be played in +milliseconds for the specified Sound Unit (C). This function just sets +the duration, the actual duration is applied in the SNDPLAY function. -If the duration is set to zero, then the play function will operate in a non-blocking -mode. i.e. a tone will start playing and the play function will return. The tone will -continue to play until the next tone is played. I/O PORT are not compatible and will -not play a note if the duration is zero. +If the Duration (HL) is set to zero, then the SNDPLAY function will +operate in a non-blocking mode. i.e. a tone will start playing and the +play function will return. The tone will continue to play until the next + tone is played. If the Duration (HL) is greater than zero, the the +sound will play for the duration defined in HL and then return. -For other values, when a tone is played, it will play for the duration defined in HL -and then return. +**\*\*\* Function Not Implemented \*\*\** ### Function 0x57 -- Sound Device (SNDDEVICE) -| _Entry Parameters_ -| B: 0x57 -| C: Sound Device Unit Number - -| _Exit Results_ -| A: Status (0=OK, else error) -| D: Sound Device Type -| E: Sound Device Number -| H: Sound Device Unit Mode -| L: Sound Device Unit I/O Base Address - -Reports information about the sound device unit specified. Register D -indicates the device type (driver) and register E indicates the physical -device number assigned by the driver. - -Each character device is handled by an appropriate driver (AY38910, SN76489, -etc.). The driver can be identified by the Device Type. The assigned Device -Types are listed below. - -_Id_ | _Device Type / Driver_ ----- | ---------------------- -0x00 | SN76489 -0x10 | AY38910 -0x20 | BITMODE -0x30 | YM2612 +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0x57 | A: Status | +| C: Disk Unit | C: Device Attributes | +| | D: Device Type | +| | E: Device Number | +| | H: Device Unit Mode | +| | L: Device I/O Base Address | + +Reports device information about the specified Sound Unit (C). The +Status (A) is a standard HBIOS result code. + +The Device Attributes (C) value is not yet defined. + +Device Type (D) indicates the specific hardware driver that handles the +specified Sound Unit (C). Values are listed at the start of this +section. Device Number (E) indicates the physical device number assigned +per driver. + +Device Mode (H) is used to indicate the variant of the chip or circuit +that is used by the specified unit. The Device I/O Base Address +(L) indicates the starting port address of the hardware interface that +is servicing the specified unit. Both of these values are considered +driver specific. Refer to the associated hardware driver for the values +used. `\clearpage`{=latex} -System (SYS) ------------- +## System (SYS) ### Function 0xF0 -- System Reset (SYSRESET) -| _Entry Parameters_ -| B: 0xF0 -| C: Subfunction (see below) - -| _Exit Results_ -| A: Status (0=OK, else error) +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0xF0 | A: Status | +| C: Subfunction | | This function performs various forms of a system reset depending on -the value of the subfunction. See subfunctions below. - -#### SYSRESET Subfunction 0x00 -- Internal HBIOS Reset (RESINT) - -| _Entry Parameters_ -| BC: 0xF000 - -| _Returned Values_ -| A: Status (0=OK, else error) - -Perform a soft reset of HBIOS. Releases all HBIOS memory allocated by -current OS. Does not reinitialize physical devices. +the value of Subfunction (C): -#### SYSRESET Subfunction 0x01 -- Warm Start System (RESWARM) +Soft Reset (0x00): -| _Entry Parameters_ -| BC: 0xF001 + : Perform a soft reset of HBIOS. Releases all HBIOS memory allocated + by current OS. Does not reinitialize physical devices. -| _Returned Values_ -| +Warm Start (0x01): -Warm start the system returning to the boot loader prompt. Does not -reinitialize physical devices. + : Warm start the system returning to the boot loader prompt. Does not + reinitialize physical devices. + +Cold Start (0x02): -#### SYSRESET Subfunction 0x02 -- Cold Start System (RESCOLD) + : Perform a system cold start (like a power on). All devices are + reinitialized. -| _Entry Parameters_ -| BC: 0xF002 - -| _Returned Values_ -| - -Perform a system cold start (like a power on). All devices are -reinitialized. +The Status (A) is a standard HBIOS result code. ### Function 0xF1 -- System Version (SYSVER) -| _Entry Parameters_ -| B: 0xF1 -| C: Reserved (set to 0) - -| _Exit Results_ -| A: Status (0=OK, else error) -| DE: Version (Maj/Min/Upd/Pat) -| L: Platform ID - -This function will return the HBIOS version number. The version number -is returned in DE. High nibble of D is the major version, low nibble of -D is the minor version, high nibble of E is the patch number, and low -nibble of E is the build number. - -The hardware platform is identified in L: - -Id | Platform --- | --------------------------------------------------- -1 | SBC V1 or V2 -2 | Zeta -3 | Zeta V2 -4 | N8 -5 | Mark IV -6 | UNA -7 | RC2014 w/ Z80 -8 | RC2014 w/ Z180 & banked memory module -9 | RC2014 w/ Z180 & linear memory module -10 | SCZ180 (SC126, SC130, SC131) -11 | Dyno +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0xF1 | A: Status | +| C: Reserved | DE: Version | +| | L: Platform | + +This function will return the HBIOS Version (DE) number and Platform (L) +identifier. The Status (A) is a standard HBIOS result code. + +The Version (DE)number is encoded as BCD where the 4 digits are: + + [Major Version][Minor Version][Patch Level][Build Number] + +So, for example, a Version (L) number of 0x3102 would indicate +version 3.1.0, build 2. + +The hardware Platform (L) is identified as follows: + +| **Name** | **Id** | **Platform ** | +|---------------|-------:|-----------------------------------------| +| PLT_SBC |1 | ECB Z80 SBC | +| PLT_ZETA |2 | ZETA Z80 SBC | +| PLT_ZETA2 |3 | ZETA Z80 V2 SBC | +| PLT_N8 |4 | N8 (HOME COMPUTER) Z180 SBC | +| PLT_MK4 |5 | MARK IV | +| PLT_UNA |6 | UNA BIOS | +| PLT_RCZ80 |7 | RCBUS W/ Z80 | +| PLT_RCZ180 |8 | RCBUS W/ Z180 | +| PLT_EZZ80 |9 | EASY/TINY Z80 | +| PLT_SCZ180 |10 | RCBUS SC126, SC130, SC131, SC140 | +| PLT_DYNO |11 | DYNO MICRO-ATX MOTHERBOARD | +| PLT_RCZ280 |12 | RCBUS W/ Z280 | +| PLT_MBC |13 | NHYODYNE MULTI-BOARD COMPUTER | +| PLT_RPH |14 | RHYOPHYRE GRAPHICS SBC | ### Function 0xF2 -- System Set Bank (SYSSETBNK) -| _Entry Parameters_ -| B: 0xF2 -| C: Bank ID - -| _Exit Results_ -| A: Status (0=OK, else error) -| C: Previously Active Bank ID +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0xF2 | A: Status | +| C: Bank ID | C: Prior Bank ID | -Activates the Bank ID specified in C and returns the previously active -Bank ID in C. The caller MUST be invoked from code located in the upper -32K and the stack **must** be in the upper 32K. +Activates the specified memory Bank ID (C) and returns the Prior Bank ID + (C). The function **must** be invoked from code located in the upper +32K and the stack **must** be in the upper 32K. The Status (A) is a +standard HBIOS result code. ### Function 0xF3 -- System Get Bank (SYSGETBNK) -| _Entry Parameters_ -| B: 0xF3 - -| _Exit Results_ -| A: Status (0=OK, else error) -| C: Active Bank ID +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0xF3 | A: Status | +| | C: Bank ID | -Returns the currently active Bank ID in C. +Returns the currently active Bank ID (C). The Status (A) is a standard +HBIOS result code. ### Function 0xF4 -- System Set Copy (SYSSETCPY) -| _Entry Parameters_ -| B: 0xF4 -| D: Destination Bank ID -| E: Source Bank ID -| HL: Count of Bytes to Copy - -| _Exit Results_ -| A: Status (0=OK, else error) - -Prepare for a subsequent interbank memory copy (SYSBNKCPY) function by -setting the source bank, destination bank, and byte count for the copy. -The bank id's are not range checked and must be valid for the system in -use. - -No bytes are copied by this function. The SYSBNKCPY must be called to -actually perform the copy. The values setup by this function will remain -unchanged until another call is make to this function. So, after calling -SYSSETCPY, you may make multiple calls to SYSBNKCPY as long as you want -to continue to copy between the already established Source/Destination -Banks and the same size copy if being performed. +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0xF4 | A: Status | +| D: Destination Bank ID | | +| E: Source Bank ID | | +| HL: Byte Count | | + +Prepare for a subsequent interbank memory copy (SYSBNKCPY) function call +by setting the Source Bank ID (E), Destination Bank ID (D), and Byte Count +(HL) to be copied. The bank ID's are not range checked and must +be valid for the system in use. The Status (A) is a standard +HBIOS result code. + +No bytes are copied by this function. The SYSBNKCPY function must be +called to actually perform the copy. The values setup by this function +will remain unchanged until another call is make to this function. So, +after calling SYSSETCPY, you may make multiple calls to SYSBNKCPY as +long as you want to continue to copy between the already established +Source/Destination Banks and the same size copy is being performed. ### Function 0xF5 -- System Bank Copy (SYSBNKCPY) -| _Entry Parameters_ -| B: 0xF5 -| DE: Destination Address -| HL: Source Address - -| _Exit Results_ -| A: Status (0=OK, else error) +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0xF5 | A: Status | +| DE: Destination Address | DE: New Destination Address | +| HL: Source Address | HL: New Source Address | -Copy memory between banks. The source bank, destination bank, and byte -count to copy MUST be established with a prior call to SYSSETCPY. +Copy a block of memory between banks. The Source Bank, Destination Bank, and Byte +Count to copy **must** be established with a prior call to SYSSETCPY. However, it is not necessary to call SYSSETCPY prior to subsequent calls to SYSBNKCPY if the source/destination banks and copy length do not change. +On return, the New Destination Address (DE) will be value of the +original Destination Address (DE) incremented by the count of bytes +copied. Likewise for the New Source Address (HL). This allows +iterative invocations of this function to continue copying where the +prior invocation left off. + +The Status (A) is a standard HBIOS result code. + WARNINGS: * This function is inherently dangerous and does not prevent you from -corrupting critical areas of memory. Use with **extreme** caution. + corrupting critical areas of memory. Use with **extreme** caution. * Overlapping source and destination memory ranges are not supported and -will result in undetermined behavior. + will result in undetermined behavior. * Copying of byte ranges that cross bank boundaries is undefined. ### Function 0xF6 -- System Alloc (SYSALLOC) -| _Entry Parameters_ -| B: 0xF6 -| HL: Size in Bytes - -| _Exit Results_ -| A: Status (0=OK, else error) -| HL: Address of Allocated Memory +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0xF6 | A: Status | +| HL: Block Size | HL: Block Address | -This function will attempt to allocate a block of memory of HL bytes -from the internal HBIOS heap. The HBIOS heap resides in the HBIOS bank -in the area of memory left unused by HBIOS. If the allocation is -successful, the address of the allocated memory block is returned in HL. -You will typically want to use the SYSBNKCPY function to read/write the -allocated memory. +This function will attempt to allocate a Block Size (HL) bytes block of +memory from the internal HBIOS heap. The HBIOS heap resides in the HBIOS +bank in the area of memory left unused by HBIOS. If the allocation is +successful, the Block Address (HL) of the allocated memory block is +returned in HL. You will typically need to use the SYSBNKCPY function to +read/write the allocated memory. The Status (A) is a standard HBIOS +result code. ### Function 0xF7 -- System Free (SYSFREE) -| _Entry Parameters_ -| B: 0xF7 -| HL: Address of Memory Block to Free +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0xF7 | A: Status | +| HL: Block Address | | -| _Returned Values_ -| A: Status (0=OK, else error) +**\*\*\* Function Not Implemented \*\*\*** -\*\*\* This function is not yet implemented \*\*\* +Note that all allocated memory can be freed by calling the SYSRESET +function with a subfunction code of 0x00 (Soft Reset). ### Function 0xF8 -- System Get (SYSGET) -| _Entry Parameters_ -| B: 0xF8 -| C: Subfunction (see below) - -| _Returned Values_ -| A: Status (0=OK, else error) +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0xF8 | A: Status | +| C: Subfunction | | -This function will report various system information based on the -sub-function value. The following lists the subfunctions -available along with the registers/information returned. +This function will report various system information based on the +sub-function value. The following lists the subfunctions available along +with the registers/information utilized. The Status (A) is a standard +HBIOS result code. -#### SYSGET Subfunction 0x00 -- Get Serial Device Unit Count (CIOCNT) +#### SYSGET Subfunction 0x00 -- Get Character Device Unit Count (CIOCNT) -| _Entry Parameters_ -| BC: 0xF800 +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0xF8 | A: Status | +| C: 0x00 | E: Count | -| _Returned Values_ -| A: Status (0=OK, else error) -| E: Count of Serial Device Units +Return the Count (E) of character device units. The Status (A) is a +standard HBIOS result code. #### SYSGET Subfunction 0x01 -- Get Serial Unit Function (CIOFN) -| _Entry Parameters_ -| BC: 0xF801 -| D: CIO Function -| E: Unit - -| _Returned Values_ -| A: Status (0=OK, else error) -| HL: Driver Function Address -| DE: Unit Data Address +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0xF8 | A: Status | +| C: 0x01 | HL: Function Address | +| D: Function | DE: Unit Data Address | +| E: Unit | | This function will lookup the actual driver function address and unit data address inside the HBIOS driver. On entry, place the @@ -1803,7 +1893,8 @@ CIO function number to lookup in D and the CIO unit number in E. On return, HL will contain the address of the requested function in the HBIOS driver (in the HBIOS bank). DE will contain the associated unit data address (also in the HBIOS bank). See -Appendix A for details. +Appendix A for details. The returned Status (A) is a standard HBIOS +result code. This function can be used to speed up HBIOS calls by looking up the function and data address for a specific driver function. After this, @@ -1813,31 +1904,31 @@ lookup. #### SYSGET Subfunction 0x10 -- Get Disk Device Unit Count (DIOCNT) -| _Entry Parameters_ -| BC: 0xF810 +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0xF8 | A: Status | +| C: 0x10 | E: Count | -| _Returned Values_ -| A: Status (0=OK, else error) -| E: Count of Disk Device Units +Return the Count (E) of disk device units. The Status (A) is a +standard HBIOS result code. #### SYSGET Subfunction 0x11 -- Get Disk Unit Function (DIOFN) -| _Entry Parameters_ -| BC: 0xF811 -| D: DIO Function -| E: Unit - -| _Returned Values_ -| A: Status (0=OK, else error) -| HL: Driver Function Address -| DE: Unit Data Address +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0xF8 | A: Status | +| C: 0x11 | HL: Function Address | +| D: Function | DE: Unit Data Address | +| E: Unit | | This function will lookup the actual driver function address and unit data address inside the HBIOS driver. On entry, place the DIO function number to lookup in D and the DIO unit number in E. On return, HL will contain the address of the requested function in the HBIOS driver (in the HBIOS bank). DE will contain the -associated unit data address (also in the HBIOS bank). +associated unit data address (also in the HBIOS bank). See +Appendix A for details. The returned Status (A) is a standard HBIOS +result code. This function can be used to speed up HBIOS calls by looking up the function and data address for a specific driver function. After this, @@ -1845,35 +1936,34 @@ the caller can use interbank calls directly to the function in the driver which bypasses the overhead of the normal function invocation lookup. -#### SYSGET Subfunction 0x20 -- Get Disk Device Unit Count (RTCCNT) +#### SYSGET Subfunction 0x20 -- Get RTC Device Unit Count (RTCCNT) -| _Entry Parameters_ -| BC: 0xF820 +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0xF8 | A: Status | +| C: 0x20 | E: Count | -| _Returned Values_ -| A: Status (0=OK, else error) -| E: Count of RTC Device Units +Return the Count (E) of RTC device units. The Status (A) is a +standard HBIOS result code. #### SYSGET Subfunction 0x40 -- Get Video Device Unit Count (VDACNT) -| _Entry Parameters_ -| BC: 0xF840 +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0xF8 | A: Status | +| C: 0x40 | E: Count | -| _Returned Values_ -| A: Status (0=OK, else error) -| E: Count of Video Device Units +Return the Count (E) of video device units. The Status (A) is a +standard HBIOS result code. #### SYSGET Subfunction 0x41 -- Get Video Unit Function (VDAFN) -| _Entry Parameters_ -| BC: 0xF841 -| D: VDA Function -| E: Unit - -| _Returned Values_ -| A: Status (0=OK, else error) -| HL: Driver Function Address -| DE: Unit Data Address +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0xF8 | A: Status | +| C: 0x41 | HL: Function Address | +| D: Function | DE: Unit Data Address | +| E: Unit | | This function will lookup the actual driver function address and unit data address inside the HBIOS driver. On entry, place the @@ -1881,7 +1971,8 @@ VDA function number to lookup in D and the VDA unit number in E. On return, HL will contain the address of the requested function in the HBIOS driver (in the HBIOS bank). DE will contain the associated unit data address (also in the HBIOS bank). See -Appendix A for details. +Appendix A for details. The returned Status (A) is a standard HBIOS +result code. This function can be used to speed up HBIOS calls by looking up the function and data address for a specific driver function. After this, @@ -1891,24 +1982,22 @@ lookup. #### SYSGET Subfunction 0x50 -- Get Sound Device Unit Count (SNDCNT) -| _Entry Parameters_ -| BC: 0xF850 +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0xF8 | A: Status | +| C: 0x50 | E: Count | -| _Returned Values_ -| A: Status (0=OK, else error) -| E: Count of Sound Device Units +Return the Count (E) of sound device units. The Status (A) is a +standard HBIOS result code. #### SYSGET Subfunction 0x51 -- Get Sound Unit Function (SNDFN) -| _Entry Parameters_ -| BC: 0xF851 -| D: SND Function -| E: Unit - -| _Returned Values_ -| A: Status (0=OK, else error) -| HL: Driver Function Address -| DE: Unit Data Address +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0xF8 | A: Status | +| C: 0x51 | HL: Function Address | +| D: Function | DE: Unit Data Address | +| E: Unit | | This function will lookup the actual driver function address and unit data address inside the HBIOS driver. On entry, place the @@ -1916,7 +2005,8 @@ SND function number to lookup in D and the SND unit number in E. On return, HL will contain the address of the requested function in the HBIOS driver (in the HBIOS bank). DE will contain the associated unit data address (also in the HBIOS bank). See -Appendix A for details. +Appendix A for details. The returned Status (A) is a standard HBIOS +result code. This function can be used to speed up HBIOS calls by looking up the function and data address for a specific driver function. After this, @@ -1926,137 +2016,172 @@ lookup. #### SYSGET Subfunction 0xD0 -- Get Timer Tick Count (TIMER) -| _Entry Parameters_ -| BC: 0xF8D0 +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0xF8 | A: Status | +| C: 0xD0 | DEHL: Tick Count | +| | C: Frequency | + +Return the value of the global system timer Tick Count (DEHL). This is +a double-word binary value. The frequency of the system timer in Hertz +is returned in Frequncy (C). The returned Status (A) is a standard HBIOS +result code. -| _Returned Values_ -| A: Status (0=OK, else error) -| DE:HL: Current Timer Tick Count Value -| C: Tick frequency (typically 50 or 60) +Note that not all hardware configuration have a system timer. You +can determine if a timer exists by calling this function repeatedly +to see if it is incrementing. #### SYSGET Subfunction 0xD1 -- Get Seconds Count (SECONDS) -| _Entry Parameters_ -| BC: 0xF8D1 +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0xF8 | A: Status | +| C: 0xD1 | DEHL: Seconds Count | +| | C: Ticks per Second | + +Return the a Seconds Count (DEHL) with the number of seconds that have +elapsed since the system was started. This is a double-word binary +value. Additionally, the number of Ticks per Second (C) is returned. +The returned Status (A) is a standard HBIOS result code. -| _Returned Values_ -| A: Status (0=OK, else error) -| DE:HL: Current Seconds Count Value -| C: Ticks within Second Value +This availability of the Seconds Count (DEHL) is dependent on having a +system timer active. If the hardware configuration has no system timer, +then Seconds Count (DEHL) will not increment. #### SYSGET Subfunction 0xE0 -- Get Boot Information (BOOTINFO) -| _Entry Parameters_ -| BC: 0xF8E0 +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0xF8 | A: Status | +| C: 0xE0 | L: Boot Bank ID | +| | D: Boot Disk Unit | +| | E: Boot Disk Slice | -| _Returned Values_ -| A: Status (0=OK, else error) -| L: Boot Bank ID -| D: Boot Disk Device Unit ID -| E: Boot Disk Slice +This function returns information about the most recent boot operation +performed. It includes the Boot Bank ID (L), the Boot Disk Unit (D), +and the Boot Disk Slice (E). The returned Status (A) is a standard +HBIOS result code. #### SYSGET Subfunction 0xF0 -- Get CPU Information (CPUINFO) -| _Entry Parameters_ -| BC: 0xF8F0 - -| _Returned Values_ -| A: Status (0=OK, else error) -| H: Z80 CPU Variant -| L: CPU Speed in MHz -| DE: CPU Speed in KHz -| BC: Oscillator Speed in KHz +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0xF8 | A: Status | +| C: 0xF0 | H: Z80 CPU Variant | +| | L: CPU Speed MHz | +| | DE: CPU Speed KHz | +| | BC: Oscillator Speed KHz | + +This function returns information about the active CPU environment. The +Z80 CPU Variant (H) will be one of: 0=Z80, 1=Z180, 2=Z180-K, 3=Z180-N, +4=Z280. The current CPU speed is provided as both CPU Speed MHz (L) and +CPU Speed KHz (DE). The raw oscillator speed is provided as Oscillator +Speed KHz (BC). The returned Status (A) is a standard HBIOS result +code. #### SYSGET Subfunction 0xF1 -- Get Memory Information (MEMINFO) -| _Entry Parameters_ -| BC: 0xF8F1 +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0xF8 | A: Status | +| C: 0xF1 | D: ROM Bank Count | +| | E: RAM Bank Count | -| _Returned Values_ -| A: Status (0=OK, else error) -| D: Count of 32K ROM Banks -| E: Count of 32K RAM Banks +This function returns the systems ROM Bank Count (D) and RAM Bank Count +(E). Each bank is 32KB by definition. The returned Status (A) is a +standard HBIOS result code. #### SYSGET Subfunction 0xF2 -- Get Bank Information (BNKINFO) -| _Entry Parameters_ -| BC: 0xF8F2 +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0xF8 | A: Status | +| C: 0xF2 | D: BIOS Bank ID | +| | E: User Bank ID | -| _Returned Values_ -| A: Status (0=OK, else error) -| D: BIOS Bank ID -| E: User Bank ID +Certain memory banks within a RomWBW system are special. The exact bank +id for each of these varies depending on the configuration of the +system. This function can be used to determine the BIOS Bank ID (D) and +the User Bank ID (E). The returned Status (A) is a standard HBIOS +result code. #### SYSGET Subfunction 0xF3 -- Get CPU Speed (CPUSPD) -| _Entry Parameters_ -| BC: 0xF8F3 - -| _Returned Values_ -| A: Status (0=OK, else error) -| L: Clock Mult (0:Half, 1:Full, 2: Double) -| D: Memory Wait States -| E: I/O Wait States - -This function will return the running CPU speed attributes of a system. -Note that it is frequently impossible to tell if a system is capable -of dynamic speed changes. This function returns it's best guess. -If either of the wait state settings is unknown, the function will -return 0xFF. +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0xF8 | A: Status | +| C: 0xF3 | L: Clock Mult | +| | D: Memory Wait States | +| | E: I/O Wait States | + +This function will return the running CPU speed attributes of a system. +The Clock Mult (L) returned indicates the frequency multiple being +applied to the raw oscillator clock. If is defined as: 0=Half, 2=Full, +and 3=Double. The wait states for the system are also provided as +Memory Wait States (D) and I/O Wait States (E). The value of Memory +Wait States (D) is the actual number of wait states, not the number +of wait states added. The returned Status (A) is a standard HBIOS +result code. ### Function 0xF9 -- System Set (SYSSET) -| _Entry Parameters_ -| B: 0xF9 -| C: Subfunction (see below) - -| _Returned Values_ -| A: Status (0=OK, else error) +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0xF9 | A: Status | +| C: Subfunction | | -This function will set various system parameters based on the -sub-function value. The following lists the subfunctions -available along with the registers/information used as input. +This function will set various system parameters based on the +sub-function value. The following lists the subfunctions available along +with the registers/information utilized. The Status (A) is a standard +HBIOS result code. #### SYSSET Subfunction 0xD0 -- Set Timer Tick Count (TIMER) -| _Entry Parameters_ -| BC: 0xF9D0 -| DE:HL: Timer Tick Count Value - -| _Returned Values_ -| A: Status (0=OK, else error) +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0xF9 | A: Status | +| C: 0xD0 | DEHL: Timer Tick Count | +This function will explicitly set the system Timer Tick Count (DEHL) +value. DEHL is a double-word binary value. The Status (A) is a +standard HBIOS result code. #### SYSSET Subfunction 0xD1 -- Set Seconds Count (SECONDS) -| _Entry Parameters_ -| BC: 0xF9D1 -| DE:HL: Seconds Count Value +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0xF9 | A: Status | +| C: 0xD1 | | +| DEHL: Seconds Count | | -| _Returned Values_ -| A: Status (0=OK, else error) +This function will explicitly set the system Seconds Count (DEHL) value. +DEHL is a double-word binary value. The Status (A) is a standard +HBIOS result code. #### SYSSET Subfunction 0xE0 -- Set Boot Information (BOOTINFO) -| _Entry Parameters_ -| BC: 0xF9E0 -| L: Boot Bank ID -| D: Boot Disk Device Unit ID -| E: Boot Disk Slice +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0xF9 | A: Status | +| C: 0xE0 | | +| L: Boot Bank ID | | +| D: Boot Disk Unit | | +| E: Boot Disk Slice | | -| _Returned Values_ -| A: Status (0=OK, else error) +This function sets information about the most recent boot operation +performed. It includes the Boot Bank ID (L), the Boot Disk Unit (D), +and the Boot Disk Slice (E). The returned Status (A) is a standard +HBIOS result code. #### SYSSET Subfunction 0xF3 -- Set CPU Speed (CPUSPD) -| _Entry Parameters_ -| BC: 0xF9F3 -| L: Clock Mult (0:Half, 1:Full, 2: Double) -| D: Memory Wait States -| E: I/O Wait States - -| _Returned Values_ -| A: Status (0=OK, else error) +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0xF9 | A: Status | +| C: 0xF3 | | +| L: Clock Mult | | +| D: Memory Wait States | | +| E: I/O Wait States | | This function will modify the running CPU speed attributes of a system. Note that it is frequently impossible to tell if a system is capable @@ -2064,7 +2189,13 @@ of dynamic speed changes. This function makes the changes blindly. You can specify 0xFF for either of the wait state settings to have them left alone. If an attempt is made to change the speed of a system that is definitely incapable of doing so, then an error result is -returned. +returned. The returned Status (A) is a standard HBIOS result code. + +The function will attempt to set the CPU speed based on the Clock Mult +(L) value: 0=Half, 1=Full, 2=Double. Memory Wait States (D) and I/O +Wait States (E) will be set if possible. The value of Memory Wait +States (D) is the actual number of wait states, not the number of wait +states added. Some peripherals are dependant on the CPU speed. For example, the Z180 ASCI baud rate and system timer are derived from the CPU speed. The @@ -2077,59 +2208,55 @@ rate of the ASCI port(s) will be affected. ### Function 0xFA -- System Peek (SYSPEEK) -| _Entry Parameters_ -| B: 0xFA -| D: Bank ID -| HL: Memory Address - -| _Returned Values_ -| A: Status (0=OK, else error) -| E: Byte Value +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0xFA | A: Status | +| D: Bank ID | E: Byte Value | +| HL: Memory Address | | -This function gets a single byte value at the specified bank/address. -The bank specified is not range checked. +This function retrieves and returns the Byte Value from the specified +Bank ID (D) and Memory Address (HL). The bank specified is not range +checked. The Status (A) is a standard HBIOS result code. ### Function 0xFB -- System Poke (SYSPOKE) -| _Entry Parameters_ -| B: 0xFB -| D: Bank ID -| E: Value -| HL: Memory Address - -| _Returned Values_ -| A: Status (0=OK, else error) +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0xFB | A: Status | +| D: Bank ID | | +| HL: Memory Address | | +| E: Byte Value | | -This function sets a single byte value at the specified bank/address. -The bank specified is not range checked. +This function sets the Byte Value (E) in the specified Bank ID (D) and +Memory Address (HL). The bank specified is not range checked. The +Status (A) is a standard HBIOS result code. ### Function 0xFC -- System Interrupt Management (SYSINT) -| _Entry Parameters_ -| B: 0xFC -| C: Subfunction (see below) - -| _Returned Values_ -| A: Status (0=OK, else error) +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0xFC | A: Status | +| C: Subfunction | | This function allows the caller to query information about the interrupt -configuration of the running system and allows adding or hooking interrupt -handlers dynamically. Register C is used to specify a subfunction. -Additional input and output registers may be used as defined by the -sub-function. + configuration of the running system and allows adding or hooking +interrupt handlers dynamically. Register C is used to specify a +subfunction. Additional input and output registers may be used as +defined by the sub-function. The Status (A) is a standard +HBIOS result code. -Note that during interrupt processing, the lower 32K of CPU address space -will contain the RomWBW HBIOS code bank, not the lower 32K of application -TPA. As such, a dynamically installed interrupt handler does not have -access to the lower 32K of TPA and must be careful to avoid modifying the -contents of the lower 32K of memory. Invoking RomWBW HBIOS functions -within an interrupt handler is not supported. +Note that during interrupt processing, the lower 32K of CPU address +space will contain the RomWBW HBIOS code bank, not the lower 32K of +application TPA. As such, a dynamically installed interrupt handler does +not have access to the lower 32K of TPA and must be careful to avoid +modifying the contents of the lower 32K of memory. Invoking RomWBW HBIOS +functions within an interrupt handler is not supported. -Interrupt handlers are different for IM1 or IM2. +Interrupt handlers are different under IM1 and IM2. -For IM1: +Interrupt Mode 1: -> The new interrupt handler is responsible for chaining (JP) to the +: The new interrupt handler is responsible for chaining (JP) to the previous vector if the interrupt is not handled. If the interrupt is handled, the new handler may simply return (RET). When chaining to the previous interrupt handler, ZF must be set if interrupt is handled and @@ -2137,16 +2264,16 @@ ZF cleared if not handled. The interrupt management framework takes care of saving and restoring AF, BC, DE, HL, and IY. Any other registers modified must be saved and restored by the interrupt handler. -For IM2: +Interrupt Mode 2: -> The new interrupt handler may either replace or hook the previous +: The new interrupt handler may either replace or hook the previous interrupt handler. To replace the previous interrupt handler, the new handler just returns (RET) when done. To hook the previous handler, the new handler can chain (JP) to the previous vector. Note that initially all IM2 interrupt vectors are set to be handled as “BAD” meaning that the interrupt is unexpected. In most cases, you do not want to chain to the -previous vector because it will cause the interrupt to display a “BAD -INT” system panic message. +previous vector because it will cause the interrupt to display a "BAD +INT" system panic message. The interrupt framework will take care of issuing an EI and RETI instruction. Do not put these instructions in your new handler. @@ -2168,64 +2295,56 @@ with the handler prior to uninstalling it. #### SYSINT Subfunction 0x00 -- Interrupt Info (INTINF) -| _Entry Parameters_ -| BC: 0xFC00 - -| _Returned Values_ -| A: Status (0=OK, else error) -| D: Interrupt Mode -| E: Size (# entries) of Interrupt Vector Table +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0xFC | A: Status | +| C: 0x00 | D: Interrupt Mode | +| | E: IVT Size | -Return interrupt mode in D and size of interrupt vector table in E. For +Return current Interrupt Mode (D) of the system. Also return the +number of Interrupt Vector Table (IVT) entries in IVT Size (E). +interrupt mode in D and size of interrupt vector table in E. For IM1, the size of the table is the number of vectors chained together. For IM2, the size of the table is the number of slots in the vector -table. +table. The Status (A) is a standard +HBIOS result code. #### SYSINT Subfunction 0x10 -- Get Interrupt (INTGET) -| _Entry Parameters_ -| BC: 0xFC10 -| E: Interrupt Vector Table Index - -| _Returned Values_ -| A: Status (0=OK, else error) -| HL: Current Interrupt Vector Address +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0xFC | A: Status | +| C: 0x10 | HL: IVT Address | +| E: IVT Index | | -On entry, register E must contain an index into the interrupt vector -table. On return, HL will contain the address of the current interrupt -vector at the specified index. +This function will return the IVT Address (HL) of the current interrupt +vector for the specified IVT Index (C). The Status (A) is a standard +HBIOS result code. #### SYSINT Subfunction 0x20 -- Set Interrupt (INTSET) -| _Entry Parameters_ -| BC: 0xFC20 -| E: Interrupt Vector Table Index -| HL: Interrupt Address to be Assigned - -| _Returned Values_ -| A: Status (0=OK, else error) -| HL: Previous Interrupt Vector Address -| DE: Interrupt Routing Engine Address (IM2) - -On entry, register E must contain an index into the interrupt vector table -and register HL must contain the address of the new interrupt vector to -be inserted in the table at the index. On return, HL will contain the -previous address in the table at the index. +| **Entry Parameters** | **Returned Values** | +|----------------------------------------|----------------------------------------| +| B: 0xFC | A: Status | +| C: 0x20 | HL: Previous Interrupt Address | +| E: IVT Index | | +| HL: Interrupt Address | | +This function will set a new Interrupt Address (HL) at the IVT Index (E) +specified. On return, the Previous Interrupt Address (HL) will be +provided. `\clearpage`{=latex} -Errors and diagnostics -======== +# Errors and diagnostics ROMWBW tries to provide useful information when a run time or build time error occurs. Many sections of the code also have code blocks that can be enable to aid in debugging and in some cases the level of reporting detail can be customized. -Run time errors --------- +## Run Time Errors ### PANIC @@ -2234,15 +2353,17 @@ and interrupts are disabled and execution is halted. A cold boot or reset is req Example error message: -\>>> PANIC: @06C4[DFA3:DFC3:0100:F103:04FC:0000:2B5E] +``` +>>> PANIC: @06C4[DFA3:DFC3:0100:F103:04FC:0000:2B5E] -\*** System Halted *** +*** System Halted *** +``` The format of the information provided is -@XXXX [-AF-:-BC-:-DE-:-HL-:-SP-:-IX-:-IY-] +`@XXXX [-AF-:-BC-:-DE-:-HL-:-SP-:-IX-:-IY-]` -Where @XXXX is the address the panic was called from. The other information +Where `@XXXX` is the address the panic was called from. The other information is the CPU register contents. Possible reasons a PANIC may occur are: @@ -2253,7 +2374,7 @@ Possible reasons a PANIC may occur are: - There was an attempt to add more devices than the device table had room for. - An illegal SD card command was encountered. -The @XXXX memory address can be cross referenced with the build source code to identify +The `@XXXX` memory address can be cross referenced with the build source code to identify which section of the software or hardware caused the fault. ### SYSCHK @@ -2302,8 +2423,7 @@ The syschk error codes YY is returned in the A register. placeholder -Build time errors --------- +## Build time errors ### Build chain tool errors @@ -2313,10 +2433,9 @@ place holder placeholder -Diagnostics --------- +## Diagnostics -### DIAG +### Diagnostic LEDs Progress through the boot and initialization process can be difficult to monitor due to the lack of console or video output. Access to these output devices does @@ -2339,51 +2458,52 @@ DIAGPORT .SET 0xnn The following table shows the ROMWBW process steps in relation to the LED display. -| LED | ROMWBW Processes | -| -------- |:---------------------------------------------- | -| `........` | Initial boot | -| | Jump to start address | -| | Disable interrupts | -| | Set interrupt mode 1 | -| | Initialize critical ports and initial speed | -| `.......O` | Setup initial stack | -| | Memory manager and CPU configuration | -| | Set top bank to be RAM | -| `......OO` | Get and save battery condition | -| | Install HBIOS proxy in upper memory | -| | If platform is MBC reconfigure memory manager | -| | Setup "ROMLESS" HBIOS image or ... | -| | Copy HBIOS from ROM to RAM if RAM flag not set | -| | Jump to HBIOS in RAM | -| | Set running in RAM flag | -| `.....OOO` | Finalize configuration for running in RAM | -| | Check battery condition | -| | Check for recovery mode boot | -| `....OOOO` | Identify CPU type | -| `...OOOOO` | Set cpu oscillator speed | -| | Setup counter-timers | -| | Setup heap | -| `..OOOOOO` | Preconsole initialization | -| `.OOOOOOO` | Boot delay | -| | Set boot console device | -| | Bios announcement | -| `OOOOOOOO` | Display platform information | -| | Display memory configuration | -| | Display CPU family | -| | Verify ROM checksum | -| | Report battery condition | -| | Perform device driver initialization | -| | Report watchdog status | -| | Mark HBIOS heap so it is preserved | -| | Switch from boot console to CRT if active | -| | Display device summary | -| | Execute boot loader | - +| **LED** | **RomWBW Processes** | +|------------|------------------------------------------------| +| `........` | Initial boot | +| | Jump to start address | +| | Disable interrupts | +| | Set interrupt mode | +| | Initialize critical ports and baud rate | +| `.......O` | Setup initial stack | +| | Memory manager and CPU configuration | +| | Set top bank to be RAM | +| `......OO` | Get and save battery condition | +| | Install HBIOS proxy in upper memory | +| | If platform is MBC reconfigure memory manager | +| | Setup "ROMLESS" HBIOS image or ... | +| | Copy HBIOS from ROM to RAM if RAM flag not set | +| | Jump to HBIOS in RAM | +| | Set running in RAM flag | +| `.....OOO` | Finalize configuration for running in RAM | +| | Check battery condition | +| | Check for recovery mode boot | +| `....OOOO` | Identify CPU type | +| `...OOOOO` | Set cpu oscillator speed | +| | Setup counter-timers | +| | Setup heap | +| `..OOOOOO` | Preconsole initialization | +| `.OOOOOOO` | Boot delay | +| | Set boot console device | +| | Bios announcement | +| `OOOOOOOO` | Display platform information | +| | Display memory configuration | +| | Display CPU family | +| | Verify ROM checksum | +| | Report battery condition | +| | Perform device driver initialization | +| | Report watchdog status | +| | Mark HBIOS heap so it is preserved | +| | Switch from boot console to CRT if active | +| | Display device summary | +| | Execute boot loader | `\clearpage`{=latex} ### Appendix A Driver Instance Data fields +**This section is a work in progress...** + The following section outlines the read only data referenced by the `SYSGET`, subfunctions `xxxFN` for specific drivers. diff --git a/Source/Doc/UserGuide.md b/Source/Doc/UserGuide.md index bff49ba0..1d7cdfa1 100644 --- a/Source/Doc/UserGuide.md +++ b/Source/Doc/UserGuide.md @@ -137,12 +137,12 @@ a set of directories. Each of these directories has it's own ReadMe.txt file describing the contents in detail. In summary, these directories are: -| Directory | Description | -| --------------- | -------------------------------------------------------------- | +| **Directory** | **Description** | +|-----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------| | **Binary** | The final output files of the build process are placed here. Most importantly, the ROM images with the file names ending in ".rom" and disk images ending in .img. | -| **Doc** | Contains various detailed documentation, both RomWBW specifically as well as the operating systems and applications. | -| **Source** | Contains the source code files used to build the software and ROM images. | -| **Tools** | Contains the programs that are used by the build process or that may be useful in setting up your system. | +| **Doc** | Contains various detailed documentation, both RomWBW specifically as well as the operating systems and applications. | +| **Source** | Contains the source code files used to build the software and ROM images. | +| **Tools** | Contains the programs that are used by the build process or that may be useful in setting up your system. | ## Installation @@ -173,37 +173,48 @@ The Binary directory of the distribution contains the pre-built ROM and disk images. The ROM image files all end in ".rom". Based on the table below, **carefully** pick the appropriate ROM image for your hardware. -| **Description** | **ROM Image File** | **Baud Rate** | -| ------------------------------------------------ | --------------------- | ------------: | -| RetroBrew Z80 SBC for ECB Bus | SBC_std.rom | 38400 | -| RetroBrew Zeta V1 Z80, ParPortProp | ZETA_std.rom | 38400 | -| RetroBrew Zeta V2 Z80, ParPortProp | ZETA2_std.rom | 38400 | -| RetroBrew N8 Z180 (date code >= 2312) | N8_std.rom | 38400 | -| RetroBrew Mark IV Z180 for ECB Bus | MK4_std.rom | 38400 | -| RC/BP80 Bus Z80, 512K RAM/ROM | RCZ80_std.rom | 115200 | -| RC/BP80 Bus Z80, 512K RAM/ROM, DUART | RCZ80_duart.rom | 115200 | -| RC/BP80 Bus Z80, 512K RAM/ROM, MT011 | RCZ80_mt.rom | 115200 | -| RC/BP80 Bus Z80, 512K RAM/ROM, KIO | RCZ80_kio.rom | 115200 | -| RC/BP80 Bus Z180 w/ external banking | RCZ180_ext.rom | 115200 | -| RC/BP80 Bus Z180 w/ native banking | RCZ180_nat.rom | 115200 | -| RC/BP80 Bus Z280 w/ external banking | RCZ180_ext.rom | 115200 | -| RC/BP80 Bus Z280 w/ native banking | RCZ180_nat.rom | 115200 | -| Sergey Kiselev's Easy Z80 SBC w/ RCBus | EZZ80_std.rom | 115200 | -| Sergey Kiselev's Tiny EIPC Z80 SBC w/ RCBus | EZZ80_tz80.rom | 115200 | -| Sergey Kiselev's Z80-512K Module for RCBus | EZZ80_skz.rom | 115200 | -| Stephen Cousins' SC126 Z180 SBC w/ BP80 Bus | SCZ180_126.rom | 115200 | -| Stephen Cousins' SC130 Z180 SBC w/ RCBus | SCZ180_130.rom | 115200 | -| Stephen Cousins' SC131 Z180 Pocket Computer | SCZ180_131.rom | 115200 | -| Stephen Cousins' SC140 Z180 for Z50Bus | SCZ180_140.rom | 115200 | -| Steve Garcia's Z180 Dyno SBC w/ Dyno Bus | DYNO_std.rom | 38400 | -| Andrew Lynch's Nhyodyne Z80 MBC | MBC_std.rom | 38400 | -| Andrew Lynch's Rhyophyre Z180 SBC | RPH_std.rom | 38400 | -| Bill Shen's Z80 ZRC for RCBus | RCZ80_zrc.rom | 115200 | -| Bill Shen's Z280 ZZRCC for RCBus | RCZ280_nat_zzr.rom | 115200 | -| Bill Shen's Z280 ZZ80MB SBC w/ RCBus | RCZ280_nat_zz.rom | 115200 | - -RCBus refers to Spencer Owen's RC2014 bus specification. BP80 Bus is -an enhanced 80-pin version of the RC2014 bus. +| **Description** | **Bus** | **ROM Image File** | **Baud Rate** | +|----------------------------------------------------------------|---------|--------------------|--------------:| +| [RetroBrew Z80 SBC]^1^ | ECB | SBC_std.rom | 38400 | +| [RetroBrew Z80 SimH]^1^ | - | SBC_simh.rom | 38400 | +| [RetroBrew Zeta Z80 SBC]^2^, ParPortProp | - | ZETA_std.rom | 38400 | +| [RetroBrew Zeta V2 Z80 SBC]^2^, ParPortProp | - | ZETA2_std.rom | 38400 | +| [RetroBrew N8 Z180 SBC]^1^ (date code >= 2312) | ECB | N8_std.rom | 38400 | +| [RetroBrew Mark IV Z180 SBC]^3^ | ECB | MK4_std.rom | 38400 | +| [RCBus Z80 CPU Module]^4^, 512K RAM/ROM | RCBus | RCZ80_std.rom | 115200 | +| [RCBus Z80 CPU Module]^4^, 512K RAM/ROM, KIO | RCBus | RCZ80_kio.rom | 115200 | +| [RCBus Z180 CPU Module]^4^ w/ external banking | RCBus | RCZ180_ext.rom | 115200 | +| [RCBus Z180 CPU Module]^4^ w/ native banking | RCBus | RCZ180_nat.rom | 115200 | +| [RCBus Z280 CPU Module]^4^ w/ external banking | RCBus | RCZ180_ext.rom | 115200 | +| [RCBus Z280 CPU Module]^4^ w/ native banking | RCBus | RCZ180_nat.rom | 115200 | +| [Easy Z80 SBC]^2^ | RCBus | RCZ80_easy.rom | 115200 | +| [Tiny Z80 SBC]^2^ | RCBus | RCZ80_tiny.rom | 115200 | +| [Z80-512K CPU/RAM/ROM Module]^2^ | RCBus | RCZ80_skz.rom | 115200 | +| [SC126 Z180 SBC]^5^ | BP80 | RCZ180_126.rom | 115200 | +| [SC130 Z180 SBC]^5^ | RCBus | RCZ180_130.rom | 115200 | +| [SC131 Z180 Pocket Computer]^5^ | - | RCZ180_131.rom | 115200 | +| [SC140 Z180 CPU Module]^5^ | Z50 | RCZ180_140.rom | 115200 | +| [Dyno Z180 SBC]^6^ | Dyno | DYNO_std.rom | 38400 | +| [Nhyodyne Z80 MBC]^1^ | MBC | MBC_std.rom | 38400 | +| [Rhyophyre Z180 SBC]^1^ | - | RPH_std.rom | 38400 | +| [Z80 ZRC CPU Module]^7^ | RCBus | RCZ80_zrc.rom | 115200 | +| [Z280 ZZRCC CPU Module]^7^ | RCBus | RCZ280_zzrc.rom | 115200 | +| [Z280 ZZ80MB SBC]^7^ | RCBus | RCZ280_zz80mb.rom | 115200 | + +| ^1^Designed by Andrew Lynch +| ^2^Designed by Sergey Kiselev +| ^3^Designed by John Coffman +| ^4^RCBus compliant (multiple products/designers) +| ^5^Designed by Stephen Cousins +| ^6^Designed by Steve Garcia +| ^7^Designed by Bill Shen + +RCBus refers to Spencer Owen's RC2014 bus specification and derivatives +including RC26, RC40, RC80, and BP80. + +Additional information for each of the system configurations supported +by the ROM images listed above is found in +[Appendix A - Pre-built ROM Images]. The RCBus Z180 & Z280 require a separate RAM/ROM memory module. There are two types of these modules and you must pick the correct ROM for @@ -238,8 +249,7 @@ emulation. RomWBW will automatically attempt to detect and support typical add-on components for each of the systems supported. More information on the required system configuration and optional supported components for -each ROM is found in the file called "RomList.txt" in the Binary -directory. +each ROM is found in [Appendix A - Pre-built ROM Images]. ## System Startup @@ -541,8 +551,8 @@ Boot [H=Help]: The following ROM applications and OSes are available at the boot loader prompt: -| Application | Description | -| ----------------- | -------------------------------------------------------------- | +| **Application** | **Description** | +|-------------------|----------------------------------------------------------------| | Monitor | Z80 system debug monitor w/ Intel Hex loader | | CP/M 2.2 | Digital Research CP/M 2.2 OS | | Z-System | ZSDOS 1.1 w/ ZCPR 1 (Enhanced CP/M compatible OS) | @@ -1148,7 +1158,7 @@ boot messages meaning the first IDE device. To refer to the fourth slice of IDE0, you would type "IDE0:3". Here are some examples: | | | -| -------- | ---------------------------- | +|----------|------------------------------| | `IDE0:0` | First slice of disk in IDE0 | | `IDE0:` | First slice of disk in IDE0 | | `IDE0:3` | Fourth slice of disk in IDE0 | @@ -1383,8 +1393,8 @@ Each disk image has the complete set of normal applications and tools distributed with the associated operating system or application suite. The following table shows the disk images available. -| Disk Image | Description | Bootable | -| --------------- | -------------------------------------- | -------- | +| **Disk Image** | **Description** | **Boot** | +|-----------------|----------------------------------------|----------| | xxx_cpm22.img | DRI CP/M 2.2 Operating System | Yes | | xxx_zsdos.img | ZCPR-DJ & ZSDOS 1.1 Operating System | Yes | | xxx_nzcom.img | NZCOM ZCPR 3.4 Operating System | Yes | @@ -1455,14 +1465,14 @@ The combo disk image is essentially just a single image that has several combo disk image contains the following 6 slices in the positions indicated: -| Slice | Description | -| ------- | ---------------------------------------------------------------- | -| Slice 0 | DRI CP/M 2.2 Operating System | -| Slice 1 | ZCPR-DJ & ZSDOS 1.1 Operating System | -| Slice 2 | NZCOM ZCPR 3.4 Operating System | -| Slice 3 | DRI CP/M 3 Operating System | -| Slice 4 | ZPM3 Operating System | -| Slice 5 | WordStar v4 & ZDE Applications | +| **Slice** | **Description** | +|-----------|------------------------------------------------------------------| +| Slice 0 | DRI CP/M 2.2 Operating System | +| Slice 1 | ZCPR-DJ & ZSDOS 1.1 Operating System | +| Slice 2 | NZCOM ZCPR 3.4 Operating System | +| Slice 3 | DRI CP/M 3 Operating System | +| Slice 4 | ZPM3 Operating System | +| Slice 5 | WordStar v4 & ZDE Applications | You will notice that there are actually 2 combo disk images in the distribution. One for an hd512 disk layout (hd512_combo.img) and one @@ -2126,30 +2136,30 @@ directory of the distribution. The following custom applications are found on the ROM disk and are, therefore, globally available. -| Application | Description | -| ----------- | -------------------------------------------------------------- | -| ASSIGN | Add, change, and delete drive letter assignments. Use ASSIGN /? for usage instructions. | -| SYSCOPY | Copy system image to a device to make it bootable. Use SYSCOPY with no parms for usage instructions. | -| MODE | Reconfigures serial ports dynamically. | -| FDU | Format and test floppy disks. Menu driven interface. | -| FORMAT | Will someday be a command line tool to format floppy disks. Currently does nothing! | -| XM | XModem file transfer program adapted to hardware. Automatically uses primary serial port on system. | -| FLASH | Will Sowerbutts' in-situ ROM programming utility. | -| FDISK80 | John Coffman's Z80 hard disk partitioning tool. See documentation in Doc directory. | -| TALK | Direct console I/O to a specified character device. | -| RTC | Manage and test the Real Time Clock hardware. | -| TIMER | Display value of running periodic system timer. | -| CPUSPD | Change the running CPU speed and wait states of the system. | +| **Application** | **Description | +|-----------------|------------------------------------------------------------------------------------------------------| +| ASSIGN | Add, change, and delete drive letter assignments. Use ASSIGN /? for usage instructions. | +| SYSCOPY | Copy system image to a device to make it bootable. Use SYSCOPY with no parms for usage instructions. | +| MODE | Reconfigures serial ports dynamically. | +| FDU | Format and test floppy disks. Menu driven interface. | +| FORMAT | Will someday be a command line tool to format floppy disks. Currently does nothing! | +| XM | XModem file transfer program adapted to hardware. Automatically uses primary serial port on system. | +| FLASH | Will Sowerbutts' in-situ ROM programming utility. | +| FDISK80 | John Coffman's Z80 hard disk partitioning tool. See documentation in Doc directory. | +| TALK | Direct console I/O to a specified character device. | +| RTC | Manage and test the Real Time Clock hardware. | +| TIMER | Display value of running periodic system timer. | +| CPUSPD | Change the running CPU speed and wait states of the system. | Some custom applications do not fit on the ROM disk. They are found on the disk image files or the individual files can be found in the Binary\\Apps directory of the distribution. -| Application | Description | -| ----------- | -------------------------------------------------------------- | -| TUNE | Play .PT2, .PT3, .MYM audio files. | -| FAT | Access MS-DOS FAT filesystems from RomWBW (based on FatFs). | -| INTTEST | Test interrupt vector hooking. | +| **Application** | **Description** | +|-----------------|--------------------------------------------------------------------| +| TUNE | Play .PT2, .PT3, .MYM audio files. | +| FAT | Access MS-DOS FAT filesystems from RomWBW (based on FatFs). | +| INTTEST | Test interrupt vector hooking. | # FAT Filesystem @@ -3112,56 +3122,594 @@ Also feel free to email $doc_author$ at [$doc_authmail$](mailto:$doc_authmail$). # Appendixes -`\newpage`{=latex} - -## Appendix A - Device Summary +`\clearpage`{=latex} + +## Appendix A - Pre-built ROM Images + +The standard ROM images will detect and install support for certain +devices and peripherals that are on-board or frequently used with +each platform as documented below. If the device or peripheral is +not detected at boot, the ROM will simply bypass support +appropriately. + +By default, RomWBW will use the first available character device it +discovers for the initial console. Serial devices are scanned in +the following order: + +#. ASCI: Zilog Z180 CPU Built-in Serial Ports +#. Z2U: Zilog Z280 CPU Built-in Serial Ports +#. UART: 16C550 Family Serial Interface +#. DUART: SCC2681 or compatible Dual UART +#. SIO: Zilog Serial Port Interface +#. ACIA: MC68B50 Asynchronous Communications Interface Adapter + +In some cases, support for multiple hardware components with potentially +conflicting resource usage are handled by a single ROM image. It is up +to the user to ensure that no conflicting hardware is in use. + +The RomWBW `TUNE` application will detect an AY-3-8910/YM2149 +Sound Module regardless of whether support for it is included in +the RomWBW HBIOS configuration. + +`\clearpage`{=latex} + +### RetroBrew Z80 SBC + +| | | +|-------------------|---------------| +| ROM Image File | SBC_std.rom | +| Console Baud Rate | 38400 | + + - CPU speed is detected at startup if DS1302 RTC is active + - Hardware auto-detected: + - Onboard DS1302 RTC + - Onboard UART Serial Adapter + - Onboard PPIDE Hard Disk Interface + - Zilog Peripherals SIO Serial Interface + - CVDU Display Adapter + - VGA3 Display Adapter + - DiskIO V3 Floppy Disk Controller w/ 3.5" HD Drives + - PropIO Video, Keyboard, & SD Card + - SBC V1 has a known race condition in the bank switching + circuit which is likely to cause system instability. SBC + V2 does not have this issue. + +`\clearpage`{=latex} + +### RetroBrew Z80 SimH + +| | | +|-------------------|---------------| +| ROM Image File | SBC_simh.rom | +| Console Baud Rate | 38400 | + + - Hardware auto-detected: + - SimH emulated 8250 Serial Adapter + - SimH emulated hard disk drives + - SimH RTC + +`\clearpage`{=latex} + +### RetroBrew Zeta Z80 SBC + +| | | +|-------------------|---------------| +| ROM Image File | ZETA_std.rom | +| Console Baud Rate | 38400 | + + - CPU speed is detected at startup if DS1302 RTC is active + - Hardware auto-detected: + - Onboard DS1302 RTC + - Onboard UART Serial Adapter + - Onboard Floppy Disk Controller w/ 1 3.5" HD Drive + - ParPortProp Video, Keyboard, & SD Card + - If ParPortProp is installed, initial console output is determined + by JP1: + - Shorted: console to on-board serial port + - Open: console to ParPortProp video and keyboard + +`\clearpage`{=latex} + +### RetroBrew Zeta V2 Z80 SBC + +| | | +|-------------------|---------------| +| ROM Image File | ZETA2_std.rom | +| Console Baud Rate | 38400 | + + - CPU speed is detected at startup if DS1302 RTC is active + - System timer is generated by onboard CTC + - Hardware auto-detected: + - Onboard DS1302 RTC + - Onboard CTC + - Onboard UART Serial Adapter + - Onboard Floppy Disk Controller w/ 1 3.5" HD Drive + - ParPortProp Video, Keyboard, & SD Card + - If ParPortProp is installed, initial console output is determined + by JP1: + - Shorted: console to on-board serial port + - Open: console to ParPortProp video and keyboard + +`\clearpage`{=latex} + +### RetroBrew N8 Z180 SBC + +| | | +|-------------------|---------------| +| ROM Image File | N8_std.rom | +| Console Baud Rate | 38400 | + + - CPU speed is detected at startup if DS1302 RTC is active + - System timer is generated by Z180 CPU + - Hardware auto-detected: + - Onboard Z180 ASCI Serial Ports + - Onboard Floppy Disk Controller w/ 3.5" HD Drives + - Onboard TMS9918 Video Controller + - Onboard PS/2 Keyboard Controller + - Onboard SD Card Interface via CSIO + - Assumes N8 with date code >= 2312 for CSIO interface to SD Card + +`\clearpage`{=latex} + +### RetroBrew Mark IV Z180 SBC + +| | | +|-------------------|---------------| +| ROM Image File | MK4_std.rom | +| Console Baud Rate | 38400 | + + - CPU speed is detected at startup if DS1302 RTC is active + - System timer is generated by Z180 CPU + - Hardware auto-detected: + - Onboard Z180 ASCI Serial Ports + - Onboard SD Card Interface via CSIO + - Onboard IDE CF Card Interface + - DIDE Floppy Disk Controller w/ 3.5" HD Drives + - DIDE IDE Hard Disk Controller + - PropIO Video, Keyboard, & SD Card + - CVDU Display Adapter + - VGA3 Display Adapter + +`\clearpage`{=latex} + +### RCBus Z80 CPU Module + +| | | +|-------------------|---------------| +| ROM Image File | RCZ80_std.rom | +| Console Baud Rate | 115200 | +| Interrupts | Mode 1 | + + - CPU speed is detected at startup if DS1302 RTC is active + - Otherwise 7.3728 MHz assumed + - Requires 512K RAM/ROM Module + - Hardware auto-detected: + - DS1302 RTC + - ACIA Serial Interface Module + - SIO Serial Interface Module + - EP Dual UART Serial Interface Module + - WDC Floppy Disk Controller w/ 3.5" HD Drives + - IDE Hard Disk Interface Module + - PPIDE Hard Disk Interface Module + - Serial baud rate is usually determined by hardware for ACIA and + SIO interfaces + +| | | +|-------------------|---------------| +| ROM Image File | RCZ80_kio.rom | +| Console Baud Rate | 38400 | +| Interrupts | Mode 2 | + + - Equivalent to RCZ80_std w/ following modifications: + - KIO-SIO Serial Interface uses KIO port standards + - KIO-CTC generates system timer + - SIO Serial baud rate managed by KIO-CTC + - Use of Interrupt Mode 2 requires proper IEI/IEO configuration + for all peripherals generating interrupts + +`\clearpage`{=latex} + +### RCBus Z180 CPU Module + +| | | +|-------------------|----------------| +| ROM Image Files | RCZ180_ext.rom | +| | RCZ180_nat.rom | +| Console Baud Rate | 115200 | +| Interrupts | Mode 2 | + + - CPU speed is detected at startup if DS1302 RTC is active + - Otherwise 18.432 MHz assumed + - System timer is generated by Z180 CPU + - Hardware auto-detected: + - DS1302 RTC + - Z180 ASCI Serial Ports + - SIO Serial Interface Module + - EP Dual UART Serial Interface Module + - WDC Floppy Disk Controller w/ 3.5" HD Drives + - IDE Hard Disk Interface Module + - PPIDE Hard Disk Interface Module + - Specific ROM image determined by memory module used: + - RCZ180_ext - Bank switching on memory module (external of CPU) + - RCZ180_nat - Linear memory module (native CPU bank switching) + - Use of Interrupt Mode 2 requires proper IEI/IEO configuration + for all peripherals generating interrupts + +`\clearpage`{=latex} + +### RCBus Z280 CPU Module + +| | | +|-------------------|----------------| +| ROM Image Files | RCZ280_ext.rom | +| | RCZ280_nat.rom | +| Console Baud Rate | 115200 | +| Interrupts | Mode 1 (ext) | +| | Mode 3 (nat) | + + - CPU speed is assumed to be 12 MHz (24 MHz oscillator) + - System timer is generated by Z280 CPU + - Hardware auto-detected: + - DS1302 RTC + - Z280 Z2U Serial Ports + - ACIA Serial Interface Module (ext only) + - SIO Serial Interface Module + - EP Dual UART Serial Interface Module + - WDC Floppy Disk Controller w/ 3.5" HD Drives + - IDE Hard Disk Interface Module + - PPIDE Hard Disk Interface Module + - Serial baud rate is usually determined by hardware for ACIA and + SIO interfaces + - Requires 512K RAM/ROM module + - Specific ROM image determined by memory module used: + - RCZ180_ext - Bank switching on memory module (external of CPU) + - RCZ180_nat - Linear memory module (native CPU bank switching) + +`\clearpage`{=latex} + +### Easy Z80 SBC + +| | | +|-------------------|----------------| +| ROM Image File | RCZ80_easy.rom | +| Console Baud Rate | 115200 | +| Interrupt Mode | 2 | + + - CPU speed is detected at startup if DS1302 RTC is active + - Otherwise 10.000 MHz assumed + - System timer is generated by onboard CTC + - Hardware auto-detected: + - DS1302 RTC + - Onboard SIO Serial Interface + - EP Dual UART Serial Interface Module + - WDC Floppy Disk Controller w/ 3.5" HD Drives + - IDE Hard Disk Interface Module + - PPIDE Hard Disk Interface Module + - SIO Serial baud rate managed by CTC + +`\clearpage`{=latex} + +### Tiny Z80 SBC + +| | | +|-------------------|----------------| +| ROM Image File | RCZ80_tiny.rom | +| Console Baud Rate | 115200 | +| Interrupt Mode | 2 | + + - CPU speed is detected at startup if DS1302 RTC is active + - Otherwise 16.000 MHz assumed + - System timer is generated by onboard CTC + - Hardware auto-detected: + - DS1302 RTC + - Onboard SIO Serial Interface + - EP Dual UART Serial Interface Module + - WDC Floppy Disk Controller w/ 3.5" HD Drives + - IDE Hard Disk Interface Module + - PPIDE Hard Disk Interface Module + - SIO Serial baud rate managed by CTC + +`\clearpage`{=latex} + +### Z80-512K CPU/RAM/ROM Module + +| | | +|-------------------|----------------| +| ROM Image File | RCZ80_skz.rom | +| Console Baud Rate | 115200 | +| Interrupt Mode | 1 | + + + - CPU speed is detected at startup if DS1302 RTC is active + - Otherwise 7.3728 MHz assumed + - Hardware auto-detected: + - DS1302 RTC + - ACIA Serial Interface Module + - SIO Serial Interface Module + - EP Dual UART Serial Interface Module + - WDC Floppy Disk Controller w/ 3.5" HD Drives + - IDE Hard Disk Interface Module + - PPIDE Hard Disk Interface Module + - Serial baud rate is determined by hardware for ACIA and SIO + interfaces + +`\clearpage`{=latex} + +### SC126 Z180 SBC + +| | | +|-------------------|----------------| +| ROM Image Files | RCZ180_126.rom | +| Console Baud Rate | 115200 | +| Interrupts | Mode 2 | + + - CPU speed is detected at startup if DS1302 RTC is active + - Otherwise 18.432 MHz assumed + - System timer is generated by Z180 CPU + - Hardware auto-detected: + - DS1302 RTC + - Z180 ASCI Serial Ports + - SIO Serial Interface Module + - EP Dual UART Serial Interface Module + - WDC Floppy Disk Controller w/ 3.5" HD Drives + - IDE Hard Disk Interface Module + - PPIDE Hard Disk Interface Module + - Onboard SD Card Interface + - Use of Interrupt Mode 2 requires proper IEI/IEO configuration + for all peripherals generating interrupts + +`\clearpage`{=latex} + +### SC130 Z180 SBC + +| | | +|-------------------|----------------| +| ROM Image Files | RCZ180_130.rom | +| Console Baud Rate | 115200 | +| Interrupts | Mode 2 | + + - CPU speed is detected at startup if DS1302 RTC is active + - Otherwise 18.432 MHz assumed + - System timer is generated by Z180 CPU + - Hardware auto-detected: + - DS1302 RTC + - Z180 ASCI Serial Ports + - SIO Serial Interface Module + - EP Dual UART Serial Interface Module + - WDC Floppy Disk Controller w/ 3.5" HD Drives + - IDE Hard Disk Interface Module + - PPIDE Hard Disk Interface Module + - Onboard SD Card Interface + - Use of Interrupt Mode 2 requires proper IEI/IEO configuration + for all peripherals generating interrupts + +`\clearpage`{=latex} + +### SC131 Z180 Pocket Computer + +| | | +|-------------------|----------------| +| ROM Image Files | RCZ180_131.rom | +| Console Baud Rate | 115200 | +| Interrupts | Mode 2 | + + - CPU speed assumed to be 18.432 MHz + - System timer is generated by Z180 CPU + - Hardware auto-detected: + - Interrupt-driven RTC + - Z180 ASCI Serial Ports + - Onboard SD Card Interface + +`\clearpage`{=latex} + +### SC140 Z180 CPU Module + +| | | +|-------------------|----------------| +| ROM Image Files | RCZ180_140.rom | +| Console Baud Rate | 115200 | +| Interrupts | Mode 2 | + + - CPU speed is detected at startup if DS1302 RTC is active + - Otherwise 18.432 MHz assumed + - System timer is generated by Z180 CPU + - Hardware auto-detected: + - DS1302 RTC + - Z180 ASCI Serial Ports + - SIO Serial Interface Module + - EP Dual UART Serial Interface Module + - WDC Floppy Disk Controller w/ 3.5" HD Drives + - IDE Hard Disk Interface Module + - PPIDE Hard Disk Interface Module + - Onboard SD Card Interface + - Use of Interrupt Mode 2 requires proper IEI/IEO configuration + for all peripherals generating interrupts + +`\clearpage`{=latex} + +### Dyno Z180 SBC + +| | | +|-------------------|----------------| +| ROM Image Files | DYNO0_std.rom | +| Console Baud Rate | 38400 | +| Interrupts | Mode 2 | + + - CPU speed is assumed to be 18.432 MHz + - System timer is generated by Z180 CPU + - Hardware auto-detected: + - BQ4845P RTC + - Z180 ASCI Serial Ports + - WDC Floppy Disk Controller w/ 3.5" HD Drives + - Onboard PPIDE Hard Disk Interface Module + +`\clearpage`{=latex} + +### Nhyodyne Z80 MBC + +| | | +|-------------------|---------------| +| ROM Image File | MBC_std.rom | +| Console Baud Rate | 38400 | +| Interrupts | None | + + - CPU speed is detected at startup if DS1302 RTC is active + - Otherwise 8.000 MHz assumed + - System timer is generated by CTC if available + - Hardware auto-detected: + - DS1302 RTC + - Zilog CTC + - Zilog DMA Module + - UART Serial Adapter + - SIO Serial Interface + - LPT Printer Interface + - Zilog Parallel Interface + - CVDU Display Adapter + - TMS9938/58 Display Adapter + - PS/2 Keyboard Interface + - AY-3-8910/YM2149 Sound Module + - Floppy Disk Controller w/ 3.5" HD Drives + - PPIDE Hard Disk Interface + - Interrupts may be enabled in build options + +`\clearpage`{=latex} + +### Rhyophyre Z180 SBC + +| | | +|-------------------|---------------| +| ROM Image File | RPH_std.rom | +| Console Baud Rate | 38400 | +| Interrupts | None | + + - CPU speed is detected at startup if DS1302 RTC is active + - Otherwise 18.432 MHz assumed + - System timer is generated by Z180 CPU + - Hardware auto-detected: + - Onboard Z180 ASCI Serial Ports + - Onboard PPIDE CF Interface + - Onboard PS/2 Keyboard Controller + - Interrupts may be enabled in build options + +`\clearpage`{=latex} + +### Z80 ZRC CPU Module + +| | | +|-------------------|--------------------| +| ROM Image Files | RCZ80_zrc.rom | +| Console Baud Rate | 115200 | +| Interrupts | Mode 1 | + + - CPU speed is detected at startup if DS1302 RTC is active + - Otherwise 14.7456 MHz assumed + - Hardware auto-detected: + - DS1302 RTC + - ACIA Serial Interface Module + - SIO Serial Interface Module + - EP Dual UART Serial Interface Module + - WDC Floppy Disk Controller w/ 3.5" HD Drives + - Onboard IDE Hard Disk Interface Module + - PPIDE Hard Disk Interface Module + - Serial baud rate is usually determined by hardware for ACIA and + SIO interfaces + +`\clearpage`{=latex} + +### Z280 ZZRCC CPU Module + +| | | +|-------------------|--------------------| +| ROM Image Files | RCZ280_zzrc.rom | +| Console Baud Rate | 115200 | +| Interrupts | Mode 3 | + + - CPU speed is assumed to be 12 MHz (24 MHz oscillator) + - System timer is generated by Z280 CPU + - Hardware auto-detected: + - DS1302 RTC + - Z280 Z2U Serial Ports + - SIO Serial Interface Module + - EP Dual UART Serial Interface Module + - WDC Floppy Disk Controller w/ 3.5" HD Drives + - Onboard IDE Hard Disk Interface Module + - PPIDE Hard Disk Interface Module + - Serial baud rate is usually determined by hardware for ACIA and + SIO interfaces + +`\clearpage`{=latex} + +### Z280 ZZ80MB SBC + +| | | +|-------------------|-------------------| +| ROM Image Files | RCZ280_zz80mb.rom | +| Console Baud Rate | 115200 | +| Interrupts | Mode 3 | + + - CPU speed is assumed to be 12 MHz (24 MHz oscillator) + - System timer is generated by Z280 CPU + - Hardware auto-detected: + - DS1302 RTC + - Z280 Z2U Serial Ports + - SIO Serial Interface Module + - EP Dual UART Serial Interface Module + - WDC Floppy Disk Controller w/ 3.5" HD Drives + - Onboard IDE Hard Disk Interface Module + - PPIDE Hard Disk Interface Module + - Serial baud rate is usually determined by hardware for ACIA and + SIO interfaces + +`\clearpage`{=latex} + +## Appendix B - Device Summary The table below briefly describes each of the possible devices that may be discovered by RomWBW in your system. -| ID | Type | Description | -|---------- | ------- | ------------------------------------------------------ | -| ACIA | Char | MC68B50 Asynchronous Communications Interface Adapter | -| ASCI | Char | Z180 Built-in Serial Ports | -| AY | Audio | AY-3-8910/YM2149 Programmable Sound Generator | -| BQRTC | RTC | BQ4845P Real Time Clock | -| CTC | System | Zilog Clock/Timer | -| CVDU | Video | MC8563-based Video Display Controller | -| DMA | System | Zilog DMA Controller | -| DS1307 | RTC | Maxim DS1307 PCF I2C Real-Time Clock w/ NVRAM | -| DS1501RTC | RTC | Maxim DS1501/DS1511 Watchdog Real-Time Clock | -| DSKY | System | Keypad & Display | -| DSRTC | RTC | Maxim DS1302 Real-Time Clock w/ NVRAM | -| DUART | Char | SCC2681 or compatible Dual UART | -| FD | Disk | 8272 of compatible Floppy Disk Controller | -| GDC | Video | uPD7220 Video Display Controller | -| HDSK | Disk | SIMH Simulator Hard Disk | -| IDE | Disk | IDE/ATA Hard Disk Interface | -| INTRTC | RTC | Interrupt-based Real Time Clock | -| KBD | Kbd | 8242 PS/2 Keyboard Controller | -| KIO | System | Zilog Serial/ Parallel Counter/Timer | -| LPT | Char | Parallel I/O Controller | -| MD | Disk | ROM/RAM Disk | -| MSXKYB | Kbd | MSX Compliant Matrix Keyboard | -| I2C | System | I2C Interface | -| PIO | Char | Zilog Parallel Interface Controller | -| PPIDE | Disk | 8255 IDE/ATA Hard Disk Interface | -| PPK | Kbd | Matrix Keyboard | -| PPPSD | Disk | ParPortProp SD Card Interface | -| PPPCON | Serial | ParPortProp Serial Console Interface | -| PRPSD | Disk | PropIO SD Card Interface | -| PRPCON | Serial | PropIO Serial Console Interface | -| RF | Disk | RAM Floppy Disk Interface | -| RP5C01 | RTC | Ricoh RPC01A Real-Time Clock w/ NVRAM | -| SD | Disk | SD Card Interface | -| SIMRTC | RTC | SIMH Simulator Real-Time Clock | -| SIO | Char | Zilog Serial Port Interface | -| SN76489 | Sound | SN76489 Programmable Sound Generator | -| SPK | Sound | Bit-bang Speaker | -| TMS | Video | TMS9918/38/58 Video Display Controller | -| UART | Char | 16C550 Family Serial Interface | -| USB-FIFO | Char | FT232H-based ECB USB FIFO | -| VDU | Video | MC6845 Family Video Display Controller | -| VGA | Video | HD6445CP4-based Video Display Controller | -| YM | Audio | YM2612 Programmable Sound Generator | -| Z2U | Char | Zilog Z280 Built-in Serial Ports | +| **ID** | **Type** | **Description** | +|-----------|----------|--------------------------------------------------------| +| ACIA | Char | MC68B50 Asynchronous Communications Interface Adapter | +| ASCI | Char | Zilog Z180 CPU Built-in Serial Ports | +| AY | Audio | AY-3-8910/YM2149 Programmable Sound Generator | +| BQRTC | RTC | BQ4845P Real Time Clock | +| CTC | System | Zilog Clock/Timer | +| CVDU | Video | MC8563-based Video Display Controller | +| DMA | System | Zilog DMA Controller | +| DS1307 | RTC | Maxim DS1307 PCF I2C Real-Time Clock w/ NVRAM | +| DS1501RTC | RTC | Maxim DS1501/DS1511 Watchdog Real-Time Clock | +| DSKY | System | Keypad & Display | +| DSRTC | RTC | Maxim DS1302 Real-Time Clock w/ NVRAM | +| DUART | Char | SCC2681 or compatible Dual UART | +| FD | Disk | 8272 of compatible Floppy Disk Controller | +| GDC | Video | uPD7220 Video Display Controller | +| HDSK | Disk | SIMH Simulator Hard Disk | +| IDE | Disk | IDE/ATA Hard Disk Interface | +| INTRTC | RTC | Interrupt-based Real Time Clock | +| KBD | Kbd | 8242 PS/2 Keyboard Controller | +| KIO | System | Zilog Serial/ Parallel Counter/Timer | +| LPT | Char | Parallel I/O Controller | +| MD | Disk | ROM/RAM Disk | +| MSXKYB | Kbd | MSX Compliant Matrix Keyboard | +| I2C | System | I2C Interface | +| PIO | Char | Zilog Parallel Interface Controller | +| PPIDE | Disk | 8255 IDE/ATA Hard Disk Interface | +| PPK | Kbd | Matrix Keyboard | +| PPPSD | Disk | ParPortProp SD Card Interface | +| PPPCON | Serial | ParPortProp Serial Console Interface | +| PRPSD | Disk | PropIO SD Card Interface | +| PRPCON | Serial | PropIO Serial Console Interface | +| RF | Disk | RAM Floppy Disk Interface | +| RP5C01 | RTC | Ricoh RPC01A Real-Time Clock w/ NVRAM | +| SD | Disk | SD Card Interface | +| SIMRTC | RTC | SIMH Simulator Real-Time Clock | +| SIO | Char | Zilog Serial Port Interface | +| SN76489 | Sound | SN76489 Programmable Sound Generator | +| SPK | Sound | Bit-bang Speaker | +| TMS | Video | TMS9918/38/58 Video Display Controller | +| UART | Char | 16C550 Family Serial Interface | +| USB-FIFO | Char | FT232H-based ECB USB FIFO | +| VDU | Video | MC6845 Family Video Display Controller | +| VGA | Video | HD6445CP4-based Video Display Controller | +| YM | Audio | YM2612 Programmable Sound Generator | +| Z2U | Char | Zilog Z280 CPU Built-in Serial Ports | diff --git a/Source/Doc/Z180 ASCI Baud Rate Options.xlsx b/Source/Doc/Z180 ASCI Baud Rate Options.xlsx index b808a5f9..9ee75209 100644 Binary files a/Source/Doc/Z180 ASCI Baud Rate Options.xlsx and b/Source/Doc/Z180 ASCI Baud Rate Options.xlsx differ diff --git a/Source/HBIOS/Build.cmd b/Source/HBIOS/Build.cmd index 46ac35a5..d520cd06 100644 --- a/Source/HBIOS/Build.cmd +++ b/Source/HBIOS/Build.cmd @@ -201,24 +201,24 @@ call Build ZETA2 std || exit /b call Build N8 std || exit /b call Build MK4 std || exit /b call Build RCZ80 std || exit /b -call Build RCZ80 skz || exit /b call Build RCZ80 kio || exit /b -call Build RCZ80 mt || exit /b -call Build RCZ80 duart || exit /b +call Build RCZ80 easy || exit /b +call Build RCZ80 tiny || exit /b +call Build RCZ80 skz || exit /b +:: call Build RCZ80 mt || exit /b +:: call Build RCZ80 duart || exit /b call Build RCZ80 zrc || exit /b call Build RCZ80 zrc_ram || exit /b call Build RCZ180 ext || exit /b call Build RCZ180 nat || exit /b call Build RCZ280 ext || exit /b call Build RCZ280 nat || exit /b -call Build RCZ280 nat_zz || exit /b -call Build RCZ280 nat_zzr || exit /b -call Build SCZ180 126 || exit /b -call Build SCZ180 130 || exit /b -call Build SCZ180 131 || exit /b -call Build SCZ180 140 || exit /b -call Build EZZ80 std || exit /b -call Build EZZ80 tz80 || exit /b +call Build RCZ280 zz80mb || exit /b +call Build RCZ280 zzrc || exit /b +call Build RCZ180 126 || exit /b +call Build RCZ180 130 || exit /b +call Build RCZ180 131 || exit /b +call Build RCZ180 140 || exit /b call Build DYNO std || exit /b call Build UNA std || exit /b call Build RPH std || exit /b diff --git a/Source/HBIOS/Build.sh b/Source/HBIOS/Build.sh index 64b62889..6d0793d8 100755 --- a/Source/HBIOS/Build.sh +++ b/Source/HBIOS/Build.sh @@ -11,20 +11,20 @@ export CPUFAM if [ "${ROM_PLATFORM}" == "dist" ] ; then echo "!!!DISTRIBUTION BUILD!!!" ROM_PLATFORM="DYNO"; ROM_CONFIG="std"; bash Build.sh - ROM_PLATFORM="EZZ80"; ROM_CONFIG="std"; bash Build.sh - ROM_PLATFORM="EZZ80"; ROM_CONFIG="tz80"; bash Build.sh ROM_PLATFORM="MK4"; ROM_CONFIG="std"; bash Build.sh ROM_PLATFORM="N8"; ROM_CONFIG="std"; bash Build.sh ROM_PLATFORM="RCZ180"; ROM_CONFIG="ext"; bash Build.sh ROM_PLATFORM="RCZ180"; ROM_CONFIG="nat"; bash Build.sh ROM_PLATFORM="RCZ280"; ROM_CONFIG="ext"; bash Build.sh ROM_PLATFORM="RCZ280"; ROM_CONFIG="nat"; bash Build.sh - ROM_PLATFORM="RCZ280"; ROM_CONFIG="nat_zz"; bash Build.sh - ROM_PLATFORM="RCZ280"; ROM_CONFIG="nat_zzr"; bash Build.sh - ROM_PLATFORM="RCZ80"; ROM_CONFIG="kio"; bash Build.sh - ROM_PLATFORM="RCZ80"; ROM_CONFIG="mt"; bash Build.sh - ROM_PLATFORM="RCZ80"; ROM_CONFIG="duart"; bash Build.sh + ROM_PLATFORM="RCZ280"; ROM_CONFIG="zz80mb"; bash Build.sh + ROM_PLATFORM="RCZ280"; ROM_CONFIG="zzrc"; bash Build.sh +# ROM_PLATFORM="RCZ80"; ROM_CONFIG="mt"; bash Build.sh +# ROM_PLATFORM="RCZ80"; ROM_CONFIG="duart"; bash Build.sh ROM_PLATFORM="RCZ80"; ROM_CONFIG="std"; bash Build.sh + ROM_PLATFORM="RCZ80"; ROM_CONFIG="kio"; bash Build.sh + ROM_PLATFORM="RCZ80"; ROM_CONFIG="easy"; bash Build.sh + ROM_PLATFORM="RCZ80"; ROM_CONFIG="tiny"; bash Build.sh ROM_PLATFORM="RCZ80"; ROM_CONFIG="skz"; bash Build.sh ROM_PLATFORM="RCZ80"; ROM_CONFIG="zrc"; bash Build.sh ROM_PLATFORM="RCZ80"; ROM_CONFIG="zrc_ram"; bash Build.sh @@ -32,10 +32,10 @@ if [ "${ROM_PLATFORM}" == "dist" ] ; then ROM_PLATFORM="SBC"; ROM_CONFIG="std"; bash Build.sh ROM_PLATFORM="SBC"; ROM_CONFIG="simh"; bash Build.sh ROM_PLATFORM="MBC"; ROM_CONFIG="std"; bash Build.sh - ROM_PLATFORM="SCZ180"; ROM_CONFIG="126"; bash Build.sh - ROM_PLATFORM="SCZ180"; ROM_CONFIG="130"; bash Build.sh - ROM_PLATFORM="SCZ180"; ROM_CONFIG="131"; bash Build.sh - ROM_PLATFORM="SCZ180"; ROM_CONFIG="140"; bash Build.sh + ROM_PLATFORM="RCZ180"; ROM_CONFIG="126"; bash Build.sh + ROM_PLATFORM="RCZ180"; ROM_CONFIG="130"; bash Build.sh + ROM_PLATFORM="RCZ180"; ROM_CONFIG="131"; bash Build.sh + ROM_PLATFORM="RCZ180"; ROM_CONFIG="140"; bash Build.sh ROM_PLATFORM="UNA"; ROM_CONFIG="std"; bash Build.sh ROM_PLATFORM="ZETA"; ROM_CONFIG="std"; bash Build.sh ROM_PLATFORM="ZETA2"; ROM_CONFIG="std"; bash Build.sh diff --git a/Source/HBIOS/Config/DYNO_std.asm b/Source/HBIOS/Config/DYNO_std.asm index 2a3f825d..176b9786 100644 --- a/Source/HBIOS/Config/DYNO_std.asm +++ b/Source/HBIOS/Config/DYNO_std.asm @@ -27,6 +27,7 @@ #include "cfg_dyno.asm" ; CPUOSC .SET 18432000 ; CPU OSC FREQ IN MHZ +CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP ; Z180_CLKDIV .SET 1 ; Z180: CHK DIV: 0=OSC/2, 1=OSC, 2=OSC*2 Z180_MEMWAIT .SET 0 ; Z180: MEMORY WAIT STATES (0-3) diff --git a/Source/HBIOS/Config/EZZ80_std.asm b/Source/HBIOS/Config/EZZ80_std.asm deleted file mode 100644 index bb7afeda..00000000 --- a/Source/HBIOS/Config/EZZ80_std.asm +++ /dev/null @@ -1,38 +0,0 @@ -; -;================================================================================================== -; EASY Z80 STANDARD CONFIGURATION -;================================================================================================== -; -; THE COMPLETE SET OF DEFAULT CONFIGURATION SETTINGS FOR THIS PLATFORM ARE FOUND IN THE -; CFG_.ASM INCLUDED FILE WHICH IS FOUND IN THE PARENT DIRECTORY. THIS FILE CONTAINS -; COMMON CONFIGURATION SETTINGS THAT OVERRIDE THE DEFAULTS. IT IS INTENDED THAT YOU MAKE -; YOUR CUSTOMIZATIONS IN THIS FILE AND JUST INHERIT ALL OTHER SETTINGS FROM THE DEFAULTS. -; EVEN BETTER, YOU CAN MAKE A COPY OF THIS FILE WITH A NAME LIKE _XXX.ASM AND SPECIFY -; YOUR FILE IN THE BUILD PROCESS. -; -; THE SETTINGS BELOW ARE THE SETTINGS THAT ARE MOST COMMONLY MODIFIED FOR THIS PLATFORM. -; MANY OF THEM ARE EQUAL TO THE SETTINGS IN THE INCLUDED FILE, SO THEY DON'T REALLY DO -; ANYTHING AS IS. THEY ARE LISTED HERE TO MAKE IT EASY FOR YOU TO ADJUST THE MOST COMMON -; SETTINGS. -; -; N.B., SINCE THE SETTINGS BELOW ARE REDEFINING VALUES ALREADY SET IN THE INCLUDED FILE, -; TASM INSISTS THAT YOU USE THE .SET OPERATOR AND NOT THE .EQU OPERATOR BELOW. ATTEMPTING -; TO REDEFINE A VALUE WITH .EQU BELOW WILL CAUSE TASM ERRORS! -; -; PLEASE REFER TO THE CUSTOM BUILD INSTRUCTIONS (README.TXT) IN THE SOURCE DIRECTORY (TWO -; DIRECTORIES ABOVE THIS ONE). -; -#DEFINE BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON OR AUTO BOOT -; -#include "cfg_ezz80.asm" -; -CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP -; -CPUOSC .SET 10000000 ; CPU OSC FREQ IN MHZ -; -FDENABLE .SET TRUE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM) -FDMODE .SET FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPWDC] -; -IDEENABLE .SET TRUE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM) -; -PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM) diff --git a/Source/HBIOS/Config/EZZ80_tz80.asm b/Source/HBIOS/Config/EZZ80_tz80.asm deleted file mode 100644 index 96247c95..00000000 --- a/Source/HBIOS/Config/EZZ80_tz80.asm +++ /dev/null @@ -1,41 +0,0 @@ -; -;================================================================================================== -; EASY Z80 STANDARD CONFIGURATION -;================================================================================================== -; -; THE COMPLETE SET OF DEFAULT CONFIGURATION SETTINGS FOR THIS PLATFORM ARE FOUND IN THE -; CFG_.ASM INCLUDED FILE WHICH IS FOUND IN THE PARENT DIRECTORY. THIS FILE CONTAINS -; COMMON CONFIGURATION SETTINGS THAT OVERRIDE THE DEFAULTS. IT IS INTENDED THAT YOU MAKE -; YOUR CUSTOMIZATIONS IN THIS FILE AND JUST INHERIT ALL OTHER SETTINGS FROM THE DEFAULTS. -; EVEN BETTER, YOU CAN MAKE A COPY OF THIS FILE WITH A NAME LIKE _XXX.ASM AND SPECIFY -; YOUR FILE IN THE BUILD PROCESS. -; -; THE SETTINGS BELOW ARE THE SETTINGS THAT ARE MOST COMMONLY MODIFIED FOR THIS PLATFORM. -; MANY OF THEM ARE EQUAL TO THE SETTINGS IN THE INCLUDED FILE, SO THEY DON'T REALLY DO -; ANYTHING AS IS. THEY ARE LISTED HERE TO MAKE IT EASY FOR YOU TO ADJUST THE MOST COMMON -; SETTINGS. -; -; N.B., SINCE THE SETTINGS BELOW ARE REDEFINING VALUES ALREADY SET IN THE INCLUDED FILE, -; TASM INSISTS THAT YOU USE THE .SET OPERATOR AND NOT THE .EQU OPERATOR BELOW. ATTEMPTING -; TO REDEFINE A VALUE WITH .EQU BELOW WILL CAUSE TASM ERRORS! -; -; PLEASE REFER TO THE CUSTOM BUILD INSTRUCTIONS (README.TXT) IN THE SOURCE DIRECTORY (TWO -; DIRECTORIES ABOVE THIS ONE). -; -#include "cfg_ezz80.asm" -; -CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP -; -CPUOSC .SET 16000000 ; CPU OSC FREQ IN MHZ -; -IDEENABLE .SET TRUE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM) -; -PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM) -; -EIPCENABLE .SET TRUE ; EIPC: ENABLE Z80 EIPC (Z84C15) INITIALIZATION -; -CTCBASE .SET $10 ; CTC BASE I/O ADDRESS -LEDENABLE .SET TRUE ; ENABLES STATUS LED (SINGLE LED) -LEDPORT .SET $6E ; STATUS LED PORT ADDRESS -SIO0BASE .SET $18 ; SIO 0: REGISTERS BASE ADR -IDE0BASE .SET $90 ; IDE 0: IO BASE ADDRESS diff --git a/Source/HBIOS/Config/MBC_std.asm b/Source/HBIOS/Config/MBC_std.asm index 682639ee..f7370980 100644 --- a/Source/HBIOS/Config/MBC_std.asm +++ b/Source/HBIOS/Config/MBC_std.asm @@ -26,13 +26,30 @@ ; #include "cfg_mbc.asm" ; -BATCOND .SET FALSE +CPUOSC .SET 8000000 ; CPU OSC FREQ IN MHZ +CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP +; +INTMODE .SET 0 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) +; +DMAENABLE .SET FALSE ; DMA: ENABLE DMA DRIVER (DMA.ASM) +; +BATCOND .SET FALSE ; ENABLE LOW BATTERY WARNING MESSAGE ; CPUSPDDEF .SET SPD_LOW ; CPU SPEED DEFAULT SPD_UNSUP|SPD_HIGH|SPD_LOW ; -FDENABLE .SET TRUE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM) +ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) +RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) ; -PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM) +MDFFENABLE .SET FALSE ; MD: ENABLE FLASH FILE SYSTEM ; DSKYENABLE .SET FALSE ; ENABLES DSKY DSKYMODE .SET DSKYMODE_NG ; DSKY VERSION: DSKYMODE_[V1|NG] +; +UARTINTS .SET FALSE ; UART: INCLUDE INTERRUPT SUPPORT UNDER IM1/2/3 +;UARTCFG .SET UARTCFG | SER_RTS +; +CVDUMON .SET CVDUMON_CGA ; CVDU: CVDU MONITOR SETUP: CVDUMON_[NONE|CGA|EGA] +; +FDENABLE .SET TRUE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM) +; +PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM) diff --git a/Source/HBIOS/Config/SCZ180_140.asm b/Source/HBIOS/Config/RCZ180_126.asm similarity index 59% rename from Source/HBIOS/Config/SCZ180_140.asm rename to Source/HBIOS/Config/RCZ180_126.asm index 03a6667c..89e89555 100644 --- a/Source/HBIOS/Config/SCZ180_140.asm +++ b/Source/HBIOS/Config/RCZ180_126.asm @@ -1,6 +1,6 @@ ; ;================================================================================================== -; SC140 STANDARD CONFIGURATION +; SC126 STANDARD CONFIGURATION ;================================================================================================== ; ; THE COMPLETE SET OF DEFAULT CONFIGURATION SETTINGS FOR THIS PLATFORM ARE FOUND IN THE @@ -22,36 +22,47 @@ ; PLEASE REFER TO THE CUSTOM BUILD INSTRUCTIONS (README.TXT) IN THE SOURCE DIRECTORY (TWO ; DIRECTORIES ABOVE THIS ONE). ; -#include "cfg_scz180.asm" +#DEFINE PLATFORM_NAME "Small Computer SC126", " [", CONFIG, "]" +; +#DEFINE BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON OR AUTO BOOT +; +#include "cfg_rcz180.asm" ; CPUOSC .SET 18432000 ; CPU OSC FREQ IN MHZ +CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP ; Z180_CLKDIV .SET 1 ; Z180: CHK DIV: 0=OSC/2, 1=OSC, 2=OSC*2 Z180_MEMWAIT .SET 0 ; Z180: MEMORY WAIT STATES (0-3) Z180_IOWAIT .SET 1 ; Z180: I/O WAIT STATES TO ADD ABOVE 1 W/S BUILT-IN (0-3) ; -HBIOS_MUTEX .SET FALSE ; ENABLE REENTRANT CALLS TO HBIOS (ADDS OVERHEAD) -; -LEDENABLE .SET TRUE ; ENABLE STATUS LED (SINGLE LED) -; DIAGENABLE .SET TRUE ; ENABLES OUTPUT TO 8 BIT LED DIAGNOSTIC PORT +DIAGPORT .SET $0D ; DIAGNOSTIC PORT ADDRESS ; DSRTCENABLE .SET TRUE ; DSRTC: ENABLE DS-1302 CLOCK DRIVER (DSRTC.ASM) +INTRTCENABLE .SET TRUE ; ENABLE PERIODIC INTERRUPT CLOCK DRIVER (INTRTC.ASM) ; +UARTENABLE .SET TRUE ; UART: ENABLE 8250/16550-LIKE SERIAL DRIVER (UART.ASM) ASCIENABLE .SET TRUE ; ASCI: ENABLE Z180 ASCI SERIAL DRIVER (ASCI.ASM) -; ACIAENABLE .SET FALSE ; ACIA: ENABLE MOTOROLA 6850 ACIA DRIVER (ACIA.ASM) +SIOENABLE .SET TRUE ; SIO: ENABLE ZILOG SIO SERIAL DRIVER (SIO.ASM) ; -SIOENABLE .SET FALSE ; SIO: ENABLE ZILOG SIO SERIAL DRIVER (SIO.ASM) +TMSENABLE .SET FALSE ; TMS: ENABLE TMS9918 VIDEO/KBD DRIVER (TMS.ASM) +TMSTIMENABLE .SET FALSE ; TMS: ENABLE TIMER INTERRUPTS (REQUIRES IM1) +TMSMODE .SET TMSMODE_MSX ; TMS: DRIVER MODE: TMSMODE_[SCG|N8|MBC|RC|RCV9958|RCKBD] +MKYENABLE .SET FALSE ; MSX 5255 PPI KEYBOARD COMPATIBLE DRIVER (REQUIRES TMS VDA DRIVER) +VDAEMU_SERKBD .SET 0 ; VDA EMULATION: SERIAL KBD UNIT #, OR $FF FOR HW KBD ; AY38910ENABLE .SET TRUE ; AY: AY-3-8910 / YM2149 SOUND DRIVER -AYMODE .SET AYMODE_LINC ; AY: DRIVER MODE: AYMODE_[SCG|N8|RCZ80|RCZ180|MSX|LINC] +AYMODE .SET AYMODE_RCZ180 ; AY: DRIVER MODE: AYMODE_[SCG|N8|RCZ80|RCZ180|MSX|LINC] +SN76489ENABLE .SET FALSE ; SN: ENABLE SN76489 SOUND DRIVER ; FDENABLE .SET TRUE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM) -FDMODE .SET FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|DIDE|N8|DIO3] +FDMODE .SET FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPWDC] ; IDEENABLE .SET TRUE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM) -; PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM) -; SDENABLE .SET TRUE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM) +SDMODE .SET SDMODE_SC ; SD: DRIVER MODE: SDMODE_[JUHA|N8|CSIO|PPI|UART|DSD|MK4|SC|MT|USR] +SDCNT .SET 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD & SC ONLY +; +PRPENABLE .SET FALSE ; PRP: ENABLE ECB PROPELLER IO BOARD DRIVER (PRP.ASM) diff --git a/Source/HBIOS/Config/SCZ180_130.asm b/Source/HBIOS/Config/RCZ180_130.asm similarity index 68% rename from Source/HBIOS/Config/SCZ180_130.asm rename to Source/HBIOS/Config/RCZ180_130.asm index ef3a4a15..b44e0ee6 100644 --- a/Source/HBIOS/Config/SCZ180_130.asm +++ b/Source/HBIOS/Config/RCZ180_130.asm @@ -22,43 +22,47 @@ ; PLEASE REFER TO THE CUSTOM BUILD INSTRUCTIONS (README.TXT) IN THE SOURCE DIRECTORY (TWO ; DIRECTORIES ABOVE THIS ONE). ; -#DEFINE BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON OR AUTO BOOT +#DEFINE PLATFORM_NAME "Small Computer SC130", " [", CONFIG, "]" ; -#include "cfg_scz180.asm" +#DEFINE BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON OR AUTO BOOT ; -CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP +#include "cfg_rcz180.asm" ; CPUOSC .SET 18432000 ; CPU OSC FREQ IN MHZ +CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP ; Z180_CLKDIV .SET 1 ; Z180: CHK DIV: 0=OSC/2, 1=OSC, 2=OSC*2 Z180_MEMWAIT .SET 0 ; Z180: MEMORY WAIT STATES (0-3) Z180_IOWAIT .SET 1 ; Z180: I/O WAIT STATES TO ADD ABOVE 1 W/S BUILT-IN (0-3) ; -HBIOS_MUTEX .SET FALSE ; ENABLE REENTRANT CALLS TO HBIOS (ADDS OVERHEAD) -; LEDENABLE .SET TRUE ; ENABLE STATUS LED (SINGLE LED) -; DIAGENABLE .SET FALSE ; ENABLES OUTPUT TO 8 BIT LED DIAGNOSTIC PORT ; -DSRTCENABLE .SET FALSE ; DSRTC: ENABLE DS-1302 CLOCK DRIVER (DSRTC.ASM) +DSRTCENABLE .SET TRUE ; DSRTC: ENABLE DS-1302 CLOCK DRIVER (DSRTC.ASM) INTRTCENABLE .SET TRUE ; ENABLE PERIODIC INTERRUPT CLOCK DRIVER (INTRTC.ASM) ; UARTENABLE .SET TRUE ; UART: ENABLE 8250/16550-LIKE SERIAL DRIVER (UART.ASM) ASCIENABLE .SET TRUE ; ASCI: ENABLE Z180 ASCI SERIAL DRIVER (ASCI.ASM) ACIAENABLE .SET FALSE ; ACIA: ENABLE MOTOROLA 6850 ACIA DRIVER (ACIA.ASM) -SIOENABLE .SET FALSE ; SIO: ENABLE ZILOG SIO SERIAL DRIVER (SIO.ASM) +SIOENABLE .SET TRUE ; SIO: ENABLE ZILOG SIO SERIAL DRIVER (SIO.ASM) ; TMSENABLE .SET FALSE ; TMS: ENABLE TMS9918 VIDEO/KBD DRIVER (TMS.ASM) +TMSTIMENABLE .SET FALSE ; TMS: ENABLE TIMER INTERRUPTS (REQUIRES IM1) +TMSMODE .SET TMSMODE_MSX ; TMS: DRIVER MODE: TMSMODE_[SCG|N8|MBC|RC|RCV9958|RCKBD] +MKYENABLE .SET FALSE ; MSX 5255 PPI KEYBOARD COMPATIBLE DRIVER (REQUIRES TMS VDA DRIVER) +VDAEMU_SERKBD .SET 0 ; VDA EMULATION: SERIAL KBD UNIT #, OR $FF FOR HW KBD ; -AY38910ENABLE .SET TRUE ; AY: AY-3-8910 / YM2149 SOUND DRIVER +AY38910ENABLE .SET FALSE ; AY: AY-3-8910 / YM2149 SOUND DRIVER +AYMODE .SET AYMODE_RCZ180 ; AY: DRIVER MODE: AYMODE_[SCG|N8|RCZ80|RCZ180|MSX|LINC] +SN76489ENABLE .SET FALSE ; SN: ENABLE SN76489 SOUND DRIVER ; -FDENABLE .SET TRUE ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPWDC] -FDMODE .SET FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|DIDE|N8|DIO3] +FDENABLE .SET TRUE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM) +FDMODE .SET FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPWDC] ; IDEENABLE .SET TRUE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM) -; PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM) -; SDENABLE .SET TRUE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM) +SDMODE .SET SDMODE_SC ; SD: DRIVER MODE: SDMODE_[JUHA|N8|CSIO|PPI|UART|DSD|MK4|SC|MT|USR] +SDCNT .SET 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD & SC ONLY ; PRPENABLE .SET FALSE ; PRP: ENABLE ECB PROPELLER IO BOARD DRIVER (PRP.ASM) diff --git a/Source/HBIOS/Config/SCZ180_131.asm b/Source/HBIOS/Config/RCZ180_131.asm similarity index 81% rename from Source/HBIOS/Config/SCZ180_131.asm rename to Source/HBIOS/Config/RCZ180_131.asm index eacbe6fe..67cefbe9 100644 --- a/Source/HBIOS/Config/SCZ180_131.asm +++ b/Source/HBIOS/Config/RCZ180_131.asm @@ -22,11 +22,11 @@ ; PLEASE REFER TO THE CUSTOM BUILD INSTRUCTIONS (README.TXT) IN THE SOURCE DIRECTORY (TWO ; DIRECTORIES ABOVE THIS ONE). ; -#DEFINE BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON OR AUTO BOOT +#DEFINE PLATFORM_NAME "Small Computer SC131", " [", CONFIG, "]" ; -#include "cfg_scz180.asm" +#DEFINE BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON OR AUTO BOOT ; -CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP +#include "cfg_rcz180.asm" ; CPUOSC .SET 18432000 ; CPU OSC FREQ IN MHZ ; @@ -34,10 +34,7 @@ Z180_CLKDIV .SET 1 ; Z180: CHK DIV: 0=OSC/2, 1=OSC, 2=OSC*2 Z180_MEMWAIT .SET 0 ; Z180: MEMORY WAIT STATES (0-3) Z180_IOWAIT .SET 1 ; Z180: I/O WAIT STATES TO ADD ABOVE 1 W/S BUILT-IN (0-3) ; -HBIOS_MUTEX .SET FALSE ; ENABLE REENTRANT CALLS TO HBIOS (ADDS OVERHEAD) -; LEDENABLE .SET TRUE ; ENABLE STATUS LED (SINGLE LED) -; DIAGENABLE .SET FALSE ; ENABLES OUTPUT TO 8 BIT LED DIAGNOSTIC PORT ; DSRTCENABLE .SET FALSE ; DSRTC: ENABLE DS-1302 CLOCK DRIVER (DSRTC.ASM) @@ -48,15 +45,8 @@ ASCIENABLE .SET TRUE ; ASCI: ENABLE Z180 ASCI SERIAL DRIVER (ASCI.ASM) ACIAENABLE .SET FALSE ; ACIA: ENABLE MOTOROLA 6850 ACIA DRIVER (ACIA.ASM) SIOENABLE .SET FALSE ; SIO: ENABLE ZILOG SIO SERIAL DRIVER (SIO.ASM) ; -AY38910ENABLE .SET TRUE ; AY: AY-3-8910 / YM2149 SOUND DRIVER -; -FDENABLE .SET TRUE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM) -FDMODE .SET FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPWDC] -; IDEENABLE .SET FALSE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM) -; PPIDEENABLE .SET FALSE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM) -; SDENABLE .SET TRUE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM) -; -PRPENABLE .SET FALSE ; PRP: ENABLE ECB PROPELLER IO BOARD DRIVER (PRP.ASM) +SDMODE .SET SDMODE_SC ; SD: DRIVER MODE: SDMODE_[JUHA|N8|CSIO|PPI|UART|DSD|MK4|SC|MT|USR] +SDCNT .SET 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD & SC ONLY diff --git a/Source/HBIOS/Config/SCZ180_126.asm b/Source/HBIOS/Config/RCZ180_140.asm similarity index 73% rename from Source/HBIOS/Config/SCZ180_126.asm rename to Source/HBIOS/Config/RCZ180_140.asm index 72796034..0ddb9fc9 100644 --- a/Source/HBIOS/Config/SCZ180_126.asm +++ b/Source/HBIOS/Config/RCZ180_140.asm @@ -1,6 +1,6 @@ ; ;================================================================================================== -; SC126 STANDARD CONFIGURATION +; SC140 STANDARD CONFIGURATION ;================================================================================================== ; ; THE COMPLETE SET OF DEFAULT CONFIGURATION SETTINGS FOR THIS PLATFORM ARE FOUND IN THE @@ -22,11 +22,11 @@ ; PLEASE REFER TO THE CUSTOM BUILD INSTRUCTIONS (README.TXT) IN THE SOURCE DIRECTORY (TWO ; DIRECTORIES ABOVE THIS ONE). ; -#DEFINE BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON OR AUTO BOOT +#DEFINE PLATFORM_NAME "Small Computer SC140", " [", CONFIG, "]" ; -#include "cfg_scz180.asm" +#DEFINE BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON OR AUTO BOOT ; -CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP +#include "cfg_rcz180.asm" ; CPUOSC .SET 18432000 ; CPU OSC FREQ IN MHZ ; @@ -34,25 +34,28 @@ Z180_CLKDIV .SET 1 ; Z180: CHK DIV: 0=OSC/2, 1=OSC, 2=OSC*2 Z180_MEMWAIT .SET 0 ; Z180: MEMORY WAIT STATES (0-3) Z180_IOWAIT .SET 1 ; Z180: I/O WAIT STATES TO ADD ABOVE 1 W/S BUILT-IN (0-3) ; -HBIOS_MUTEX .SET FALSE ; ENABLE REENTRANT CALLS TO HBIOS (ADDS OVERHEAD) +LEDENABLE .SET TRUE ; ENABLE STATUS LED (SINGLE LED) +DIAGENABLE .SET TRUE ; ENABLES OUTPUT TO 8 BIT LED DIAGNOSTIC PORT +DIAGPORT .SET $0D ; DIAGNOSTIC PORT ADDRESS +; +DSRTCENABLE .SET TRUE ; DSRTC: ENABLE DS-1302 CLOCK DRIVER (DSRTC.ASM) +INTRTCENABLE .SET TRUE ; ENABLE PERIODIC INTERRUPT CLOCK DRIVER (INTRTC.ASM) ; UARTENABLE .SET TRUE ; UART: ENABLE 8250/16550-LIKE SERIAL DRIVER (UART.ASM) ASCIENABLE .SET TRUE ; ASCI: ENABLE Z180 ASCI SERIAL DRIVER (ASCI.ASM) ACIAENABLE .SET FALSE ; ACIA: ENABLE MOTOROLA 6850 ACIA DRIVER (ACIA.ASM) -SIOENABLE .SET FALSE ; SIO: ENABLE ZILOG SIO SERIAL DRIVER (SIO.ASM) +SIOENABLE .SET TRUE ; SIO: ENABLE ZILOG SIO SERIAL DRIVER (SIO.ASM) ; -TMSENABLE .SET FALSE ; TMS: ENABLE TMS9918 VIDEO/KBD DRIVER (TMS.ASM) -; -AY38910ENABLE .SET TRUE ; AY: AY-3-8910 / YM2149 SOUND DRIVER +AY38910ENABLE .SET FALSE ; AY: AY-3-8910 / YM2149 SOUND DRIVER +AYMODE .SET AYMODE_LINC ; AY: DRIVER MODE: AYMODE_[SCG|N8|RCZ80|RCZ180|MSX|LINC] +SN76489ENABLE .SET FALSE ; SN: ENABLE SN76489 SOUND DRIVER ; FDENABLE .SET TRUE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM) FDMODE .SET FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPWDC] ; IDEENABLE .SET TRUE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM) -; PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM) -; SDENABLE .SET TRUE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM) -SDCNT .SET 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD & SC ONLY +SDCNT .SET 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD/SC/MT SC ONLY ; PRPENABLE .SET FALSE ; PRP: ENABLE ECB PROPELLER IO BOARD DRIVER (PRP.ASM) diff --git a/Source/HBIOS/Config/RCZ180_ext.asm b/Source/HBIOS/Config/RCZ180_ext.asm index 1fbdbba2..c3c793db 100644 --- a/Source/HBIOS/Config/RCZ180_ext.asm +++ b/Source/HBIOS/Config/RCZ180_ext.asm @@ -26,9 +26,8 @@ ; #include "cfg_rcz180.asm" ; -CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP -; CPUOSC .SET 18432000 ; CPU OSC FREQ IN MHZ +CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP ; MEMMGR .SET MM_Z2 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180] ; @@ -36,20 +35,30 @@ Z180_CLKDIV .SET 1 ; Z180: CHK DIV: 0=OSC/2, 1=OSC, 2=OSC*2 Z180_MEMWAIT .SET 0 ; Z180: MEMORY WAIT STATES (0-3) Z180_IOWAIT .SET 1 ; Z180: I/O WAIT STATES TO ADD ABOVE 1 W/S BUILT-IN (0-3) ; +DSRTCENABLE .SET TRUE ; DSRTC: ENABLE DS-1302 CLOCK DRIVER (DSRTC.ASM) +INTRTCENABLE .SET TRUE ; ENABLE PERIODIC INTERRUPT CLOCK DRIVER (INTRTC.ASM) +; UARTENABLE .SET TRUE ; UART: ENABLE 8250/16550-LIKE SERIAL DRIVER (UART.ASM) ASCIENABLE .SET TRUE ; ASCI: ENABLE Z180 ASCI SERIAL DRIVER (ASCI.ASM) ACIAENABLE .SET FALSE ; ACIA: ENABLE MOTOROLA 6850 ACIA DRIVER (ACIA.ASM) -SIOENABLE .SET FALSE ; SIO: ENABLE ZILOG SIO SERIAL DRIVER (SIO.ASM) +SIOENABLE .SET TRUE ; SIO: ENABLE ZILOG SIO SERIAL DRIVER (SIO.ASM) ; TMSENABLE .SET FALSE ; TMS: ENABLE TMS9918 VIDEO/KBD DRIVER (TMS.ASM) +TMSMODE .SET TMSMODE_MSX ; TMS: DRIVER MODE: TMSMODE_[SCG|N8|MBC|RC|RCV9958|RCKBD] +MKYENABLE .SET FALSE ; MSX 5255 PPI KEYBOARD COMPATIBLE DRIVER (REQUIRES TMS VDA DRIVER) +VDAEMU_SERKBD .SET 0 ; VDA EMULATION: SERIAL KBD UNIT #, OR $FF FOR HW KBD +; ; -AY38910ENABLE .SET TRUE ; AY: AY-3-8910 / YM2149 SOUND DRIVER +AY38910ENABLE .SET FALSE ; AY: AY-3-8910 / YM2149 SOUND DRIVER +AYMODE .SET AYMODE_RCZ180 ; AY: DRIVER MODE: AYMODE_[SCG|N8|RCZ80|RCZ180|MSX|LINC] +SN76489ENABLE .SET FALSE ; SN: ENABLE SN76489 SOUND DRIVER ; FDENABLE .SET TRUE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM) FDMODE .SET FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPWDC] ; IDEENABLE .SET TRUE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM) -; PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM) +SDENABLE .SET FALSE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM) +SDCNT .SET 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD/SC/MT SC ONLY ; PRPENABLE .SET FALSE ; PRP: ENABLE ECB PROPELLER IO BOARD DRIVER (PRP.ASM) diff --git a/Source/HBIOS/Config/RCZ180_nat.asm b/Source/HBIOS/Config/RCZ180_nat.asm index eb367405..623cdce0 100644 --- a/Source/HBIOS/Config/RCZ180_nat.asm +++ b/Source/HBIOS/Config/RCZ180_nat.asm @@ -1,6 +1,6 @@ ; ;================================================================================================== -; RC2014 Z180 STANDARD CONFIGURATION (NATIVE Z180 MMU W/ LINEAR MEMORY) +; RC2014 Z180 STANDARD CONFIGURATION (NATIVE Z180 MMU W/ LINEAR MEMORY MODULE) ;================================================================================================== ; ; THE COMPLETE SET OF DEFAULT CONFIGURATION SETTINGS FOR THIS PLATFORM ARE FOUND IN THE @@ -26,9 +26,8 @@ ; #include "cfg_rcz180.asm" ; -CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP -; CPUOSC .SET 18432000 ; CPU OSC FREQ IN MHZ +CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP ; MEMMGR .SET MM_Z180 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180] ; @@ -36,20 +35,30 @@ Z180_CLKDIV .SET 1 ; Z180: CHK DIV: 0=OSC/2, 1=OSC, 2=OSC*2 Z180_MEMWAIT .SET 0 ; Z180: MEMORY WAIT STATES (0-3) Z180_IOWAIT .SET 1 ; Z180: I/O WAIT STATES TO ADD ABOVE 1 W/S BUILT-IN (0-3) ; +DSRTCENABLE .SET TRUE ; DSRTC: ENABLE DS-1302 CLOCK DRIVER (DSRTC.ASM) +INTRTCENABLE .SET TRUE ; ENABLE PERIODIC INTERRUPT CLOCK DRIVER (INTRTC.ASM) +; UARTENABLE .SET TRUE ; UART: ENABLE 8250/16550-LIKE SERIAL DRIVER (UART.ASM) ASCIENABLE .SET TRUE ; ASCI: ENABLE Z180 ASCI SERIAL DRIVER (ASCI.ASM) ACIAENABLE .SET FALSE ; ACIA: ENABLE MOTOROLA 6850 ACIA DRIVER (ACIA.ASM) -SIOENABLE .SET FALSE ; SIO: ENABLE ZILOG SIO SERIAL DRIVER (SIO.ASM) +SIOENABLE .SET TRUE ; SIO: ENABLE ZILOG SIO SERIAL DRIVER (SIO.ASM) ; TMSENABLE .SET FALSE ; TMS: ENABLE TMS9918 VIDEO/KBD DRIVER (TMS.ASM) +TMSMODE .SET TMSMODE_MSX ; TMS: DRIVER MODE: TMSMODE_[SCG|N8|MBC|RC|RCV9958|RCKBD] +MKYENABLE .SET FALSE ; MSX 5255 PPI KEYBOARD COMPATIBLE DRIVER (REQUIRES TMS VDA DRIVER) +VDAEMU_SERKBD .SET 0 ; VDA EMULATION: SERIAL KBD UNIT #, OR $FF FOR HW KBD +; ; -AY38910ENABLE .SET TRUE ; AY: AY-3-8910 / YM2149 SOUND DRIVER +AY38910ENABLE .SET FALSE ; AY: AY-3-8910 / YM2149 SOUND DRIVER +AYMODE .SET AYMODE_RCZ180 ; AY: DRIVER MODE: AYMODE_[SCG|N8|RCZ80|RCZ180|MSX|LINC] +SN76489ENABLE .SET FALSE ; SN: ENABLE SN76489 SOUND DRIVER ; FDENABLE .SET TRUE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM) FDMODE .SET FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPWDC] ; IDEENABLE .SET TRUE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM) -; PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM) +SDENABLE .SET FALSE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM) +SDCNT .SET 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD/SC/MT SC ONLY ; PRPENABLE .SET FALSE ; PRP: ENABLE ECB PROPELLER IO BOARD DRIVER (PRP.ASM) diff --git a/Source/HBIOS/Config/RCZ280_ext.asm b/Source/HBIOS/Config/RCZ280_ext.asm index 9eefcaaa..f2dd7592 100644 --- a/Source/HBIOS/Config/RCZ280_ext.asm +++ b/Source/HBIOS/Config/RCZ280_ext.asm @@ -26,11 +26,11 @@ ; #include "cfg_rcz280.asm" ; +CPUOSC .SET 12000000 ; CPU OSC FREQ IN MHZ +INTMODE .SET 1 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2 CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP ; -CPUOSC .SET 24000000 ; CPU OSC FREQ IN MHZ -; -INTMODE .SET 1 +MEMMGR .SET MM_Z2 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180] ; Z280_MEMLOWAIT .SET 0 ; Z280: LOW 8MB MEMORY WAIT STATES (0-3) Z280_MEMHIWAIT .SET 0 ; Z280: HIGH 8MB MEMORY WAIT STATES (0-3) @@ -42,11 +42,21 @@ UARTENABLE .SET TRUE ; UART: ENABLE 8250/16550-LIKE SERIAL DRIVER (UART.ASM) ACIAENABLE .SET TRUE ; ACIA: ENABLE MOTOROLA 6850 ACIA DRIVER (ACIA.ASM) SIOENABLE .SET TRUE ; SIO: ENABLE ZILOG SIO SERIAL DRIVER (SIO.ASM) ; +TMSENABLE .SET FALSE ; TMS: ENABLE TMS9918 VIDEO/KBD DRIVER (TMS.ASM) +TMSMODE .SET TMSMODE_MSX ; TMS: DRIVER MODE: TMSMODE_[SCG|N8|MBC|RC|RCV9958|RCKBD] +MKYENABLE .SET FALSE ; MSX 5255 PPI KEYBOARD COMPATIBLE DRIVER (REQUIRES TMS VDA DRIVER) +VDAEMU_SERKBD .SET 0 ; VDA EMULATION: SERIAL KBD UNIT #, OR $FF FOR HW KBD +; +AY38910ENABLE .SET FALSE ; AY: AY-3-8910 / YM2149 SOUND DRIVER +AYMODE .SET AYMODE_RCZ80 ; AY: DRIVER MODE: AYMODE_[SCG|N8|RCZ80|RCZ180|MSX|LINC] +SN76489ENABLE .SET FALSE ; SN: ENABLE SN76489 SOUND DRIVER +; FDENABLE .SET TRUE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM) FDMODE .SET FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPWDC] ; IDEENABLE .SET TRUE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM) -; PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM) +SDENABLE .SET FALSE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM) +SDCNT .SET 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD/SC/MT SC ONLY ; PRPENABLE .SET FALSE ; PRP: ENABLE ECB PROPELLER IO BOARD DRIVER (PRP.ASM) diff --git a/Source/HBIOS/Config/RCZ280_nat.asm b/Source/HBIOS/Config/RCZ280_nat.asm index 2f0797cf..7a82be80 100644 --- a/Source/HBIOS/Config/RCZ280_nat.asm +++ b/Source/HBIOS/Config/RCZ280_nat.asm @@ -26,14 +26,12 @@ ; #include "cfg_rcz280.asm" ; -CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP -; CPUOSC .SET 12000000 ; CPU OSC FREQ IN MHZ +INTMODE .SET 3 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2 +CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP ; MEMMGR .SET MM_Z280 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280] ; -INTMODE .SET 3 -; Z280_MEMLOWAIT .SET 0 ; Z280: LOW 8MB MEMORY WAIT STATES (0-3) Z280_MEMHIWAIT .SET 0 ; Z280: HIGH 8MB MEMORY WAIT STATES (0-3) Z280_IOWAIT .SET 1 ; Z280: I/O WAIT STATES TO ADD ABOVE 1 W/S BUILT-IN (0-3) @@ -41,14 +39,24 @@ Z280_INTWAIT .SET 0 ; Z280: INT ACK WAIT STATUS (0-3) ; Z2UENABLE .SET TRUE ; Z2U: ENABLE Z280 UART SERIAL DRIVER (Z2U.ASM) UARTENABLE .SET TRUE ; UART: ENABLE 8250/16550-LIKE SERIAL DRIVER (UART.ASM) -ACIAENABLE .SET TRUE ; ACIA: ENABLE MOTOROLA 6850 ACIA DRIVER (ACIA.ASM) +ACIAENABLE .SET FALSE ; ACIA: ENABLE MOTOROLA 6850 ACIA DRIVER (ACIA.ASM) SIOENABLE .SET TRUE ; SIO: ENABLE ZILOG SIO SERIAL DRIVER (SIO.ASM) ; +TMSENABLE .SET FALSE ; TMS: ENABLE TMS9918 VIDEO/KBD DRIVER (TMS.ASM) +TMSMODE .SET TMSMODE_MSX ; TMS: DRIVER MODE: TMSMODE_[SCG|N8|MBC|RC|RCV9958|RCKBD] +MKYENABLE .SET FALSE ; MSX 5255 PPI KEYBOARD COMPATIBLE DRIVER (REQUIRES TMS VDA DRIVER) +VDAEMU_SERKBD .SET 0 ; VDA EMULATION: SERIAL KBD UNIT #, OR $FF FOR HW KBD +; +AY38910ENABLE .SET FALSE ; AY: AY-3-8910 / YM2149 SOUND DRIVER +AYMODE .SET AYMODE_RCZ80 ; AY: DRIVER MODE: AYMODE_[SCG|N8|RCZ80|RCZ180|MSX|LINC] +SN76489ENABLE .SET FALSE ; SN: ENABLE SN76489 SOUND DRIVER +; FDENABLE .SET TRUE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM) FDMODE .SET FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPWDC] ; IDEENABLE .SET TRUE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM) -; PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM) +SDENABLE .SET FALSE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM) +SDCNT .SET 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD/SC/MT SC ONLY ; PRPENABLE .SET FALSE ; PRP: ENABLE ECB PROPELLER IO BOARD DRIVER (PRP.ASM) diff --git a/Source/HBIOS/Config/RCZ280_nat_zz.asm b/Source/HBIOS/Config/RCZ280_nat_zz.asm deleted file mode 100644 index e74f9d28..00000000 --- a/Source/HBIOS/Config/RCZ280_nat_zz.asm +++ /dev/null @@ -1,32 +0,0 @@ -; -;================================================================================================== -; RC2014 Z280 STANDARD CONFIGURATION (NATIVE Z280 MMU W/ LINEAR MEMORY ON ZZ80MB) -;================================================================================================== -; -; THE COMPLETE SET OF DEFAULT CONFIGURATION SETTINGS FOR THIS PLATFORM ARE FOUND IN THE -; CFG_.ASM INCLUDED FILE WHICH IS FOUND IN THE PARENT DIRECTORY. THIS FILE CONTAINS -; COMMON CONFIGURATION SETTINGS THAT OVERRIDE THE DEFAULTS. IT IS INTENDED THAT YOU MAKE -; YOUR CUSTOMIZATIONS IN THIS FILE AND JUST INHERIT ALL OTHER SETTINGS FROM THE DEFAULTS. -; EVEN BETTER, YOU CAN MAKE A COPY OF THIS FILE WITH A NAME LIKE _XXX.ASM AND SPECIFY -; YOUR FILE IN THE BUILD PROCESS. -; -; THE SETTINGS BELOW ARE THE SETTINGS THAT ARE MOST COMMONLY MODIFIED FOR THIS PLATFORM. -; MANY OF THEM ARE EQUAL TO THE SETTINGS IN THE INCLUDED FILE, SO THEY DON'T REALLY DO -; ANYTHING AS IS. THEY ARE LISTED HERE TO MAKE IT EASY FOR YOU TO ADJUST THE MOST COMMON -; SETTINGS. -; -; N.B., SINCE THE SETTINGS BELOW ARE REDEFINING VALUES ALREADY SET IN THE INCLUDED FILE, -; TASM INSISTS THAT YOU USE THE .SET OPERATOR AND NOT THE .EQU OPERATOR BELOW. ATTEMPTING -; TO REDEFINE A VALUE WITH .EQU BELOW WILL CAUSE TASM ERRORS! -; -; PLEASE REFER TO THE CUSTOM BUILD INSTRUCTIONS (README.TXT) IN THE SOURCE DIRECTORY (TWO -; DIRECTORIES ABOVE THIS ONE). -; -#DEFINE BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON OR AUTO BOOT -; -#include "Config/RCZ280_nat.asm" -; -RAMLOC .SET 23 ; START OF RAM AS POWER OF 2 (2^N) IN PHYSICAL ADDRESS SPACE -RAMBIAS .SET (1 << (RAMLOC - 10)) ; OFFSET OF START OF RAM IN PHYSICAL ADDRESS SPACE -; -Z2U0HFC .SET TRUE ; Z2U 0: ENABLE HARDWARE FLOW CONTROL diff --git a/Source/HBIOS/Config/RCZ280_nat_zzr.asm b/Source/HBIOS/Config/RCZ280_nat_zzr.asm deleted file mode 100644 index 9f7b81d1..00000000 --- a/Source/HBIOS/Config/RCZ280_nat_zzr.asm +++ /dev/null @@ -1,43 +0,0 @@ -; -;================================================================================================== -; RC2014 Z280 STANDARD CONFIGURATION (NATIVE Z280 MMU W/ LINEAR MEMORY ON ZZRCC) -;================================================================================================== -; -; THE COMPLETE SET OF DEFAULT CONFIGURATION SETTINGS FOR THIS PLATFORM ARE FOUND IN THE -; CFG_.ASM INCLUDED FILE WHICH IS FOUND IN THE PARENT DIRECTORY. THIS FILE CONTAINS -; COMMON CONFIGURATION SETTINGS THAT OVERRIDE THE DEFAULTS. IT IS INTENDED THAT YOU MAKE -; YOUR CUSTOMIZATIONS IN THIS FILE AND JUST INHERIT ALL OTHER SETTINGS FROM THE DEFAULTS. -; EVEN BETTER, YOU CAN MAKE A COPY OF THIS FILE WITH A NAME LIKE _XXX.ASM AND SPECIFY -; YOUR FILE IN THE BUILD PROCESS. -; -; THE SETTINGS BELOW ARE THE SETTINGS THAT ARE MOST COMMONLY MODIFIED FOR THIS PLATFORM. -; MANY OF THEM ARE EQUAL TO THE SETTINGS IN THE INCLUDED FILE, SO THEY DON'T REALLY DO -; ANYTHING AS IS. THEY ARE LISTED HERE TO MAKE IT EASY FOR YOU TO ADJUST THE MOST COMMON -; SETTINGS. -; -; N.B., SINCE THE SETTINGS BELOW ARE REDEFINING VALUES ALREADY SET IN THE INCLUDED FILE, -; TASM INSISTS THAT YOU USE THE .SET OPERATOR AND NOT THE .EQU OPERATOR BELOW. ATTEMPTING -; TO REDEFINE A VALUE WITH .EQU BELOW WILL CAUSE TASM ERRORS! -; -; PLEASE REFER TO THE CUSTOM BUILD INSTRUCTIONS (README.TXT) IN THE SOURCE DIRECTORY (TWO -; DIRECTORIES ABOVE THIS ONE). -; -#DEFINE BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON OR AUTO BOOT -; -#include "Config/RCZ280_nat.asm" -; -CPUOSC .SET 14745600 ; CPU OSC FREQ IN MHZ -; -RAMSIZE .SET 256 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) -ROMSIZE .SET 256 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) -ROMSIZE_CHK .SET 256 ; ROMSIZE VALUE VEREIFICATION (0=DISABLED) -; -RAMLOC .SET 18 ; START OF RAM AS POWER OF 2 (2^N) IN PHYSICAL ADDRESS SPACE -RAMBIAS .SET (1 << (RAMLOC - 10)) ; OFFSET OF START OF RAM IN PHYSICAL ADDRESS SPACE -; -MDROM .SET TRUE ; MD: ENABLE ROM DISK -MDRAM .SET FALSE ; MD: ENABLE RAM DISK -; -; -Z2UOSC .SET (CPUOSC / 8) ; Z2U: OSC FREQUENCY IN MHZ -Z2U0HFC .SET TRUE ; Z2U0: ENABLE HARDWARE FLOW CONTROL diff --git a/Source/HBIOS/Config/RCZ280_zz80mb.asm b/Source/HBIOS/Config/RCZ280_zz80mb.asm new file mode 100644 index 00000000..f1feaba4 --- /dev/null +++ b/Source/HBIOS/Config/RCZ280_zz80mb.asm @@ -0,0 +1,68 @@ +; +;================================================================================================== +; RC2014 Z280 STANDARD CONFIGURATION (NATIVE Z280 MMU W/ LINEAR MEMORY ON ZZ80MB) +;================================================================================================== +; +; THE COMPLETE SET OF DEFAULT CONFIGURATION SETTINGS FOR THIS PLATFORM ARE FOUND IN THE +; CFG_.ASM INCLUDED FILE WHICH IS FOUND IN THE PARENT DIRECTORY. THIS FILE CONTAINS +; COMMON CONFIGURATION SETTINGS THAT OVERRIDE THE DEFAULTS. IT IS INTENDED THAT YOU MAKE +; YOUR CUSTOMIZATIONS IN THIS FILE AND JUST INHERIT ALL OTHER SETTINGS FROM THE DEFAULTS. +; EVEN BETTER, YOU CAN MAKE A COPY OF THIS FILE WITH A NAME LIKE _XXX.ASM AND SPECIFY +; YOUR FILE IN THE BUILD PROCESS. +; +; THE SETTINGS BELOW ARE THE SETTINGS THAT ARE MOST COMMONLY MODIFIED FOR THIS PLATFORM. +; MANY OF THEM ARE EQUAL TO THE SETTINGS IN THE INCLUDED FILE, SO THEY DON'T REALLY DO +; ANYTHING AS IS. THEY ARE LISTED HERE TO MAKE IT EASY FOR YOU TO ADJUST THE MOST COMMON +; SETTINGS. +; +; N.B., SINCE THE SETTINGS BELOW ARE REDEFINING VALUES ALREADY SET IN THE INCLUDED FILE, +; TASM INSISTS THAT YOU USE THE .SET OPERATOR AND NOT THE .EQU OPERATOR BELOW. ATTEMPTING +; TO REDEFINE A VALUE WITH .EQU BELOW WILL CAUSE TASM ERRORS! +; +; PLEASE REFER TO THE CUSTOM BUILD INSTRUCTIONS (README.TXT) IN THE SOURCE DIRECTORY (TWO +; DIRECTORIES ABOVE THIS ONE). +; +#DEFINE PLATFORM_NAME "ZZ80MB", " [", CONFIG, "]" +; +#DEFINE BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON OR AUTO BOOT +; +#include "cfg_rcz280.asm" +; +CPUOSC .SET 12000000 ; CPU OSC FREQ IN MHZ +INTMODE .SET 3 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2 +CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP +; +MEMMGR .SET MM_Z280 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280] +; +RAMLOC .SET 23 ; START OF RAM AS POWER OF 2 (2^N) IN PHYSICAL ADDRESS SPACE +RAMBIAS .SET (1 << (RAMLOC - 10)) ; OFFSET OF START OF RAM IN PHYSICAL ADDRESS SPACE +; +Z280_MEMLOWAIT .SET 0 ; Z280: LOW 8MB MEMORY WAIT STATES (0-3) +Z280_MEMHIWAIT .SET 0 ; Z280: HIGH 8MB MEMORY WAIT STATES (0-3) +Z280_IOWAIT .SET 1 ; Z280: I/O WAIT STATES TO ADD ABOVE 1 W/S BUILT-IN (0-3) +Z280_INTWAIT .SET 0 ; Z280: INT ACK WAIT STATUS (0-3) +; +Z2UENABLE .SET TRUE ; Z2U: ENABLE Z280 UART SERIAL DRIVER (Z2U.ASM) +Z2U0HFC .SET TRUE ; Z2U 0: ENABLE HARDWARE FLOW CONTROL +UARTENABLE .SET TRUE ; UART: ENABLE 8250/16550-LIKE SERIAL DRIVER (UART.ASM) +ACIAENABLE .SET FALSE ; ACIA: ENABLE MOTOROLA 6850 ACIA DRIVER (ACIA.ASM) +SIOENABLE .SET TRUE ; SIO: ENABLE ZILOG SIO SERIAL DRIVER (SIO.ASM) +; +TMSENABLE .SET FALSE ; TMS: ENABLE TMS9918 VIDEO/KBD DRIVER (TMS.ASM) +TMSMODE .SET TMSMODE_MSX ; TMS: DRIVER MODE: TMSMODE_[SCG|N8|MBC|RC|RCV9958|RCKBD] +MKYENABLE .SET FALSE ; MSX 5255 PPI KEYBOARD COMPATIBLE DRIVER (REQUIRES TMS VDA DRIVER) +VDAEMU_SERKBD .SET 0 ; VDA EMULATION: SERIAL KBD UNIT #, OR $FF FOR HW KBD +; +AY38910ENABLE .SET FALSE ; AY: AY-3-8910 / YM2149 SOUND DRIVER +AYMODE .SET AYMODE_RCZ80 ; AY: DRIVER MODE: AYMODE_[SCG|N8|RCZ80|RCZ180|MSX|LINC] +SN76489ENABLE .SET FALSE ; SN: ENABLE SN76489 SOUND DRIVER +; +FDENABLE .SET TRUE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM) +FDMODE .SET FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPWDC] +; +IDEENABLE .SET TRUE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM) +PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM) +SDENABLE .SET FALSE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM) +SDCNT .SET 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD/SC/MT SC ONLY +; +PRPENABLE .SET FALSE ; PRP: ENABLE ECB PROPELLER IO BOARD DRIVER (PRP.ASM) diff --git a/Source/HBIOS/Config/RCZ280_zzrc.asm b/Source/HBIOS/Config/RCZ280_zzrc.asm new file mode 100644 index 00000000..32b4a4cd --- /dev/null +++ b/Source/HBIOS/Config/RCZ280_zzrc.asm @@ -0,0 +1,76 @@ +; +;================================================================================================== +; RC2014 Z280 STANDARD CONFIGURATION (NATIVE Z280 MMU W/ LINEAR MEMORY ON ZZRC) +;================================================================================================== +; +; THE COMPLETE SET OF DEFAULT CONFIGURATION SETTINGS FOR THIS PLATFORM ARE FOUND IN THE +; CFG_.ASM INCLUDED FILE WHICH IS FOUND IN THE PARENT DIRECTORY. THIS FILE CONTAINS +; COMMON CONFIGURATION SETTINGS THAT OVERRIDE THE DEFAULTS. IT IS INTENDED THAT YOU MAKE +; YOUR CUSTOMIZATIONS IN THIS FILE AND JUST INHERIT ALL OTHER SETTINGS FROM THE DEFAULTS. +; EVEN BETTER, YOU CAN MAKE A COPY OF THIS FILE WITH A NAME LIKE _XXX.ASM AND SPECIFY +; YOUR FILE IN THE BUILD PROCESS. +; +; THE SETTINGS BELOW ARE THE SETTINGS THAT ARE MOST COMMONLY MODIFIED FOR THIS PLATFORM. +; MANY OF THEM ARE EQUAL TO THE SETTINGS IN THE INCLUDED FILE, SO THEY DON'T REALLY DO +; ANYTHING AS IS. THEY ARE LISTED HERE TO MAKE IT EASY FOR YOU TO ADJUST THE MOST COMMON +; SETTINGS. +; +; N.B., SINCE THE SETTINGS BELOW ARE REDEFINING VALUES ALREADY SET IN THE INCLUDED FILE, +; TASM INSISTS THAT YOU USE THE .SET OPERATOR AND NOT THE .EQU OPERATOR BELOW. ATTEMPTING +; TO REDEFINE A VALUE WITH .EQU BELOW WILL CAUSE TASM ERRORS! +; +; PLEASE REFER TO THE CUSTOM BUILD INSTRUCTIONS (README.TXT) IN THE SOURCE DIRECTORY (TWO +; DIRECTORIES ABOVE THIS ONE). +; +#DEFINE PLATFORM_NAME "ZZRC", " [", CONFIG, "]" +; +#DEFINE BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON OR AUTO BOOT +; +#include "cfg_rcz280.asm" +; +CPUOSC .SET 14745600 ; CPU OSC FREQ IN MHZ +INTMODE .SET 3 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2 +CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP +; +MEMMGR .SET MM_Z280 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280] +; +RAMSIZE .SET 256 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) +ROMSIZE .SET 256 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) +ROMSIZE_CHK .SET 256 ; ROMSIZE VALUE VERIFICATION (0=DISABLED) +; +RAMLOC .SET 18 ; START OF RAM AS POWER OF 2 (2^N) IN PHYSICAL ADDRESS SPACE +RAMBIAS .SET (1 << (RAMLOC - 10)) ; OFFSET OF START OF RAM IN PHYSICAL ADDRESS SPACE +; +Z280_MEMLOWAIT .SET 0 ; Z280: LOW 8MB MEMORY WAIT STATES (0-3) +Z280_MEMHIWAIT .SET 0 ; Z280: HIGH 8MB MEMORY WAIT STATES (0-3) +Z280_IOWAIT .SET 1 ; Z280: I/O WAIT STATES TO ADD ABOVE 1 W/S BUILT-IN (0-3) +Z280_INTWAIT .SET 0 ; Z280: INT ACK WAIT STATUS (0-3) +; +MDROM .SET TRUE ; MD: ENABLE ROM DISK +MDRAM .SET FALSE ; MD: ENABLE RAM DISK +; +Z2UENABLE .SET TRUE ; Z2U: ENABLE Z280 UART SERIAL DRIVER (Z2U.ASM) +Z2UOSC .SET (CPUOSC / 8) ; Z2U: OSC FREQUENCY IN MHZ +Z2U0HFC .SET TRUE ; Z2U0: ENABLE HARDWARE FLOW CONTROL +UARTENABLE .SET TRUE ; UART: ENABLE 8250/16550-LIKE SERIAL DRIVER (UART.ASM) +ACIAENABLE .SET FALSE ; ACIA: ENABLE MOTOROLA 6850 ACIA DRIVER (ACIA.ASM) +SIOENABLE .SET TRUE ; SIO: ENABLE ZILOG SIO SERIAL DRIVER (SIO.ASM) +; +TMSENABLE .SET FALSE ; TMS: ENABLE TMS9918 VIDEO/KBD DRIVER (TMS.ASM) +TMSMODE .SET TMSMODE_MSX ; TMS: DRIVER MODE: TMSMODE_[SCG|N8|MBC|RC|RCV9958|RCKBD] +MKYENABLE .SET FALSE ; MSX 5255 PPI KEYBOARD COMPATIBLE DRIVER (REQUIRES TMS VDA DRIVER) +VDAEMU_SERKBD .SET 0 ; VDA EMULATION: SERIAL KBD UNIT #, OR $FF FOR HW KBD +; +AY38910ENABLE .SET FALSE ; AY: AY-3-8910 / YM2149 SOUND DRIVER +AYMODE .SET AYMODE_RCZ80 ; AY: DRIVER MODE: AYMODE_[SCG|N8|RCZ80|RCZ180|MSX|LINC] +SN76489ENABLE .SET FALSE ; SN: ENABLE SN76489 SOUND DRIVER +; +FDENABLE .SET TRUE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM) +FDMODE .SET FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPWDC] +; +IDEENABLE .SET TRUE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM) +PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM) +SDENABLE .SET FALSE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM) +SDCNT .SET 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD/SC/MT SC ONLY +; +PRPENABLE .SET FALSE ; PRP: ENABLE ECB PROPELLER IO BOARD DRIVER (PRP.ASM) diff --git a/Source/HBIOS/Config/RCZ80_duart.asm b/Source/HBIOS/Config/RCZ80_duart.asm deleted file mode 100644 index 01dc5e5b..00000000 --- a/Source/HBIOS/Config/RCZ80_duart.asm +++ /dev/null @@ -1,34 +0,0 @@ -; -;================================================================================================== -; RC2014 Z80 CONFIGURATION W/ DUART -;================================================================================================== -; -; THE COMPLETE SET OF DEFAULT CONFIGURATION SETTINGS FOR THIS PLATFORM ARE FOUND IN THE -; CFG_.ASM INCLUDED FILE WHICH IS FOUND IN THE PARENT DIRECTORY. THIS FILE CONTAINS -; COMMON CONFIGURATION SETTINGS THAT OVERRIDE THE DEFAULTS. IT IS INTENDED THAT YOU MAKE -; YOUR CUSTOMIZATIONS IN THIS FILE AND JUST INHERIT ALL OTHER SETTINGS FROM THE DEFAULTS. -; EVEN BETTER, YOU CAN MAKE A COPY OF THIS FILE WITH A NAME LIKE _XXX.ASM AND SPECIFY -; YOUR FILE IN THE BUILD PROCESS. -; -; THE SETTINGS BELOW ARE THE SETTINGS THAT ARE MOST COMMONLY MODIFIED FOR THIS PLATFORM. -; MANY OF THEM ARE EQUAL TO THE SETTINGS IN THE INCLUDED FILE, SO THEY DON'T REALLY DO -; ANYTHING AS IS. THEY ARE LISTED HERE TO MAKE IT EASY FOR YOU TO ADJUST THE MOST COMMON -; SETTINGS. -; -; N.B., SINCE THE SETTINGS BELOW ARE REDEFINING VALUES ALREADY SET IN THE INCLUDED FILE, -; TASM INSISTS THAT YOU USE THE .SET OPERATOR AND NOT THE .EQU OPERATOR BELOW. ATTEMPTING -; TO REDEFINE A VALUE WITH .EQU BELOW WILL CAUSE TASM ERRORS! -; -; PLEASE REFER TO THE CUSTOM BUILD INSTRUCTIONS (README.TXT) IN THE SOURCE DIRECTORY (TWO -; DIRECTORIES ABOVE THIS ONE). -; -#DEFINE BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON OR AUTO BOOT -; -#include "Config/RCZ80_std.asm" -; -CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP -; -DUARTENABLE .SET TRUE ; DUART: ENABLE 2681/2692 SERIAL DRIVER (DUART.ASM) -DUARTCNT .SET 1 ; DUART: NUMBER OF CHIPS TO DETECT (1-2) -; -PRPENABLE .SET FALSE ; PRP: ENABLE ECB PROPELLER IO BOARD DRIVER (PRP.ASM) diff --git a/Source/HBIOS/Config/RCZ80_easy.asm b/Source/HBIOS/Config/RCZ80_easy.asm new file mode 100644 index 00000000..01d45484 --- /dev/null +++ b/Source/HBIOS/Config/RCZ80_easy.asm @@ -0,0 +1,76 @@ +; +;================================================================================================== +; EASY Z80 STANDARD CONFIGURATION +;================================================================================================== +; +; THE COMPLETE SET OF DEFAULT CONFIGURATION SETTINGS FOR THIS PLATFORM ARE FOUND IN THE +; CFG_.ASM INCLUDED FILE WHICH IS FOUND IN THE PARENT DIRECTORY. THIS FILE CONTAINS +; COMMON CONFIGURATION SETTINGS THAT OVERRIDE THE DEFAULTS. IT IS INTENDED THAT YOU MAKE +; YOUR CUSTOMIZATIONS IN THIS FILE AND JUST INHERIT ALL OTHER SETTINGS FROM THE DEFAULTS. +; EVEN BETTER, YOU CAN MAKE A COPY OF THIS FILE WITH A NAME LIKE _XXX.ASM AND SPECIFY +; YOUR FILE IN THE BUILD PROCESS. +; +; THE SETTINGS BELOW ARE THE SETTINGS THAT ARE MOST COMMONLY MODIFIED FOR THIS PLATFORM. +; MANY OF THEM ARE EQUAL TO THE SETTINGS IN THE INCLUDED FILE, SO THEY DON'T REALLY DO +; ANYTHING AS IS. THEY ARE LISTED HERE TO MAKE IT EASY FOR YOU TO ADJUST THE MOST COMMON +; SETTINGS. +; +; N.B., SINCE THE SETTINGS BELOW ARE REDEFINING VALUES ALREADY SET IN THE INCLUDED FILE, +; TASM INSISTS THAT YOU USE THE .SET OPERATOR AND NOT THE .EQU OPERATOR BELOW. ATTEMPTING +; TO REDEFINE A VALUE WITH .EQU BELOW WILL CAUSE TASM ERRORS! +; +; PLEASE REFER TO THE CUSTOM BUILD INSTRUCTIONS (README.TXT) IN THE SOURCE DIRECTORY (TWO +; DIRECTORIES ABOVE THIS ONE). +; +#DEFINE PLATFORM_NAME "Easy-Z80", " [", CONFIG, "]" +; +#DEFINE BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON OR AUTO BOOT +; +#include "cfg_rcz80.asm" +; +CPUOSC .SET 10000000 ; CPU OSC FREQ IN MHZ +CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP +INTMODE .SET 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) +; +WDOGMODE .SET WDOG_EZZ80 ; WATCHDOG MODE: WDOG_[NONE|EZZ80|SKZ] +WDOGIO .SET $6F ; WATCHDOG REGISTER ADR +; +DIAGENABLE .SET FALSE ; ENABLES OUTPUT TO 8 BIT LED DIAGNOSTIC PORT +; +DSRTCENABLE .SET TRUE ; DSRTC: ENABLE DS-1302 CLOCK DRIVER (DSRTC.ASM) +RP5RTCENABLE .SET FALSE ; RP5C01 RTC BASED CLOCK (RP5RTC.ASM) +; +CTCENABLE .SET TRUE ; ENABLE ZILOG CTC SUPPORT +CTCTIMER .SET TRUE ; ENABLE CTC PERIODIC TIMER +CTCMODE .SET CTCMODE_CTR ; CTC MODE: CTCMODE_[NONE|CTR|TIM16|TIM256] +CTCOSC .SET 921600 ; CTC CLOCK FREQUENCY +; +UARTENABLE .SET TRUE ; UART: ENABLE 8250/16550-LIKE SERIAL DRIVER (UART.ASM) +ACIAENABLE .SET FALSE ; ACIA: ENABLE MOTOROLA 6850 ACIA DRIVER (ACIA.ASM) +SIOENABLE .SET TRUE ; SIO: ENABLE ZILOG SIO SERIAL DRIVER (SIO.ASM) +SIO0MODE .SET SIOMODE_STD ; SIO 0: CHIP TYPE: SIOMODE_[STD|RC|SMB|ZP] +SIO0ACLK .SET 1843200 ; SIO 0A: OSC FREQ IN HZ, ZP=2457600/4915200, RC/SMB=7372800 +SIO0BCLK .SET 1843200 ; SIO 0B: OSC FREQ IN HZ, ZP=2457600/4915200, RC/SMB=7372800 +SIO1ACLK .SET 7372800 ; SIO 1A: OSC FREQ IN HZ, ZP=2457600/4915200, RC/SMB=7372800 +SIO1BCLK .SET 7372800 ; SIO 1B: OSC FREQ IN HZ, ZP=2457600/4915200, RC/SMB=7372800 +DUARTENABLE .SET FALSE ; DUART: ENABLE 2681/2692 SERIAL DRIVER (DUART.ASM) +; +TMSENABLE .SET FALSE ; TMS: ENABLE TMS9918 VIDEO/KBD DRIVER (TMS.ASM) +TMSTIMENABLE .SET FALSE ; TMS: ENABLE TIMER INTERRUPTS (REQUIRES IM1) +TMSMODE .SET TMSMODE_MSX ; TMS: DRIVER MODE: TMSMODE_[SCG|N8|MBC|RC|RCV9958|RCKBD] +MKYENABLE .SET FALSE ; MSX 5255 PPI KEYBOARD COMPATIBLE DRIVER (REQUIRES TMS VDA DRIVER) +VDAEMU_SERKBD .SET 0 ; VDA EMULATION: SERIAL KBD UNIT #, OR $FF FOR HW KBD +; +AY38910ENABLE .SET FALSE ; AY: AY-3-8910 / YM2149 SOUND DRIVER +AYMODE .SET AYMODE_RCZ80 ; AY: DRIVER MODE: AYMODE_[SCG|N8|RCZ80|RCZ180|MSX|LINC] +SN76489ENABLE .SET FALSE ; SN: ENABLE SN76489 SOUND DRIVER +; +FDENABLE .SET TRUE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM) +FDMODE .SET FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPWDC] +; +IDEENABLE .SET TRUE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM) +PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM) +SDENABLE .SET FALSE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM) +SDCNT .SET 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD/SC/MT SC ONLY +; +PRPENABLE .SET FALSE ; PRP: ENABLE ECB PROPELLER IO BOARD DRIVER (PRP.ASM) diff --git a/Source/HBIOS/Config/RCZ80_kio.asm b/Source/HBIOS/Config/RCZ80_kio.asm index 157f8cb4..424e29b8 100644 --- a/Source/HBIOS/Config/RCZ80_kio.asm +++ b/Source/HBIOS/Config/RCZ80_kio.asm @@ -24,19 +24,23 @@ ; #DEFINE BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON OR AUTO BOOT ; -#include "Config/RCZ80_std.asm" -; -CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP +#include "cfg_rcz80.asm" ; +CPUOSC .SET 7372800 ; CPU OSC FREQ IN MHZ INTMODE .SET 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2 +CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP ; +DSRTCENABLE .SET TRUE ; DSRTC: ENABLE DS-1302 CLOCK DRIVER (DSRTC.ASM) +RP5RTCENABLE .SET FALSE ; RP5C01 RTC BASED CLOCK (RP5RTC.ASM) KIOENABLE .SET TRUE ; ENABLE ZILOG KIO SUPPORT ; CTCENABLE .SET TRUE ; ENABLE ZILOG CTC SUPPORT CTCTIMER .SET TRUE ; ENABLE CTC PERIODIC TIMER CTCBASE .SET KIOBASE+$04 ; CTC BASE I/O ADDRESS ; +UARTENABLE .SET TRUE ; UART: ENABLE 8250/16550-LIKE SERIAL DRIVER (UART.ASM) ACIAENABLE .SET FALSE ; ACIA: ENABLE MOTOROLA 6850 ACIA DRIVER (ACIA.ASM) +DUARTENABLE .SET FALSE ; DUART: ENABLE 2681/2692 SERIAL DRIVER (DUART.ASM) ; SIOENABLE .SET TRUE ; SIO: ENABLE ZILOG SIO SERIAL DRIVER (SIO.ASM) SIOCNT .SET 1 ; SIO: NUMBER OF CHIPS TO DETECT (1-2), 2 CHANNELS PER CHIP @@ -47,4 +51,22 @@ SIO0ACTCC .SET 0 ; SIO 0A: CTC CHANNEL 0=A, 1=B, 2=C, 3=D, -1 FOR NONE SIO0BCLK .SET 1843200 ; SIO 0B: OSC FREQ IN HZ, ZP=2457600/4915200, RC/SMB=7372800 SIO0BCTCC .SET 1 ; SIO 0B: CTC CHANNEL 0=A, 1=B, 2=C, 3=D, -1 FOR NONE ; +TMSENABLE .SET FALSE ; TMS: ENABLE TMS9918 VIDEO/KBD DRIVER (TMS.ASM) +TMSTIMENABLE .SET FALSE ; TMS: ENABLE TIMER INTERRUPTS (REQUIRES IM1) +TMSMODE .SET TMSMODE_MSX ; TMS: DRIVER MODE: TMSMODE_[SCG|N8|MBC|RC|RCV9958|RCKBD] +MKYENABLE .SET FALSE ; MSX 5255 PPI KEYBOARD COMPATIBLE DRIVER (REQUIRES TMS VDA DRIVER) +VDAEMU_SERKBD .SET 0 ; VDA EMULATION: SERIAL KBD UNIT #, OR $FF FOR HW KBD +; +AY38910ENABLE .SET FALSE ; AY: AY-3-8910 / YM2149 SOUND DRIVER +AYMODE .SET AYMODE_RCZ80 ; AY: DRIVER MODE: AYMODE_[SCG|N8|RCZ80|RCZ180|MSX|LINC] +SN76489ENABLE .SET FALSE ; SN: ENABLE SN76489 SOUND DRIVER +; +FDENABLE .SET TRUE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM) +FDMODE .SET FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPWDC] +; +IDEENABLE .SET TRUE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM) +PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM) +SDENABLE .SET FALSE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM) +SDCNT .SET 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD/SC/MT SC ONLY +; PRPENABLE .SET FALSE ; PRP: ENABLE ECB PROPELLER IO BOARD DRIVER (PRP.ASM) diff --git a/Source/HBIOS/Config/RCZ80_mt.asm b/Source/HBIOS/Config/RCZ80_mt.asm deleted file mode 100644 index f7c73f46..00000000 --- a/Source/HBIOS/Config/RCZ80_mt.asm +++ /dev/null @@ -1,34 +0,0 @@ -; -;================================================================================================== -; RC2014 Z80 CONFIGURATION W/ MT011 -;================================================================================================== -; -; THE COMPLETE SET OF DEFAULT CONFIGURATION SETTINGS FOR THIS PLATFORM ARE FOUND IN THE -; CFG_.ASM INCLUDED FILE WHICH IS FOUND IN THE PARENT DIRECTORY. THIS FILE CONTAINS -; COMMON CONFIGURATION SETTINGS THAT OVERRIDE THE DEFAULTS. IT IS INTENDED THAT YOU MAKE -; YOUR CUSTOMIZATIONS IN THIS FILE AND JUST INHERIT ALL OTHER SETTINGS FROM THE DEFAULTS. -; EVEN BETTER, YOU CAN MAKE A COPY OF THIS FILE WITH A NAME LIKE _XXX.ASM AND SPECIFY -; YOUR FILE IN THE BUILD PROCESS. -; -; THE SETTINGS BELOW ARE THE SETTINGS THAT ARE MOST COMMONLY MODIFIED FOR THIS PLATFORM. -; MANY OF THEM ARE EQUAL TO THE SETTINGS IN THE INCLUDED FILE, SO THEY DON'T REALLY DO -; ANYTHING AS IS. THEY ARE LISTED HERE TO MAKE IT EASY FOR YOU TO ADJUST THE MOST COMMON -; SETTINGS. -; -; N.B., SINCE THE SETTINGS BELOW ARE REDEFINING VALUES ALREADY SET IN THE INCLUDED FILE, -; TASM INSISTS THAT YOU USE THE .SET OPERATOR AND NOT THE .EQU OPERATOR BELOW. ATTEMPTING -; TO REDEFINE A VALUE WITH .EQU BELOW WILL CAUSE TASM ERRORS! -; -; PLEASE REFER TO THE CUSTOM BUILD INSTRUCTIONS (README.TXT) IN THE SOURCE DIRECTORY (TWO -; DIRECTORIES ABOVE THIS ONE). -; -#DEFINE BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON OR AUTO BOOT -; -#include "Config/RCZ80_std.asm" -; -CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP -; -TMSENABLE .SET FALSE ; TMS: ENABLE TMS9918 VIDEO/KBD DRIVER (TMS.ASM) -TMSTIMENABLE .SET FALSE ; TMS: ENABLE TIMER INTERRUPTS (REQUIRES IM1) -; -SDENABLE .SET TRUE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM) diff --git a/Source/HBIOS/Config/RCZ80_skz.asm b/Source/HBIOS/Config/RCZ80_skz.asm index 6dd09a98..2c4f8841 100644 --- a/Source/HBIOS/Config/RCZ80_skz.asm +++ b/Source/HBIOS/Config/RCZ80_skz.asm @@ -24,15 +24,44 @@ ; #DEFINE BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON OR AUTO BOOT ; -#include "Config/RCZ80_std.asm" +#include "cfg_rcz80.asm" ; -LEDENABLE .SET TRUE ; ENABLES STATUS LED (SINGLE LED) -LEDPORT .SET $6E ; STATUS LED PORT ADDRESS +CPUOSC .SET 7372800 ; CPU OSC FREQ IN MHZ +CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP ; SKZENABLE .SET TRUE ; ENABLE SERGEY'S Z80-512K FEATURES SKZDIV .SET DIV_12 ; UART CLK (CLK2) DIVIDER FOR Z80-512K -; WDOGMODE .SET WDOG_SKZ ; WATCHDOG MODE: WDOG_[NONE|EZZ80|SKZ] ; +LEDENABLE .SET TRUE ; ENABLES STATUS LED (SINGLE LED) +LEDPORT .SET $6E ; STATUS LED PORT ADDRESS +; +DSRTCENABLE .SET TRUE ; DSRTC: ENABLE DS-1302 CLOCK DRIVER (DSRTC.ASM) +RP5RTCENABLE .SET FALSE ; RP5C01 RTC BASED CLOCK (RP5RTC.ASM) +; +UARTENABLE .SET TRUE ; UART: ENABLE 8250/16550-LIKE SERIAL DRIVER (UART.ASM) +ACIAENABLE .SET TRUE ; ACIA: ENABLE MOTOROLA 6850 ACIA DRIVER (ACIA.ASM) +SIOENABLE .SET TRUE ; SIO: ENABLE ZILOG SIO SERIAL DRIVER (SIO.ASM) SIO0BCLK .SET CPUOSC / 12 ; SIO 0B: OSC FREQ IN HZ, ZP=2457600/4915200, RC/SMB=7372800 SIO0BCFG .SET SER_38400_8N1 ; SIO 0B: SERIAL LINE CONFIG +DUARTENABLE .SET FALSE ; DUART: ENABLE 2681/2692 SERIAL DRIVER (DUART.ASM) +; +TMSENABLE .SET FALSE ; TMS: ENABLE TMS9918 VIDEO/KBD DRIVER (TMS.ASM) +TMSTIMENABLE .SET FALSE ; TMS: ENABLE TIMER INTERRUPTS (REQUIRES IM1) +TMSMODE .SET TMSMODE_MSX ; TMS: DRIVER MODE: TMSMODE_[SCG|N8|MBC|RC|RCV9958|RCKBD] +MKYENABLE .SET FALSE ; MSX 5255 PPI KEYBOARD COMPATIBLE DRIVER (REQUIRES TMS VDA DRIVER) +VDAEMU_SERKBD .SET 0 ; VDA EMULATION: SERIAL KBD UNIT #, OR $FF FOR HW KBD +; +AY38910ENABLE .SET FALSE ; AY: AY-3-8910 / YM2149 SOUND DRIVER +AYMODE .SET AYMODE_RCZ80 ; AY: DRIVER MODE: AYMODE_[SCG|N8|RCZ80|RCZ180|MSX|LINC] +SN76489ENABLE .SET FALSE ; SN: ENABLE SN76489 SOUND DRIVER +; +FDENABLE .SET TRUE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM) +FDMODE .SET FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPWDC] +; +IDEENABLE .SET TRUE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM) +PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM) +SDENABLE .SET FALSE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM) +SDCNT .SET 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD/SC/MT SC ONLY +; +PRPENABLE .SET FALSE ; PRP: ENABLE ECB PROPELLER IO BOARD DRIVER (PRP.ASM) diff --git a/Source/HBIOS/Config/RCZ80_std.asm b/Source/HBIOS/Config/RCZ80_std.asm index de027501..ed0a7e1a 100644 --- a/Source/HBIOS/Config/RCZ80_std.asm +++ b/Source/HBIOS/Config/RCZ80_std.asm @@ -26,13 +26,16 @@ ; #include "cfg_rcz80.asm" ; +CPUOSC .SET 7372800 ; CPU OSC FREQ IN MHZ CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP ; -CPUOSC .SET 7372800 ; CPU OSC FREQ IN MHZ +DSRTCENABLE .SET TRUE ; DSRTC: ENABLE DS-1302 CLOCK DRIVER (DSRTC.ASM) +RP5RTCENABLE .SET FALSE ; RP5C01 RTC BASED CLOCK (RP5RTC.ASM) ; UARTENABLE .SET TRUE ; UART: ENABLE 8250/16550-LIKE SERIAL DRIVER (UART.ASM) ACIAENABLE .SET TRUE ; ACIA: ENABLE MOTOROLA 6850 ACIA DRIVER (ACIA.ASM) SIOENABLE .SET TRUE ; SIO: ENABLE ZILOG SIO SERIAL DRIVER (SIO.ASM) +DUARTENABLE .SET FALSE ; DUART: ENABLE 2681/2692 SERIAL DRIVER (DUART.ASM) ; TMSENABLE .SET FALSE ; TMS: ENABLE TMS9918 VIDEO/KBD DRIVER (TMS.ASM) TMSTIMENABLE .SET FALSE ; TMS: ENABLE TIMER INTERRUPTS (REQUIRES IM1) @@ -40,15 +43,16 @@ TMSMODE .SET TMSMODE_MSX ; TMS: DRIVER MODE: TMSMODE_[SCG|N8|MBC|RC|RCV9958|RCK MKYENABLE .SET FALSE ; MSX 5255 PPI KEYBOARD COMPATIBLE DRIVER (REQUIRES TMS VDA DRIVER) VDAEMU_SERKBD .SET 0 ; VDA EMULATION: SERIAL KBD UNIT #, OR $FF FOR HW KBD ; -AY38910ENABLE .SET TRUE ; AY: AY-3-8910 / YM2149 SOUND DRIVER +AY38910ENABLE .SET FALSE ; AY: AY-3-8910 / YM2149 SOUND DRIVER +AYMODE .SET AYMODE_RCZ80 ; AY: DRIVER MODE: AYMODE_[SCG|N8|RCZ80|RCZ180|MSX|LINC] +SN76489ENABLE .SET FALSE ; SN: ENABLE SN76489 SOUND DRIVER ; FDENABLE .SET TRUE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM) FDMODE .SET FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPWDC] ; IDEENABLE .SET TRUE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM) -; PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM) +SDENABLE .SET FALSE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM) +SDCNT .SET 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD/SC/MT SC ONLY ; PRPENABLE .SET FALSE ; PRP: ENABLE ECB PROPELLER IO BOARD DRIVER (PRP.ASM) -; -RP5RTCENABLE .SET FALSE ; RP5C01 RTC BASED CLOCK (RP5RTC.ASM) diff --git a/Source/HBIOS/Config/RCZ80_tiny.asm b/Source/HBIOS/Config/RCZ80_tiny.asm new file mode 100644 index 00000000..20663e88 --- /dev/null +++ b/Source/HBIOS/Config/RCZ80_tiny.asm @@ -0,0 +1,82 @@ +; +;================================================================================================== +; TINY Z80 STANDARD CONFIGURATION +;================================================================================================== +; +; THE COMPLETE SET OF DEFAULT CONFIGURATION SETTINGS FOR THIS PLATFORM ARE FOUND IN THE +; CFG_.ASM INCLUDED FILE WHICH IS FOUND IN THE PARENT DIRECTORY. THIS FILE CONTAINS +; COMMON CONFIGURATION SETTINGS THAT OVERRIDE THE DEFAULTS. IT IS INTENDED THAT YOU MAKE +; YOUR CUSTOMIZATIONS IN THIS FILE AND JUST INHERIT ALL OTHER SETTINGS FROM THE DEFAULTS. +; EVEN BETTER, YOU CAN MAKE A COPY OF THIS FILE WITH A NAME LIKE _XXX.ASM AND SPECIFY +; YOUR FILE IN THE BUILD PROCESS. +; +; THE SETTINGS BELOW ARE THE SETTINGS THAT ARE MOST COMMONLY MODIFIED FOR THIS PLATFORM. +; MANY OF THEM ARE EQUAL TO THE SETTINGS IN THE INCLUDED FILE, SO THEY DON'T REALLY DO +; ANYTHING AS IS. THEY ARE LISTED HERE TO MAKE IT EASY FOR YOU TO ADJUST THE MOST COMMON +; SETTINGS. +; +; N.B., SINCE THE SETTINGS BELOW ARE REDEFINING VALUES ALREADY SET IN THE INCLUDED FILE, +; TASM INSISTS THAT YOU USE THE .SET OPERATOR AND NOT THE .EQU OPERATOR BELOW. ATTEMPTING +; TO REDEFINE A VALUE WITH .EQU BELOW WILL CAUSE TASM ERRORS! +; +; PLEASE REFER TO THE CUSTOM BUILD INSTRUCTIONS (README.TXT) IN THE SOURCE DIRECTORY (TWO +; DIRECTORIES ABOVE THIS ONE). +; +#DEFINE PLATFORM_NAME "Tiny-Z80", " [", CONFIG, "]" +; +#DEFINE BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON OR AUTO BOOT +; +#include "cfg_rcz80.asm" +; +CPUOSC .SET 16000000 ; CPU OSC FREQ IN MHZ +CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP +INTMODE .SET 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) +; +EIPCENABLE .SET TRUE ; EIPC: ENABLE Z80 EIPC (Z84C15) INITIALIZATION +WDOGMODE .SET WDOG_EZZ80 ; WATCHDOG MODE: WDOG_[NONE|EZZ80|SKZ] +WDOGIO .SET $6F ; WATCHDOG REGISTER ADR +; +DIAGENABLE .SET FALSE ; ENABLES OUTPUT TO 8 BIT LED DIAGNOSTIC PORT +LEDENABLE .SET TRUE ; ENABLES STATUS LED (SINGLE LED) +LEDPORT .SET $6E ; STATUS LED PORT ADDRESS +; +DSRTCENABLE .SET TRUE ; DSRTC: ENABLE DS-1302 CLOCK DRIVER (DSRTC.ASM) +RP5RTCENABLE .SET FALSE ; RP5C01 RTC BASED CLOCK (RP5RTC.ASM) +; +CTCENABLE .SET TRUE ; ENABLE ZILOG CTC SUPPORT +CTCBASE .SET $10 ; CTC BASE I/O ADDRESS +CTCTIMER .SET TRUE ; ENABLE CTC PERIODIC TIMER +CTCMODE .SET CTCMODE_CTR ; CTC MODE: CTCMODE_[NONE|CTR|TIM16|TIM256] +CTCOSC .SET 921600 ; CTC CLOCK FREQUENCY +; +UARTENABLE .SET TRUE ; UART: ENABLE 8250/16550-LIKE SERIAL DRIVER (UART.ASM) +ACIAENABLE .SET FALSE ; ACIA: ENABLE MOTOROLA 6850 ACIA DRIVER (ACIA.ASM) +SIOENABLE .SET TRUE ; SIO: ENABLE ZILOG SIO SERIAL DRIVER (SIO.ASM) +SIO0MODE .SET SIOMODE_STD ; SIO 0: CHIP TYPE: SIOMODE_[STD|RC|SMB|ZP] +SIO0BASE .SET $18 ; SIO 0: REGISTERS BASE ADR +SIO0ACLK .SET 1843200 ; SIO 0A: OSC FREQ IN HZ, ZP=2457600/4915200, RC/SMB=7372800 +SIO0BCLK .SET 1843200 ; SIO 0B: OSC FREQ IN HZ, ZP=2457600/4915200, RC/SMB=7372800 +SIO1ACLK .SET 7372800 ; SIO 1A: OSC FREQ IN HZ, ZP=2457600/4915200, RC/SMB=7372800 +SIO1BCLK .SET 7372800 ; SIO 1B: OSC FREQ IN HZ, ZP=2457600/4915200, RC/SMB=7372800 +DUARTENABLE .SET FALSE ; DUART: ENABLE 2681/2692 SERIAL DRIVER (DUART.ASM) +; +TMSENABLE .SET FALSE ; TMS: ENABLE TMS9918 VIDEO/KBD DRIVER (TMS.ASM) +TMSTIMENABLE .SET FALSE ; TMS: ENABLE TIMER INTERRUPTS (REQUIRES IM1) +TMSMODE .SET TMSMODE_MSX ; TMS: DRIVER MODE: TMSMODE_[SCG|N8|MBC|RC|RCV9958|RCKBD] +MKYENABLE .SET FALSE ; MSX 5255 PPI KEYBOARD COMPATIBLE DRIVER (REQUIRES TMS VDA DRIVER) +VDAEMU_SERKBD .SET 0 ; VDA EMULATION: SERIAL KBD UNIT #, OR $FF FOR HW KBD +; +AY38910ENABLE .SET FALSE ; AY: AY-3-8910 / YM2149 SOUND DRIVER +AYMODE .SET AYMODE_RCZ80 ; AY: DRIVER MODE: AYMODE_[SCG|N8|RCZ80|RCZ180|MSX|LINC] +SN76489ENABLE .SET FALSE ; SN: ENABLE SN76489 SOUND DRIVER +; +FDENABLE .SET TRUE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM) +FDMODE .SET FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPWDC] +; +IDEENABLE .SET TRUE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM) +IDE0BASE .SET $90 ; IDE 0: IO BASE ADDRESS +PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM) +SDENABLE .SET FALSE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM) +SDCNT .SET 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD/SC/MT SC ONLY +; +PRPENABLE .SET FALSE ; PRP: ENABLE ECB PROPELLER IO BOARD DRIVER (PRP.ASM) diff --git a/Source/HBIOS/Config/RCZ80_zrc.asm b/Source/HBIOS/Config/RCZ80_zrc.asm index 44997489..5afc93d1 100644 --- a/Source/HBIOS/Config/RCZ80_zrc.asm +++ b/Source/HBIOS/Config/RCZ80_zrc.asm @@ -22,31 +22,38 @@ ; PLEASE REFER TO THE CUSTOM BUILD INSTRUCTIONS (README.TXT) IN THE SOURCE DIRECTORY (TWO ; DIRECTORIES ABOVE THIS ONE). ; +#DEFINE PLATFORM_NAME "ZRC", " [", CONFIG, "]" +; #DEFINE BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON OR AUTO BOOT ; #include "cfg_rcz80.asm" -; +CPUOSC .SET 14745600 ; CPU OSC FREQ IN MHZ CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP ; -CPUOSC .SET 7372800 ; CPU OSC FREQ IN MHZ -; RAMSIZE .SET 1536 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) MEMMGR .SET MM_ZRC ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180] ; UARTENABLE .SET TRUE ; UART: ENABLE 8250/16550-LIKE SERIAL DRIVER (UART.ASM) ACIAENABLE .SET TRUE ; ACIA: ENABLE MOTOROLA 6850 ACIA DRIVER (ACIA.ASM) SIOENABLE .SET TRUE ; SIO: ENABLE ZILOG SIO SERIAL DRIVER (SIO.ASM) +DUARTENABLE .SET FALSE ; DUART: ENABLE 2681/2692 SERIAL DRIVER (DUART.ASM) ; TMSENABLE .SET FALSE ; TMS: ENABLE TMS9918 VIDEO/KBD DRIVER (TMS.ASM) TMSTIMENABLE .SET FALSE ; TMS: ENABLE TIMER INTERRUPTS (REQUIRES IM1) +TMSMODE .SET TMSMODE_MSX ; TMS: DRIVER MODE: TMSMODE_[SCG|N8|MBC|RC|RCV9958|RCKBD] +MKYENABLE .SET FALSE ; MSX 5255 PPI KEYBOARD COMPATIBLE DRIVER (REQUIRES TMS VDA DRIVER) +VDAEMU_SERKBD .SET 0 ; VDA EMULATION: SERIAL KBD UNIT #, OR $FF FOR HW KBD ; -AY38910ENABLE .SET TRUE ; AY: AY-3-8910 / YM2149 SOUND DRIVER +AY38910ENABLE .SET FALSE ; AY: AY-3-8910 / YM2149 SOUND DRIVER +AYMODE .SET AYMODE_RCZ80 ; AY: DRIVER MODE: AYMODE_[SCG|N8|RCZ80|RCZ180|MSX|LINC] +SN76489ENABLE .SET FALSE ; SN: ENABLE SN76489 SOUND DRIVER ; FDENABLE .SET TRUE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM) FDMODE .SET FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPWDC] ; IDEENABLE .SET TRUE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM) -; PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM) +SDENABLE .SET FALSE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM) +SDCNT .SET 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD/SC/MT SC ONLY ; PRPENABLE .SET FALSE ; PRP: ENABLE ECB PROPELLER IO BOARD DRIVER (PRP.ASM) diff --git a/Source/HBIOS/Config/RCZ80_zrc_ram.asm b/Source/HBIOS/Config/RCZ80_zrc_ram.asm index 99fea429..f900abc1 100644 --- a/Source/HBIOS/Config/RCZ80_zrc_ram.asm +++ b/Source/HBIOS/Config/RCZ80_zrc_ram.asm @@ -22,13 +22,14 @@ ; PLEASE REFER TO THE CUSTOM BUILD INSTRUCTIONS (README.TXT) IN THE SOURCE DIRECTORY (TWO ; DIRECTORIES ABOVE THIS ONE). ; +#DEFINE PLATFORM_NAME "ZRC", " [", CONFIG, "]" +; #DEFINE BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON OR AUTO BOOT ; #include "cfg_rcz80.asm" ; -CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP -; CPUOSC .SET 7372800 ; CPU OSC FREQ IN MHZ +CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP ; RAMSIZE .SET 2048 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) ROMSIZE .SET 0 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) @@ -39,17 +40,24 @@ MDROM .SET FALSE ; MD: ENABLE ROM DISK UARTENABLE .SET TRUE ; UART: ENABLE 8250/16550-LIKE SERIAL DRIVER (UART.ASM) ACIAENABLE .SET TRUE ; ACIA: ENABLE MOTOROLA 6850 ACIA DRIVER (ACIA.ASM) SIOENABLE .SET TRUE ; SIO: ENABLE ZILOG SIO SERIAL DRIVER (SIO.ASM) +DUARTENABLE .SET FALSE ; DUART: ENABLE 2681/2692 SERIAL DRIVER (DUART.ASM) ; TMSENABLE .SET FALSE ; TMS: ENABLE TMS9918 VIDEO/KBD DRIVER (TMS.ASM) TMSTIMENABLE .SET FALSE ; TMS: ENABLE TIMER INTERRUPTS (REQUIRES IM1) +TMSMODE .SET TMSMODE_MSX ; TMS: DRIVER MODE: TMSMODE_[SCG|N8|MBC|RC|RCV9958|RCKBD] +MKYENABLE .SET FALSE ; MSX 5255 PPI KEYBOARD COMPATIBLE DRIVER (REQUIRES TMS VDA DRIVER) +VDAEMU_SERKBD .SET 0 ; VDA EMULATION: SERIAL KBD UNIT #, OR $FF FOR HW KBD ; -AY38910ENABLE .SET TRUE ; AY: AY-3-8910 / YM2149 SOUND DRIVER +AY38910ENABLE .SET FALSE ; AY: AY-3-8910 / YM2149 SOUND DRIVER +AYMODE .SET AYMODE_RCZ80 ; AY: DRIVER MODE: AYMODE_[SCG|N8|RCZ80|RCZ180|MSX|LINC] +SN76489ENABLE .SET FALSE ; SN: ENABLE SN76489 SOUND DRIVER ; FDENABLE .SET TRUE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM) FDMODE .SET FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPWDC] ; IDEENABLE .SET TRUE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM) -; PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM) +SDENABLE .SET FALSE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM) +SDCNT .SET 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD/SC/MT SC ONLY ; PRPENABLE .SET FALSE ; PRP: ENABLE ECB PROPELLER IO BOARD DRIVER (PRP.ASM) diff --git a/Source/HBIOS/Config/RPH_std.asm b/Source/HBIOS/Config/RPH_std.asm index ce191500..3dedea59 100644 --- a/Source/HBIOS/Config/RPH_std.asm +++ b/Source/HBIOS/Config/RPH_std.asm @@ -27,6 +27,7 @@ #include "cfg_rph.asm" ; CPUOSC .SET 18432000 ; CPU OSC FREQ IN MHZ +CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP ; INTMODE .SET 0 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) ; @@ -36,6 +37,4 @@ Z180_IOWAIT .SET 1 ; Z180: I/O WAIT STATES TO ADD ABOVE 1 W/S BUILT-IN (0-3) ; RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) ; -CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP -; PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM) diff --git a/Source/HBIOS/cfg_dyno.asm b/Source/HBIOS/cfg_dyno.asm index 06209dbc..1ab0c143 100644 --- a/Source/HBIOS/cfg_dyno.asm +++ b/Source/HBIOS/cfg_dyno.asm @@ -3,7 +3,7 @@ ; ROMWBW 2.X CONFIGURATION DEFAULTS FOR DYNO ;================================================================================================== ; -; THIS FILE CONTAINS THE FULL EQU OF DEFAULT CONFIGURATION SETTINGS FOR THE PLATFORM +; THIS FILE CONTAINS THE FULL SET OF DEFAULT CONFIGURATION SETTINGS FOR THE PLATFORM ; INDICATED ABOVE. THIS FILE SHOULD *NOT* NORMALLY BE CHANGED. INSTEAD, YOU SHOULD ; OVERRIDE ANY SETTINGS YOU WANT USING A CONFIGURATION FILE IN THE CONFIG DIRECTORY ; UNDER THIS DIRECTORY. @@ -56,6 +56,9 @@ KIOENABLE .EQU FALSE ; ENABLE ZILOG KIO SUPPORT KIOBASE .EQU $80 ; KIO BASE I/O ADDRESS ; CTCENABLE .EQU FALSE ; ENABLE ZILOG CTC SUPPORT +CTCDEBUG .EQU FALSE ; ENABLE CTC DRIVER DEBUG OUTPUT +CTCBASE .EQU $88 ; CTC BASE I/O ADDRESS +CTCTIMER .EQU FALSE ; ENABLE CTC PERIODIC TIMER ; EIPCENABLE .EQU FALSE ; EIPC: ENABLE Z80 EIPC (Z84C15) INITIALIZATION ; @@ -80,7 +83,12 @@ CRTACT .EQU FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP VDAEMU .EQU EMUTYP_ANSI ; VDA EMULATION: EMUTYP_[TTY|ANSI] VDAEMU_SERKBD .EQU $FF ; VDA EMULATION: SERIAL KBD UNIT #, OR $FF FOR HW KBD ANSITRACE .EQU 1 ; ANSI DRIVER TRACE LEVEL (0=NO,1=ERRORS,2=ALL) +PPKTRACE .EQU 1 ; PPK DRIVER TRACE LEVEL (0=NO,1=ERRORS,2=ALL) +KBDTRACE .EQU 1 ; KBD DRIVER TRACE LEVEL (0=NO,1=ERRORS,2=ALL) +PPKKBLOUT .EQU KBD_US ; PPK KEYBOARD LANGUAGE: KBD_[US|DE] +KBDKBLOUT .EQU KBD_US ; KBD KEYBOARD LANGUAGE: KBD_[US|DE] MKYENABLE .EQU FALSE ; MSX 5255 PPI KEYBOARD COMPATIBLE DRIVER (REQUIRES TMS VDA DRIVER) +MKYKBLOUT .EQU KBD_US ; KBD KEYBOARD LANGUAGE: KBD_[US|DE] ; DSRTCENABLE .EQU FALSE ; DSRTC: ENABLE DS-1302 CLOCK DRIVER (DSRTC.ASM) DSRTCMODE .EQU DSRTCMODE_STD ; DSRTC: OPERATING MODE: DSRTC_[STD|MFPIC] @@ -103,8 +111,25 @@ DS7RTCENABLE .EQU FALSE ; DS7RTC: ENABLE DS-1307 I2C CLOCK DRIVER (DS7RTC.ASM) DS7RTCMODE .EQU DS7RTCMODE_PCF ; DS7RTC: OPERATING MODE: DS7RTC_[PCF] ; DUARTENABLE .EQU FALSE ; DUART: ENABLE 2681/2692 SERIAL DRIVER (DUART.ASM) +DUARTCNT .EQU 1 ; DUART: NUMBER OF CHIPS TO DETECT (1-2) +DUART0BASE .EQU $A0 ; DUART 0: BASE ADDRESS OF CHIP +DUART0ACFG .EQU DEFSERCFG ; DUART 0A: SERIAL LINE CONFIG +DUART0BCFG .EQU DEFSERCFG ; DUART 0B: SERIAL LINE CONFIG +DUART1BASE .EQU $40 ; DUART 1: BASE ADDRESS OF CHIP +DUART1ACFG .EQU DEFSERCFG ; DUART 1A: SERIAL LINE CONFIG +DUART1BCFG .EQU DEFSERCFG ; DUART 1B: SERIAL LINE CONFIG ; UARTENABLE .EQU FALSE ; UART: ENABLE 8250/16550-LIKE SERIAL DRIVER (UART.ASM) +UARTOSC .EQU 1843200 ; UART: OSC FREQUENCY IN MHZ +UARTINTS .EQU FALSE ; UART: INCLUDE INTERRUPT SUPPORT UNDER IM1/2/3 +UARTCFG .EQU DEFSERCFG | SER_RTS ; UART: LINE CONFIG FOR UART PORTS +UARTSBC .EQU FALSE ; UART: AUTO-DETECT SBC/ZETA ONBOARD UART +UARTSBCFORCE .EQU FALSE ; UART: FORCE DETECTION OF SBC UART (FOR SIMH) +UARTCAS .EQU FALSE ; UART: AUTO-DETECT ECB CASSETTE UART +UARTMFP .EQU FALSE ; UART: AUTO-DETECT MF/PIC UART +UART4 .EQU FALSE ; UART: AUTO-DETECT 4UART UART +UARTRC .EQU TRUE ; UART: AUTO-DETECT RC UART +UARTDUAL .EQU FALSE ; UART: AUTO-DETECT DUAL UART ; ASCIENABLE .EQU TRUE ; ASCI: ENABLE Z180 ASCI SERIAL DRIVER (ASCI.ASM) ASCIINTS .EQU TRUE ; ASCI: INCLUDE INTERRUPT SUPPORT UNDER IM1/2/3 @@ -118,6 +143,25 @@ Z2UENABLE .EQU FALSE ; Z2U: ENABLE Z280 UART SERIAL DRIVER (Z2U.ASM) ACIAENABLE .EQU FALSE ; ACIA: ENABLE MOTOROLA 6850 ACIA DRIVER (ACIA.ASM) ; SIOENABLE .EQU FALSE ; SIO: ENABLE ZILOG SIO SERIAL DRIVER (SIO.ASM) +SIODEBUG .EQU FALSE ; SIO: ENABLE DEBUG OUTPUT +SIOBOOT .EQU 0 ; SIO: REBOOT ON RCV CHAR (0=DISABLED) +SIOCNT .EQU 2 ; SIO: NUMBER OF CHIPS TO DETECT (1-2), 2 CHANNELS PER CHIP +SIO0MODE .EQU SIOMODE_RC ; SIO 0: CHIP TYPE: SIOMODE_[STD|RC|SMB|ZP] +SIO0BASE .EQU $80 ; SIO 0: REGISTERS BASE ADR +SIO0ACLK .EQU 7372800 ; SIO 0A: OSC FREQ IN HZ, ZP=2457600/4915200, RC/SMB=7372800 +SIO0ACFG .EQU SER_115200_8N1 ; SIO 0A: SERIAL LINE CONFIG +SIO0ACTCC .EQU -1 ; SIO 0A: CTC CHANNEL 0=A, 1=B, 2=C, 3=D, -1 FOR NONE +SIO0BCLK .EQU 7372800 ; SIO 0B: OSC FREQ IN HZ, ZP=2457600/4915200, RC/SMB=7372800 +SIO0BCFG .EQU SER_115200_8N1 ; SIO 0B: SERIAL LINE CONFIG +SIO0BCTCC .EQU -1 ; SIO 0B: CTC CHANNEL 0=A, 1=B, 2=C, 3=D, -1 FOR NONE +SIO1MODE .EQU SIOMODE_RC ; SIO 1: CHIP TYPE: SIOMODE_[STD|RC|SMB|ZP] +SIO1BASE .EQU $84 ; SIO 1: REGISTERS BASE ADR +SIO1ACLK .EQU 7372800 ; SIO 1A: OSC FREQ IN HZ, ZP=2457600/4915200, RC/SMB=7372800 +SIO1ACFG .EQU SER_115200_8N1 ; SIO 1A: SERIAL LINE CONFIG +SIO1ACTCC .EQU -1 ; SIO 1A: CTC CHANNEL 0=A, 1=B, 2=C, 3=D, -1 FOR NONE +SIO1BCLK .EQU 7372800 ; SIO 1B: OSC FREQ IN HZ, ZP=2457600/4915200, RC/SMB=7372800 +SIO1BCFG .EQU SER_115200_8N1 ; SIO 1B: SERIAL LINE CONFIG +SIO1BCTCC .EQU -1 ; SIO 1B: CTC CHANNEL 0=A, 1=B, 2=C, 3=D, -1 FOR NONE ; XIOCFG .EQU DEFSERCFG ; XIO: SERIAL LINE CONFIG ; @@ -125,7 +169,7 @@ VDUENABLE .EQU FALSE ; VDU: ENABLE VDU VIDEO/KBD DRIVER (VDU.ASM) CVDUENABLE .EQU FALSE ; CVDU: ENABLE CVDU VIDEO/KBD DRIVER (CVDU.ASM) GDCENABLE .EQU FALSE ; GDC: ENABLE 7220 GDC VIDEO/KBD DRIVER (GDC.ASM) TMSENABLE .EQU FALSE ; TMS: ENABLE TMS9918 VIDEO/KBD DRIVER (TMS.ASM) -TMSMODE .EQU TMSMODE_NONE ; TMS: DRIVER MODE: TMSMODE_[SCG|N8|MBC|MSX|RCV9958|RCKBD] +TMSMODE .EQU TMSMODE_MSX ; TMS: DRIVER MODE: TMSMODE_[SCG|N8|MBC|MSX|RCV9958|RCKBD] TMSTIMENABLE .EQU FALSE ; TMS: ENABLE TIMER INTERRUPTS (REQUIRES IM1) VGAENABLE .EQU FALSE ; VGA: ENABLE VGA VIDEO/KBD DRIVER (VGA.ASM) ; @@ -173,21 +217,34 @@ PPIDECNT .EQU 1 ; PPIDE: NUMBER OF PPI CHIPS TO DETECT (1-3), 2 DRIVES PER CHIP PPIDE0BASE .EQU $4C ; PPIDE 0: PPI REGISTERS BASE ADR PPIDE0A8BIT .EQU FALSE ; PPIDE 0A (MASTER): 8 BIT XFER PPIDE0B8BIT .EQU FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER +PPIDE1BASE .EQU $00 ; PPIDE 1: PPI REGISTERS BASE ADR +PPIDE1A8BIT .EQU FALSE ; PPIDE 1A (MASTER): 8 BIT XFER +PPIDE1B8BIT .EQU FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER +PPIDE2BASE .EQU $00 ; PPIDE 2: PPI REGISTERS BASE ADR +PPIDE2A8BIT .EQU FALSE ; PPIDE 2A (MASTER): 8 BIT XFER +PPIDE2B8BIT .EQU FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER ; SDENABLE .EQU FALSE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM) SDMODE .EQU SDMODE_PPI ; SD: DRIVER MODE: SDMODE_[JUHA|N8|CSIO|PPI|UART|DSD|MK4|SC|MT|USR] SDPPIBASE .EQU $60 ; SD: BASE I/O ADDRESS OF PPI FOR PPI MODDE -SDCNT .EQU 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD & SC ONLY +SDCNT .EQU 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD/SC/MT ONLY SDTRACE .EQU 1 ; SD: TRACE LEVEL (0=NO,1=ERRORS,2=ALL) SDCSIOFAST .EQU FALSE ; SD: ENABLE TABLE-DRIVEN BIT INVERTER IN CSIO MODE +SDMTSWAP .EQU FALSE ; SD: SWAP THE LOGICAL ORDER OF THE SPI PORTS OF THE MT011 ; PRPENABLE .EQU FALSE ; PRP: ENABLE ECB PROPELLER IO BOARD DRIVER (PRP.ASM) +PRPSDENABLE .EQU TRUE ; PRP: ENABLE PROPIO DRIVER SD CARD SUPPORT +PRPSDTRACE .EQU 1 ; PRP: SD CARD TRACE LEVEL (0=NO,1=ERRORS,2=ALL) +PRPCONENABLE .EQU TRUE ; PRP: ENABLE PROPIO DRIVER VIDEO/KBD SUPPORT ; PPPENABLE .EQU FALSE ; PPP: ENABLE ZETA PARALLEL PORT PROPELLER BOARD DRIVER (PPP.ASM) ; HDSKENABLE .EQU FALSE ; HDSK: ENABLE SIMH HDSK DISK DRIVER (HDSK.ASM) ; PIOENABLE .EQU FALSE ; PIO: ENABLE ZILOG PIO DRIVER (PIO.ASM) +PIOCNT .EQU 2 ; PIO: NUMBER OF CHIPS TO DETECT (1-2), 2 CHANNELS PER CHIP +PIO0BASE .EQU $B8 ; PIO 0: REGISTERS BASE ADR +PIO1BASE .EQU $BC ; PIO 1: REGISTERS BASE ADR ; LPTENABLE .EQU FALSE ; LPT: ENABLE CENTRONICS PRINTER DRIVER (LPT.ASM) ; diff --git a/Source/HBIOS/cfg_ezz80.asm b/Source/HBIOS/cfg_ezz80.asm deleted file mode 100644 index e725d028..00000000 --- a/Source/HBIOS/cfg_ezz80.asm +++ /dev/null @@ -1,260 +0,0 @@ -; -;================================================================================================== -; ROMWBW 2.X CONFIGURATION DEFAULTS FOR EASY Z80 -;================================================================================================== -; -; THIS FILE CONTAINS THE FULL SET OF DEFAULT CONFIGURATION SETTINGS FOR THE PLATFORM -; INDICATED ABOVE. THIS FILE SHOULD *NOT* NORMALLY BE CHANGED. INSTEAD, YOU SHOULD -; OVERRIDE ANY SETTINGS YOU WANT USING A CONFIGURATION FILE IN THE CONFIG DIRECTORY -; UNDER THIS DIRECTORY. -; -; THIS FILE CAN BE CONSIDERED A REFERENCE THAT LISTS ALL POSSIBLE CONFIGURATION SETTINGS -; FOR THE PLATFORM. -; -#DEFINE PLATFORM_NAME "Easy-Z80", " [", CONFIG, "]" -; -#INCLUDE "hbios.inc" -; -PLATFORM .EQU PLT_EZZ80 ; PLT_[SBC|ZETA|ZETA2|N8|MK4|UNA|RCZ80|RCZ180|EZZ80|SCZ180|DYNO|RCZ280|MBC|RPH] -CPUFAM .EQU CPU_Z80 ; CPU FAMILY: CPU_[Z80|Z180|Z280] -BIOS .EQU BIOS_WBW ; HARDWARE BIOS: BIOS_[WBW|UNA] -BATCOND .EQU FALSE ; ENABLE LOW BATTERY WARNING MESSAGE -HBIOS_MUTEX .EQU FALSE ; ENABLE REENTRANT CALLS TO HBIOS (ADDS OVERHEAD) -USELZSA2 .EQU TRUE ; ENABLE FONT COMPRESSION -TICKFREQ .EQU 50 ; DESIRED PERIODIC TIMER INTERRUPT FREQUENCY (HZ) -; -BOOT_TIMEOUT .EQU -1 ; AUTO BOOT TIMEOUT IN SECONDS, -1 TO DISABLE, 0 FOR IMMEDIATE -BOOT_DELAY .EQU 0 ; FIXED BOOT DELAY IN SECONDS PRIOR TO CONSOLE OUTPUT -; -CPUSPDCAP .EQU SPD_FIXED ; CPU SPEED CHANGE CAPABILITY SPD_FIXED|SPD_HILO -CPUSPDDEF .EQU SPD_HIGH ; CPU SPEED DEFAULT SPD_UNSUP|SPD_HIGH|SPD_LOW -CPUOSC .EQU 10000000 ; CPU OSC FREQ IN MHZ -INTMODE .EQU 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) -DEFSERCFG .EQU SER_115200_8N1 ; DEFAULT SERIAL LINE CONFIG (SEE STD.ASM) -; -RAMSIZE .EQU 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) -ROMSIZE .EQU 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) -ROMSIZE_CHK .EQU 0 ; ROMSIZE VALUE VERIFICATION (0=DISABLED) -MEMMGR .EQU MM_Z2 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH] -MPGSEL_0 .EQU $78 ; Z2 MEM MGR BANK 0 PAGE SELECT REG (WRITE ONLY) -MPGSEL_1 .EQU $79 ; Z2 MEM MGR BANK 1 PAGE SELECT REG (WRITE ONLY) -MPGSEL_2 .EQU $7A ; Z2 MEM MGR BANK 2 PAGE SELECT REG (WRITE ONLY) -MPGSEL_3 .EQU $7B ; Z2 MEM MGR BANK 3 PAGE SELECT REG (WRITE ONLY) -MPGENA .EQU $7C ; Z2 MEM MGR PAGING ENABLE REGISTER (BIT 0, WRITE ONLY) -; -RTCIO .EQU $C0 ; RTC LATCH REGISTER ADR -; -KIOENABLE .EQU FALSE ; ENABLE ZILOG KIO SUPPORT -KIOBASE .EQU $80 ; KIO BASE I/O ADDRESS -; -CTCENABLE .EQU TRUE ; ENABLE ZILOG CTC SUPPORT -CTCDEBUG .EQU FALSE ; ENABLE CTC DRIVER DEBUG OUTPUT -CTCBASE .EQU $88 ; CTC BASE I/O ADDRESS -CTCTIMER .EQU TRUE ; ENABLE CTC PERIODIC TIMER -CTCMODE .EQU CTCMODE_CTR ; CTC MODE: CTCMODE_[NONE|CTR|TIM16|TIM256] -CTCPRE .EQU 256 ; PRESCALE CONSTANT (1-256) -CTCPRECH .EQU 2 ; PRESCALE CHANNEL (0-3) -CTCTIMCH .EQU 3 ; TIMER CHANNEL (0-3) -CTCOSC .EQU 921600 ; CTC CLOCK FREQUENCY -; -EIPCENABLE .EQU FALSE ; EIPC: ENABLE Z80 EIPC (Z84C15) INITIALIZATION -; -SKZENABLE .EQU FALSE ; ENABLE SERGEY'S Z80-512K FEATURES -; -WDOGMODE .EQU WDOG_EZZ80 ; WATCHDOG MODE: WDOG_[NONE|EZZ80|SKZ] -WDOGIO .EQU $6F ; WATCHDOG REGISTER ADR -; -DIAGENABLE .EQU FALSE ; ENABLES OUTPUT TO 8 BIT LED DIAGNOSTIC PORT -DIAGPORT .EQU $00 ; DIAGNOSTIC PORT ADDRESS -DIAGDISKIO .EQU TRUE ; ENABLES DISK I/O ACTIVITY ON DIAGNOSTIC LEDS -DIAGLVL .EQU DL_CRITICAL ; ERROR LEVEL REPORTING -; -LEDENABLE .EQU FALSE ; ENABLES STATUS LED (SINGLE LED) -LEDMODE .EQU LEDMODE_STD ; LEDMODE_[STD|RTC] -LEDPORT .EQU $0E ; STATUS LED PORT ADDRESS -LEDDISKIO .EQU TRUE ; ENABLES DISK I/O ACTIVITY ON STATUS LED -; -DSKYENABLE .EQU FALSE ; ENABLES DSKY (DO NOT COMBINE WITH PPIDE) -; -BOOTCON .EQU 0 ; BOOT CONSOLE DEVICE -CRTACT .EQU FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP -VDAEMU .EQU EMUTYP_ANSI ; VDA EMULATION: EMUTYP_[TTY|ANSI] -VDAEMU_SERKBD .EQU $FF ; VDA EMULATION: SERIAL KBD UNIT #, OR $FF FOR HW KBD -ANSITRACE .EQU 1 ; ANSI DRIVER TRACE LEVEL (0=NO,1=ERRORS,2=ALL) -PPKTRACE .EQU 1 ; PPK DRIVER TRACE LEVEL (0=NO,1=ERRORS,2=ALL) -KBDTRACE .EQU 1 ; KBD DRIVER TRACE LEVEL (0=NO,1=ERRORS,2=ALL) -PPKKBLOUT .EQU KBD_US ; PPK KEYBOARD LANGUAGE: KBD_[US|DE] -KBDKBLOUT .EQU KBD_US ; KBD KEYBOARD LANGUAGE: KBD_[US|DE] -MKYENABLE .EQU FALSE ; MSX 5255 PPI KEYBOARD COMPATIBLE DRIVER (REQUIRES TMS VDA DRIVER) -MKYKBLOUT .EQU KBD_US ; KBD KEYBOARD LANGUAGE: KBD_[US|DE] -; -DSRTCENABLE .EQU TRUE ; DSRTC: ENABLE DS-1302 CLOCK DRIVER (DSRTC.ASM) -DSRTCMODE .EQU DSRTCMODE_STD ; DSRTC: OPERATING MODE: DSRTC_[STD|MFPIC] -DSRTCCHG .EQU FALSE ; DSRTC: FORCE BATTERY CHARGE ON (USE WITH CAUTION!!!) -; -DS1501RTCENABLE .EQU FALSE ; DS1501RTC: ENABLE DS-1501 CLOCK DRIVER (DS1501RTC.ASM) -DS1501RTC_BASE .EQU $50 ; DS1501RTC: I/O BASE ADDRESS -; -BQRTCENABLE .EQU FALSE ; BQRTC: ENABLE BQ4845 CLOCK DRIVER (BQRTC.ASM) -BQRTC_BASE .EQU $50 ; BQRTC: I/O BASE ADDRESS -; -INTRTCENABLE .EQU FALSE ; ENABLE PERIODIC INTERRUPT CLOCK DRIVER (INTRTC.ASM) -; -RP5RTCENABLE .EQU FALSE ; RP5C01 RTC BASED CLOCK (RP5RTC.ASM) -; -HTIMENABLE .EQU FALSE ; ENABLE SIMH TIMER SUPPORT -SIMRTCENABLE .EQU FALSE ; ENABLE SIMH CLOCK DRIVER (SIMRTC.ASM) -; -DS7RTCENABLE .EQU FALSE ; DS7RTC: ENABLE DS-1307 I2C CLOCK DRIVER (DS7RTC.ASM) -DS7RTCMODE .EQU DS7RTCMODE_PCF ; DS7RTC: OPERATING MODE: DS7RTC_[PCF] -; -DUARTENABLE .EQU FALSE ; DUART: ENABLE 2681/2692 SERIAL DRIVER (DUART.ASM) -DUARTCNT .EQU 2 ; DUART: NUMBER OF CHIPS TO DETECT (1-2) -DUART0BASE .EQU $A0 ; DUART 0: BASE ADDRESS OF CHIP -DUART0ACFG .EQU DEFSERCFG ; DUART 0A: SERIAL LINE CONFIG -DUART0BCFG .EQU DEFSERCFG ; DUART 0B: SERIAL LINE CONFIG -DUART1BASE .EQU $40 ; DUART 1: BASE ADDRESS OF CHIP -DUART1ACFG .EQU DEFSERCFG ; DUART 1A: SERIAL LINE CONFIG -DUART1BCFG .EQU DEFSERCFG ; DUART 1B: SERIAL LINE CONFIG -; -UARTENABLE .EQU TRUE ; UART: ENABLE 8250/16550-LIKE SERIAL DRIVER (UART.ASM) -UARTOSC .EQU 1843200 ; UART: OSC FREQUENCY IN MHZ -UARTINTS .EQU FALSE ; UART: INCLUDE INTERRUPT SUPPORT UNDER IM1/2/3 -UARTCFG .EQU DEFSERCFG | SER_RTS ; UART: LINE CONFIG FOR UART PORTS -UARTSBC .EQU FALSE ; UART: AUTO-DETECT SBC/ZETA ONBOARD UART -UARTSBCFORCE .EQU FALSE ; UART: FORCE DETECTION OF SBC UART (FOR SIMH) -UARTCAS .EQU FALSE ; UART: AUTO-DETECT ECB CASSETTE UART -UARTMFP .EQU FALSE ; UART: AUTO-DETECT MF/PIC UART -UART4 .EQU FALSE ; UART: AUTO-DETECT 4UART UART -UARTRC .EQU TRUE ; UART: AUTO-DETECT RC UART -UARTDUAL .EQU FALSE ; UART: AUTO-DETECT DUAL UART -; -ASCIENABLE .EQU FALSE ; ASCI: ENABLE Z180 ASCI SERIAL DRIVER (ASCI.ASM) -; -Z2UENABLE .EQU FALSE ; Z2U: ENABLE Z280 UART SERIAL DRIVER (Z2U.ASM) -; -ACIAENABLE .EQU FALSE ; ACIA: ENABLE MOTOROLA 6850 ACIA DRIVER (ACIA.ASM) -; -SIOENABLE .EQU TRUE ; SIO: ENABLE ZILOG SIO SERIAL DRIVER (SIO.ASM) -SIODEBUG .EQU FALSE ; SIO: ENABLE DEBUG OUTPUT -SIOBOOT .EQU 0 ; SIO: REBOOT ON RCV CHAR (0=DISABLED) -SIOCNT .EQU 2 ; SIO: NUMBER OF CHIPS TO DETECT (1-2), 2 CHANNELS PER CHIP -SIO0MODE .EQU SIOMODE_STD ; SIO 0: CHIP TYPE: SIOMODE_[STD|RC|SMB|ZP] -SIO0BASE .EQU $80 ; SIO 0: REGISTERS BASE ADR -SIO0ACLK .EQU 1843200 ; SIO 0A: OSC FREQ IN HZ, ZP=2457600/4915200, RC/SMB=7372800 -SIO0ACFG .EQU DEFSERCFG ; SIO 0A: SERIAL LINE CONFIG -SIO0ACTCC .EQU -1 ; SIO 0A: CTC CHANNEL 0=A, 1=B, 2=C, 3=D, -1 FOR NONE -SIO0BCLK .EQU 1843200 ; SIO 0B: OSC FREQ IN HZ, ZP=2457600/4915200, RC/SMB=7372800 -SIO0BCFG .EQU DEFSERCFG ; SIO 0B: SERIAL LINE CONFIG -SIO0BCTCC .EQU -1 ; SIO 0B: CTC CHANNEL 0=A, 1=B, 2=C, 3=D, -1 FOR NONE -SIO1MODE .EQU SIOMODE_RC ; SIO 1: CHIP TYPE: SIOMODE_[STD|RC|SMB|ZP] -SIO1BASE .EQU $84 ; SIO 1: REGISTERS BASE ADR -SIO1ACLK .EQU 7372800 ; SIO 1A: OSC FREQ IN HZ, ZP=2457600/4915200, RC/SMB=7372800 -SIO1ACFG .EQU DEFSERCFG ; SIO 1A: SERIAL LINE CONFIG -SIO1ACTCC .EQU -1 ; SIO 1A: CTC CHANNEL 0=A, 1=B, 2=C, 3=D, -1 FOR NONE -SIO1BCLK .EQU 7372800 ; SIO 1B: OSC FREQ IN HZ, ZP=2457600/4915200, RC/SMB=7372800 -SIO1BCFG .EQU DEFSERCFG ; SIO 1B: SERIAL LINE CONFIG -SIO1BCTCC .EQU -1 ; SIO 1B: CTC CHANNEL 0=A, 1=B, 2=C, 3=D, -1 FOR NONE -; -XIOCFG .EQU DEFSERCFG ; XIO: SERIAL LINE CONFIG -; -VDUENABLE .EQU FALSE ; VDU: ENABLE VDU VIDEO/KBD DRIVER (VDU.ASM) -CVDUENABLE .EQU FALSE ; CVDU: ENABLE CVDU VIDEO/KBD DRIVER (CVDU.ASM) -GDCENABLE .EQU FALSE ; GDC: ENABLE 7220 GDC VIDEO/KBD DRIVER (GDC.ASM) -TMSENABLE .EQU FALSE ; TMS: ENABLE TMS9918 VIDEO/KBD DRIVER (TMS.ASM) -TMSMODE .EQU TMSMODE_NONE ; TMS: DRIVER MODE: TMSMODE_[SCG|N8|MBC|MSX|RCV9958|RCKBD] -TMSTIMENABLE .EQU FALSE ; TMS: ENABLE TIMER INTERRUPTS (REQUIRES IM1) -VGAENABLE .EQU FALSE ; VGA: ENABLE VGA VIDEO/KBD DRIVER (VGA.ASM) -; -MDENABLE .EQU TRUE ; MD: ENABLE MEMORY (ROM/RAM) DISK DRIVER (MD.ASM) -MDROM .EQU TRUE ; MD: ENABLE ROM DISK -MDRAM .EQU TRUE ; MD: ENABLE RAM DISK -MDTRACE .EQU 1 ; MD: TRACE LEVEL (0=NO,1=ERRORS,2=ALL) -MDFFENABLE .EQU FALSE ; MD: ENABLE FLASH FILE SYSTEM -; -FDENABLE .EQU FALSE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM) -FDMODE .EQU FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPFDC|MBC] -FDCNT .EQU 2 ; FD: NUMBER OF FLOPPY DRIVES ON THE INTERFACE (1-2) -FDTRACE .EQU 1 ; FD: TRACE LEVEL (0=NO,1=FATAL,2=ERRORS,3=ALL) -FDMEDIA .EQU FDM144 ; FD: DEFAULT MEDIA FORMAT FDM[720|144|360|120|111] -FDMEDIAALT .EQU FDM720 ; FD: ALTERNATE MEDIA FORMAT FDM[720|144|360|120|111] -FDMAUTO .EQU TRUE ; FD: AUTO SELECT DEFAULT/ALTERNATE MEDIA FORMATS -; -RFENABLE .EQU FALSE ; RF: ENABLE RAM FLOPPY DRIVER -; -IDEENABLE .EQU FALSE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM) -IDETRACE .EQU 1 ; IDE: TRACE LEVEL (0=NO,1=ERRORS,2=ALL) -IDECNT .EQU 1 ; IDE: NUMBER OF IDE INTERFACES TO DETECT (1-3), 2 DRIVES EACH -IDE0MODE .EQU IDEMODE_RC ; IDE 0: DRIVER MODE: IDEMODE_[DIO|DIDE|MK4|RC] -IDE0BASE .EQU $10 ; IDE 0: IO BASE ADDRESS -IDE0DATLO .EQU $00 ; IDE 0: DATA LO PORT FOR 16-BIT I/O -IDE0DATHI .EQU $00 ; IDE 0: DATA HI PORT FOR 16-BIT I/O -IDE0A8BIT .EQU TRUE ; IDE 0A (MASTER): 8 BIT XFER -IDE0B8BIT .EQU TRUE ; IDE 0B (MASTER): 8 BIT XFER -IDE1MODE .EQU IDEMODE_NONE ; IDE 1: DRIVER MODE: IDEMODE_[DIO|DIDE|MK4|RC] -IDE1BASE .EQU $00 ; IDE 1: IO BASE ADDRESS -IDE1DATLO .EQU $00 ; IDE 1: DATA LO PORT FOR 16-BIT I/O -IDE1DATHI .EQU $00 ; IDE 1: DATA HI PORT FOR 16-BIT I/O -IDE1A8BIT .EQU TRUE ; IDE 1A (MASTER): 8 BIT XFER -IDE1B8BIT .EQU TRUE ; IDE 1B (MASTER): 8 BIT XFER -IDE2MODE .EQU IDEMODE_NONE ; IDE 2: DRIVER MODE: IDEMODE_[DIO|DIDE|MK4|RC] -IDE2BASE .EQU $00 ; IDE 2: IO BASE ADDRESS -IDE2DATLO .EQU $00 ; IDE 2: DATA LO PORT FOR 16-BIT I/O -IDE2DATHI .EQU $00 ; IDE 2: DATA HI PORT FOR 16-BIT I/O -IDE2A8BIT .EQU TRUE ; IDE 2A (MASTER): 8 BIT XFER -IDE2B8BIT .EQU TRUE ; IDE 2B (MASTER): 8 BIT XFER -; -PPIDEENABLE .EQU FALSE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM) -PPIDETRACE .EQU 1 ; PPIDE: TRACE LEVEL (0=NO,1=ERRORS,2=ALL) -PPIDECNT .EQU 1 ; PPIDE: NUMBER OF PPI CHIPS TO DETECT (1-3), 2 DRIVES PER CHIP -PPIDE0BASE .EQU $20 ; PPIDE 0: PPI REGISTERS BASE ADR -PPIDE0A8BIT .EQU FALSE ; PPIDE 0A (MASTER): 8 BIT XFER -PPIDE0B8BIT .EQU FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER -; -SDENABLE .EQU FALSE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM) -SDMODE .EQU SDMODE_PPI ; SD: DRIVER MODE: SDMODE_[JUHA|N8|CSIO|PPI|UART|DSD|MK4|SC|MT|USR] -SDPPIBASE .EQU $60 ; SD: BASE I/O ADDRESS OF PPI FOR PPI MODDE -SDCNT .EQU 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD & SC ONLY -SDTRACE .EQU 1 ; SD: TRACE LEVEL (0=NO,1=ERRORS,2=ALL) -SDCSIOFAST .EQU FALSE ; SD: ENABLE TABLE-DRIVEN BIT INVERTER IN CSIO MODE -SDMTSWAP .EQU FALSE ; SD: SWAP THE LOGICAL ORDER OF THE SPI PORTS OF THE MT011 -; -PRPENABLE .EQU FALSE ; PRP: ENABLE ECB PROPELLER IO BOARD DRIVER (PRP.ASM) -PRPSDENABLE .EQU TRUE ; PRP: ENABLE PROPIO DRIVER SD CARD SUPPORT -PRPSDTRACE .EQU 1 ; PRP: SD CARD TRACE LEVEL (0=NO,1=ERRORS,2=ALL) -PRPCONENABLE .EQU TRUE ; PRP: ENABLE PROPIO DRIVER VIDEO/KBD SUPPORT -; -PPPENABLE .EQU FALSE ; PPP: ENABLE ZETA PARALLEL PORT PROPELLER BOARD DRIVER (PPP.ASM) -; -HDSKENABLE .EQU FALSE ; HDSK: ENABLE SIMH HDSK DISK DRIVER (HDSK.ASM) -; -PIOENABLE .EQU FALSE ; PIO: ENABLE ZILOG PIO DRIVER (PIO.ASM) -; -LPTENABLE .EQU FALSE ; LPT: ENABLE CENTRONICS PRINTER DRIVER (LPT.ASM) -LPTCNT .EQU 1 ; LPT: NUMBER OF CHIPS TO DETECT (1-2) -LPT0BASE .EQU $E4 ; LPT 0: REGISTERS BASE ADR -LPT1BASE .EQU $E8 ; LPT 1: REGISTERS BASE ADR -; -PIO_4P .EQU FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB 4P BOARD -PIO_ZP .EQU FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB ZILOG PERIPHERALS BOARD (PIO.ASM) -PIO_SBC .EQU FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR 8255 CHIP -; -UFENABLE .EQU FALSE ; UF: ENABLE ECB USB FIFO DRIVER (UF.ASM) -; -SN76489ENABLE .EQU FALSE ; SN: ENABLE SN76489 SOUND DRIVER -AUDIOTRACE .EQU FALSE ; ENABLE TRACING TO CONSOLE OF SOUND DRIVER -SN7CLK .EQU 3579545 ; SN: PSG CLOCK FREQ, ASSUME MSX STD -SNMODE .EQU SNMODE_RC ; SN: DRIVER MODE: SNMODE_[NONE|RC|VGM] -; -AY38910ENABLE .EQU FALSE ; AY: ENABLE AY-3-8910 / YM2149 SOUND DRIVER -AY_CLK .EQU 1789772 ; AY: PSG CLOCK FREQ, ASSUME MSX STD -AYMODE .EQU AYMODE_RCZ80 ; AY: DRIVER MODE: AYMODE_[SCG|N8|RCZ80|RCZ180|MSX|LINC|MBC] -; -SPKENABLE .EQU FALSE ; SPK: ENABLE RTC LATCH IOBIT SOUND DRIVER (SPK.ASM) -; -DMAENABLE .EQU FALSE ; DMA: ENABLE DMA DRIVER (DMA.ASM) -DMABASE .EQU $E0 ; DMA: DMA BASE ADDRESS -DMAMODE .EQU DMAMODE_NONE ; DMA: DMA MODE (NONE|ECB|Z180|Z280|RC|MBC) -; -YM2612ENABLE .EQU FALSE ; YM2612: ENABLE YM2612 DRIVER (MUTE STUB) -VGMBASE .EQU $C0 ; YM2612: BASE ADDRESS FOR VGM BOARD (YM2612/SN76469s/CTC) diff --git a/Source/HBIOS/cfg_master.asm b/Source/HBIOS/cfg_master.asm index 16e25df5..62bbfdb0 100644 --- a/Source/HBIOS/cfg_master.asm +++ b/Source/HBIOS/cfg_master.asm @@ -143,7 +143,7 @@ DS7RTCENABLE .EQU FALSE ; DS7RTC: ENABLE DS-1307 I2C CLOCK DRIVER (DS7RTC.ASM) DS7RTCMODE .EQU DS7RTCMODE_PCF ; DS7RTC: OPERATING MODE: DS7RTC_[PCF] ; DUARTENABLE .EQU FALSE ; DUART: ENABLE 2681/2692 SERIAL DRIVER (DUART.ASM) -DUARTCNT .EQU 2 ; DUART: NUMBER OF CHIPS TO DETECT (1-2) +DUARTCNT .EQU 1 ; DUART: NUMBER OF CHIPS TO DETECT (1-2) DUART0BASE .EQU $A0 ; DUART 0: BASE ADDRESS OF CHIP DUART0ACFG .EQU DEFSERCFG ; DUART 0A: SERIAL LINE CONFIG DUART0BCFG .EQU DEFSERCFG ; DUART 0B: SERIAL LINE CONFIG @@ -282,7 +282,7 @@ PPIDE2B8BIT .EQU FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER SDENABLE .EQU FALSE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM) SDMODE .EQU SDMODE_NONE ; SD: DRIVER MODE: SDMODE_[JUHA|N8|CSIO|PPI|UART|DSD|MK4|SC|MT|USR] SDPPIBASE .EQU $60 ; SD: BASE I/O ADDRESS OF PPI FOR PPI MODDE -SDCNT .EQU 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD & SC ONLY +SDCNT .EQU 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD/SC/MT ONLY SDTRACE .EQU 1 ; SD: TRACE LEVEL (0=NO,1=ERRORS,2=ALL) SDCSIOFAST .EQU FALSE ; SD: ENABLE TABLE-DRIVEN BIT INVERTER IN CSIO MODE SDMTSWAP .EQU FALSE ; SD: SWAP THE LOGICAL ORDER OF THE SPI PORTS OF THE MT011 diff --git a/Source/HBIOS/cfg_mbc.asm b/Source/HBIOS/cfg_mbc.asm index ac19b215..5383272b 100644 --- a/Source/HBIOS/cfg_mbc.asm +++ b/Source/HBIOS/cfg_mbc.asm @@ -211,7 +211,7 @@ PPIDE2B8BIT .EQU FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER SDENABLE .EQU FALSE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM) SDMODE .EQU SDMODE_JUHA ; SD: DRIVER MODE: SDMODE_[JUHA|N8|CSIO|PPI|UART|DSD|MK4|SC|MT|USR] SDPPIBASE .EQU $60 ; SD: BASE I/O ADDRESS OF PPI FOR PPI MODDE -SDCNT .EQU 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD & SC ONLY +SDCNT .EQU 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD/SC/MT ONLY SDTRACE .EQU 1 ; SD: TRACE LEVEL (0=NO,1=ERRORS,2=ALL) SDCSIOFAST .EQU FALSE ; SD: ENABLE TABLE-DRIVEN BIT INVERTER IN CSIO MODE ; diff --git a/Source/HBIOS/cfg_mk4.asm b/Source/HBIOS/cfg_mk4.asm index 29d5493b..b2692239 100644 --- a/Source/HBIOS/cfg_mk4.asm +++ b/Source/HBIOS/cfg_mk4.asm @@ -210,7 +210,7 @@ PPIDE2B8BIT .EQU FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER SDENABLE .EQU TRUE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM) SDMODE .EQU SDMODE_MK4 ; SD: DRIVER MODE: SDMODE_[JUHA|N8|CSIO|PPI|UART|DSD|MK4|SC|MT|USR] SDPPIBASE .EQU $60 ; SD: BASE I/O ADDRESS OF PPI FOR PPI MODDE -SDCNT .EQU 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD & SC ONLY +SDCNT .EQU 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD/SC/MT ONLY SDTRACE .EQU 1 ; SD: TRACE LEVEL (0=NO,1=ERRORS,2=ALL) SDCSIOFAST .EQU TRUE ; SD: ENABLE TABLE-DRIVEN BIT INVERTER IN CSIO MODE ; diff --git a/Source/HBIOS/cfg_n8.asm b/Source/HBIOS/cfg_n8.asm index bdd5f0d0..f8b34a4c 100644 --- a/Source/HBIOS/cfg_n8.asm +++ b/Source/HBIOS/cfg_n8.asm @@ -212,7 +212,7 @@ PPIDE2B8BIT .EQU FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER SDENABLE .EQU TRUE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM) SDMODE .EQU SDMODE_CSIO ; SD: DRIVER MODE: SDMODE_[JUHA|N8|CSIO|PPI|UART|DSD|MK4|SC|MT] SDPPIBASE .EQU N8_PPI0 ; SD: BASE I/O ADDRESS OF PPI FOR PPI MODDE -SDCNT .EQU 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD & SC ONLY +SDCNT .EQU 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD/SC/MT ONLY SDTRACE .EQU 1 ; SD: TRACE LEVEL (0=NO,1=ERRORS,2=ALL) SDCSIOFAST .EQU FALSE ; SD: ENABLE TABLE-DRIVEN BIT INVERTER IN CSIO MODE ; diff --git a/Source/HBIOS/cfg_rcz180.asm b/Source/HBIOS/cfg_rcz180.asm index 520e47c2..a19a3616 100644 --- a/Source/HBIOS/cfg_rcz180.asm +++ b/Source/HBIOS/cfg_rcz180.asm @@ -111,7 +111,7 @@ DS7RTCENABLE .EQU FALSE ; DS7RTC: ENABLE DS-1307 I2C CLOCK DRIVER (DS7RTC.ASM) DS7RTCMODE .EQU DS7RTCMODE_PCF ; DS7RTC: OPERATING MODE: DS7RTC_[PCF] ; DUARTENABLE .EQU FALSE ; DUART: ENABLE 2681/2692 SERIAL DRIVER (DUART.ASM) -DUARTCNT .EQU 2 ; DUART: NUMBER OF CHIPS TO DETECT (1-2) +DUARTCNT .EQU 1 ; DUART: NUMBER OF CHIPS TO DETECT (1-2) DUART0BASE .EQU $A0 ; DUART 0: BASE ADDRESS OF CHIP DUART0ACFG .EQU DEFSERCFG ; DUART 0A: SERIAL LINE CONFIG DUART0BCFG .EQU DEFSERCFG ; DUART 0B: SERIAL LINE CONFIG @@ -227,7 +227,7 @@ PPIDE2B8BIT .EQU FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER SDENABLE .EQU FALSE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM) SDMODE .EQU SDMODE_MT ; SD: DRIVER MODE: SDMODE_[JUHA|N8|CSIO|PPI|UART|DSD|MK4|SC|MT|USR] SDPPIBASE .EQU $60 ; SD: BASE I/O ADDRESS OF PPI FOR PPI MODDE -SDCNT .EQU 2 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD & SC ONLY +SDCNT .EQU 2 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD/SC/MT ONLY SDTRACE .EQU 1 ; SD: TRACE LEVEL (0=NO,1=ERRORS,2=ALL) SDCSIOFAST .EQU FALSE ; SD: ENABLE TABLE-DRIVEN BIT INVERTER IN CSIO MODE SDMTSWAP .EQU FALSE ; SD: SWAP THE LOGICAL ORDER OF THE SPI PORTS OF THE MT011 diff --git a/Source/HBIOS/cfg_rcz280.asm b/Source/HBIOS/cfg_rcz280.asm index 05a8ce34..98caf927 100644 --- a/Source/HBIOS/cfg_rcz280.asm +++ b/Source/HBIOS/cfg_rcz280.asm @@ -59,11 +59,6 @@ CTCENABLE .EQU FALSE ; ENABLE ZILOG CTC SUPPORT CTCDEBUG .EQU FALSE ; ENABLE CTC DRIVER DEBUG OUTPUT CTCBASE .EQU $88 ; CTC BASE I/O ADDRESS CTCTIMER .EQU FALSE ; ENABLE CTC PERIODIC TIMER -CTCMODE .EQU CTCMODE_TIM16 ; CTC MODE: CTCMODE_[NONE|CTR|TIM16|TIM256] -CTCPRE .EQU 256 ; PRESCALE CONSTANT (1-256) -CTCPRECH .EQU 2 ; PRESCALE CHANNEL (0-3) -CTCTIMCH .EQU 3 ; TIMER CHANNEL (0-3) -CTCOSC .EQU 7372800 ; CTC CLOCK FREQUENCY ; EIPCENABLE .EQU FALSE ; EIPC: ENABLE Z80 EIPC (Z84C15) INITIALIZATION ; @@ -116,7 +111,7 @@ DS7RTCENABLE .EQU FALSE ; DS7RTC: ENABLE DS-1307 I2C CLOCK DRIVER (DS7RTC.ASM) DS7RTCMODE .EQU DS7RTCMODE_PCF ; DS7RTC: OPERATING MODE: DS7RTC_[PCF] ; DUARTENABLE .EQU FALSE ; DUART: ENABLE 2681/2692 SERIAL DRIVER (DUART.ASM) -DUARTCNT .EQU 2 ; DUART: NUMBER OF CHIPS TO DETECT (1-2) +DUARTCNT .EQU 1 ; DUART: NUMBER OF CHIPS TO DETECT (1-2) DUART0BASE .EQU $A0 ; DUART 0: BASE ADDRESS OF CHIP DUART0ACFG .EQU DEFSERCFG ; DUART 0A: SERIAL LINE CONFIG DUART0BCFG .EQU DEFSERCFG ; DUART 0B: SERIAL LINE CONFIG @@ -242,7 +237,7 @@ PPIDE2B8BIT .EQU FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER SDENABLE .EQU FALSE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM) SDMODE .EQU SDMODE_MT ; SD: DRIVER MODE: SDMODE_[JUHA|N8|CSIO|PPI|UART|DSD|MK4|SC|MT|USR] SDPPIBASE .EQU $60 ; SD: BASE I/O ADDRESS OF PPI FOR PPI MODDE -SDCNT .EQU 2 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD & SC ONLY +SDCNT .EQU 2 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD/SC/MT ONLY SDTRACE .EQU 1 ; SD: TRACE LEVEL (0=NO,1=ERRORS,2=ALL) SDCSIOFAST .EQU FALSE ; SD: ENABLE TABLE-DRIVEN BIT INVERTER IN CSIO MODE SDMTSWAP .EQU FALSE ; SD: SWAP THE LOGICAL ORDER OF THE SPI PORTS OF THE MT011 diff --git a/Source/HBIOS/cfg_rcz80.asm b/Source/HBIOS/cfg_rcz80.asm index bc61bedb..a322ff3e 100644 --- a/Source/HBIOS/cfg_rcz80.asm +++ b/Source/HBIOS/cfg_rcz80.asm @@ -110,7 +110,7 @@ DS7RTCENABLE .EQU FALSE ; DS7RTC: ENABLE DS-1307 I2C CLOCK DRIVER (DS7RTC.ASM) DS7RTCMODE .EQU DS7RTCMODE_PCF ; DS7RTC: OPERATING MODE: DS7RTC_[PCF] ; DUARTENABLE .EQU FALSE ; DUART: ENABLE 2681/2692 SERIAL DRIVER (DUART.ASM) -DUARTCNT .EQU 2 ; DUART: NUMBER OF CHIPS TO DETECT (1-2) +DUARTCNT .EQU 1 ; DUART: NUMBER OF CHIPS TO DETECT (1-2) DUART0BASE .EQU $A0 ; DUART 0: BASE ADDRESS OF CHIP DUART0ACFG .EQU DEFSERCFG ; DUART 0A: SERIAL LINE CONFIG DUART0BCFG .EQU DEFSERCFG ; DUART 0B: SERIAL LINE CONFIG @@ -173,7 +173,7 @@ VDUENABLE .EQU FALSE ; VDU: ENABLE VDU VIDEO/KBD DRIVER (VDU.ASM) CVDUENABLE .EQU FALSE ; CVDU: ENABLE CVDU VIDEO/KBD DRIVER (CVDU.ASM) GDCENABLE .EQU FALSE ; GDC: ENABLE 7220 GDC VIDEO/KBD DRIVER (GDC.ASM) TMSENABLE .EQU FALSE ; TMS: ENABLE TMS9918 VIDEO/KBD DRIVER (TMS.ASM) -TMSMODE .EQU TMSMODE_NONE ; TMS: DRIVER MODE: TMSMODE_[SCG|N8|MBC|MSX|RCV9958|RCKBD] +TMSMODE .EQU TMSMODE_MSX ; TMS: DRIVER MODE: TMSMODE_[SCG|N8|MBC|MSX|RCV9958|RCKBD] TMSTIMENABLE .EQU FALSE ; TMS: ENABLE TIMER INTERRUPTS (REQUIRES IM1) VGAENABLE .EQU FALSE ; VGA: ENABLE VGA VIDEO/KBD DRIVER (VGA.ASM) ; @@ -231,7 +231,7 @@ PPIDE2B8BIT .EQU FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER SDENABLE .EQU FALSE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM) SDMODE .EQU SDMODE_MT ; SD: DRIVER MODE: SDMODE_[JUHA|N8|CSIO|PPI|UART|DSD|MK4|SC|MT|USR] SDPPIBASE .EQU $60 ; SD: BASE I/O ADDRESS OF PPI FOR PPI MODDE -SDCNT .EQU 2 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD & SC ONLY +SDCNT .EQU 2 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD/SC/MT ONLY SDTRACE .EQU 1 ; SD: TRACE LEVEL (0=NO,1=ERRORS,2=ALL) SDCSIOFAST .EQU FALSE ; SD: ENABLE TABLE-DRIVEN BIT INVERTER IN CSIO MODE SDMTSWAP .EQU FALSE ; SD: SWAP THE LOGICAL ORDER OF THE SPI PORTS OF THE MT011 @@ -251,9 +251,6 @@ PIO0BASE .EQU $B8 ; PIO 0: REGISTERS BASE ADR PIO1BASE .EQU $BC ; PIO 1: REGISTERS BASE ADR ; LPTENABLE .EQU FALSE ; LPT: ENABLE CENTRONICS PRINTER DRIVER (LPT.ASM) -LPTCNT .EQU 1 ; LPT: NUMBER OF CHIPS TO DETECT (1-2) -LPT0BASE .EQU $E4 ; LPT 0: REGISTERS BASE ADR -LPT1BASE .EQU $E8 ; LPT 1: REGISTERS BASE ADR ; PIO_4P .EQU FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB 4P BOARD PIO_ZP .EQU FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB ZILOG PERIPHERALS BOARD (PIO.ASM) diff --git a/Source/HBIOS/cfg_rph.asm b/Source/HBIOS/cfg_rph.asm index 65dbd5b8..a2781b4c 100644 --- a/Source/HBIOS/cfg_rph.asm +++ b/Source/HBIOS/cfg_rph.asm @@ -212,7 +212,7 @@ PPIDE2B8BIT .EQU FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER SDENABLE .EQU FALSE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM) SDMODE .EQU SDMODE_CSIO ; SD: DRIVER MODE: SDMODE_[JUHA|N8|CSIO|PPI|UART|DSD|MK4|SC|MT|USR] SDPPIBASE .EQU RPH_PPI0 ; SD: BASE I/O ADDRESS OF PPI FOR PPI MODDE -SDCNT .EQU 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD & SC ONLY +SDCNT .EQU 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD/SC/MT ONLY SDTRACE .EQU 1 ; SD: TRACE LEVEL (0=NO,1=ERRORS,2=ALL) SDCSIOFAST .EQU FALSE ; SD: ENABLE TABLE-DRIVEN BIT INVERTER IN CSIO MODE ; diff --git a/Source/HBIOS/cfg_sbc.asm b/Source/HBIOS/cfg_sbc.asm index 37d80781..3e59350d 100644 --- a/Source/HBIOS/cfg_sbc.asm +++ b/Source/HBIOS/cfg_sbc.asm @@ -211,7 +211,7 @@ PPIDE2B8BIT .EQU FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER SDENABLE .EQU FALSE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM) SDMODE .EQU SDMODE_JUHA ; SD: DRIVER MODE: SDMODE_[JUHA|N8|CSIO|PPI|UART|DSD|MK4|SC|MT|USR] SDPPIBASE .EQU $60 ; SD: BASE I/O ADDRESS OF PPI FOR PPI MODDE -SDCNT .EQU 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD & SC ONLY +SDCNT .EQU 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD/SC/MT ONLY SDTRACE .EQU 1 ; SD: TRACE LEVEL (0=NO,1=ERRORS,2=ALL) SDCSIOFAST .EQU FALSE ; SD: ENABLE TABLE-DRIVEN BIT INVERTER IN CSIO MODE ; diff --git a/Source/HBIOS/cfg_scz180.asm b/Source/HBIOS/cfg_scz180.asm index cacb5e7a..623f21f4 100644 --- a/Source/HBIOS/cfg_scz180.asm +++ b/Source/HBIOS/cfg_scz180.asm @@ -106,7 +106,7 @@ DS7RTCENABLE .EQU FALSE ; DS7RTC: ENABLE DS-1307 I2C CLOCK DRIVER (DS7RTC.ASM) DS7RTCMODE .EQU DS7RTCMODE_PCF ; DS7RTC: OPERATING MODE: DS7RTC_[PCF] ; DUARTENABLE .EQU FALSE ; DUART: ENABLE 2681/2692 SERIAL DRIVER (DUART.ASM) -DUARTCNT .EQU 2 ; DUART: NUMBER OF CHIPS TO DETECT (1-2) +DUARTCNT .EQU 1 ; DUART: NUMBER OF CHIPS TO DETECT (1-2) DUART0BASE .EQU $A0 ; DUART 0: BASE ADDRESS OF CHIP DUART0ACFG .EQU DEFSERCFG ; DUART 0A: SERIAL LINE CONFIG DUART0BCFG .EQU DEFSERCFG ; DUART 0B: SERIAL LINE CONFIG @@ -222,7 +222,7 @@ PPIDE2B8BIT .EQU FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER SDENABLE .EQU TRUE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM) SDMODE .EQU SDMODE_SC ; SD: DRIVER MODE: SDMODE_[JUHA|N8|CSIO|PPI|UART|DSD|MK4|SC|MT|USR] SDPPIBASE .EQU $60 ; SD: BASE I/O ADDRESS OF PPI FOR PPI MODDE -SDCNT .EQU 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD & SC ONLY +SDCNT .EQU 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD/SC/MT ONLY SDTRACE .EQU 1 ; SD: TRACE LEVEL (0=NO,1=ERRORS,2=ALL) SDCSIOFAST .EQU FALSE ; SD: ENABLE TABLE-DRIVEN BIT INVERTER IN CSIO MODE SDMTSWAP .EQU FALSE ; SD: SWAP THE LOGICAL ORDER OF THE SPI PORTS OF THE MT011 diff --git a/Source/HBIOS/cfg_zeta.asm b/Source/HBIOS/cfg_zeta.asm index ba9642a7..edacda47 100644 --- a/Source/HBIOS/cfg_zeta.asm +++ b/Source/HBIOS/cfg_zeta.asm @@ -155,7 +155,7 @@ PPIDE0B8BIT .EQU FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER SDENABLE .EQU FALSE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM) SDMODE .EQU SDMODE_PPI ; SD: DRIVER MODE: SDMODE_[JUHA|N8|CSIO|PPI|UART|DSD|MK4|SC|MT|USR] SDPPIBASE .EQU $60 ; SD: BASE I/O ADDRESS OF PPI FOR PPI MODDE -SDCNT .EQU 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD & SC ONLY +SDCNT .EQU 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD/SC/MT ONLY SDTRACE .EQU 1 ; SD: TRACE LEVEL (0=NO,1=ERRORS,2=ALL) SDCSIOFAST .EQU FALSE ; SD: ENABLE TABLE-DRIVEN BIT INVERTER IN CSIO MODE ; diff --git a/Source/HBIOS/cfg_zeta2.asm b/Source/HBIOS/cfg_zeta2.asm index d5357338..8dfb3bd4 100644 --- a/Source/HBIOS/cfg_zeta2.asm +++ b/Source/HBIOS/cfg_zeta2.asm @@ -166,7 +166,7 @@ PPIDE0B8BIT .EQU FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER SDENABLE .EQU FALSE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM) SDMODE .EQU SDMODE_PPI ; SD: DRIVER MODE: SDMODE_[JUHA|N8|CSIO|PPI|UART|DSD|MK4|SC|MT|USR] SDPPIBASE .EQU $60 ; SD: BASE I/O ADDRESS OF PPI FOR PPI MODDE -SDCNT .EQU 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD & SC ONLY +SDCNT .EQU 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD/SC/MT ONLY SDTRACE .EQU 1 ; SD: TRACE LEVEL (0=NO,1=ERRORS,2=ALL) SDCSIOFAST .EQU FALSE ; SD: ENABLE TABLE-DRIVEN BIT INVERTER IN CSIO MODE ; diff --git a/Source/HBIOS/hbios.asm b/Source/HBIOS/hbios.asm index 1969d3a2..03116f61 100644 --- a/Source/HBIOS/hbios.asm +++ b/Source/HBIOS/hbios.asm @@ -4829,7 +4829,7 @@ SYS_INTGET: ; ; SET AN INTERRUPT VECTOR FOR A SPECIFIED POSITION IN THE INT VECTOR LIST / TABLE ; ENTRY: E=LIST/TABLE POSITION, HL=NEW INTERRUPT VECTOR -; RETURN: HL=PREVIOUS INTERRUPT VECTOR, DE=ADR OF INT ROUTING ENGINE FOR IM2 +; RETURN: HL=PREVIOUS INTERRUPT VECTOR ; SYS_INTSET: PUSH HL ; SAVE NEW VECTOR diff --git a/Source/HBIOS/sd.asm b/Source/HBIOS/sd.asm index 63c44e6e..ec379a88 100644 --- a/Source/HBIOS/sd.asm +++ b/Source/HBIOS/sd.asm @@ -1798,7 +1798,7 @@ SD_SELECT: ; CALL SD_WAITTX ;#ENDIF ; -#IF (SDMODE == SDMODE_SC) +#IF ((SDMODE == SDMODE_SC) | SDMODE == SDMODE_MT)) LD A,(IY+SD_DEV) ; GET CURRENT DEVICE OR A ; SET FLAGS LD A,(SD_OPRVAL) ; GET CURRENT OPRVAL BACK @@ -1857,7 +1857,7 @@ SD_DESELECT: #ENDIF ; LD A,(SD_OPRVAL) -#IF ((SDMODE == SDMODE_SC) & (SD_DEVCNT > 1)) +#IF (((SDMODE == SDMODE_SC) | (SDMODE_MT)) & (SD_DEVCNT > 1)) AND ~(SD_CS0 | SD_CS1) #ELSE AND ~SD_CS0 diff --git a/Source/Makefile b/Source/Makefile index b012323f..74e1fa94 100644 --- a/Source/Makefile +++ b/Source/Makefile @@ -15,7 +15,7 @@ SUBDIRS += RomDsk SUBDIRS += HBIOS SUBDIRS += Images SUBDIRS += ZRC -SUBDIRS += ZZR +SUBDIRS += ZZRC #SUBDIRS += Doc TOOLS = ../Tools include $(TOOLS)/Makefile.inc diff --git a/Source/ZZR/Build.cmd b/Source/ZZR/Build.cmd deleted file mode 100644 index fea6f6bd..00000000 --- a/Source/ZZR/Build.cmd +++ /dev/null @@ -1,42 +0,0 @@ -@echo off -setlocal - -set ROMFILE=..\..\Binary\RCZ280_nat_zzr.rom -set ROMSIZE=262144 - -if not exist %ROMFILE% goto :eof - -:: -:: The ROM image *must* be exactly 256K or the resulting disk -:: image produced below will be invalid. Check for the proper size. -:: - -call :filesize %ROMFILE% - -if "%FILESIZE%" neq "%ROMSIZE%" ( - echo. - echo. - echo ERROR: "%ROMFILE%" is not exactly %ROMSIZE% bytes as required!!! - echo You must specify a ROMSIZE of "256" when building the ZZRCC ROM image. - echo. - echo. - exit /b 1 -) - -rem ..\..\Tools\srecord\srec_cat.exe ..\..\Binary\RCZ280_nat_zzr.rom -Binary -Exclude 0x5000 0x7000 zzr_romldr.hex -Intel -Output ..\..\Binary\RCZ280_nat_zzr.hex -Intel || exit /b - -..\..\Tools\srecord\srec_cat.exe ..\..\Binary\RCZ280_nat_zzr.rom -Binary -Output ..\..\Binary\RCZ280_nat_zzr.hex -Intel || exit /b - -rem ..\..\Tools\srecord\srec_cat.exe ..\..\Binary\RCZ280_nat_zzr.hex -Intel -Output ..\..\Binary\RCZ280_nat_zzr_ldr.rom -Binary || exit /b - -rem copy /b zzr_cfldr.bin + zzr_ptbl.bin + zzr_fill_1.bin + zzr_mon.bin + zzr_fill_2.bin + ..\..\Binary\RCZ280_nat_zzr_ldr.rom + zzr_fill_3.bin ..\..\Binary\hd1k_zzr_prefix.dat || exit /b - -copy /b zzr_cfldr.bin + zzr_ptbl.bin + zzr_fill_1.bin + zzr_mon.bin + zzr_fill_2.bin + ..\..\Binary\RCZ280_nat_zzr.rom + zzr_fill_3.bin ..\..\Binary\hd1k_zzr_prefix.dat || exit /b - -copy /b ..\..\Binary\hd1k_zzr_prefix.dat + ..\..\Binary\hd1k_cpm22.img + ..\..\Binary\hd1k_zsdos.img + ..\..\Binary\hd1k_nzcom.img + ..\..\Binary\hd1k_cpm3.img + ..\..\Binary\hd1k_zpm3.img + ..\..\Binary\hd1k_ws4.img ..\..\Binary\hd1k_zzr_combo.img || exit /b - -goto :eof - -:filesize -set FILESIZE=%~z1 -goto :eof \ No newline at end of file diff --git a/Source/ZZR/Makefile b/Source/ZZR/Makefile deleted file mode 100644 index 7e369338..00000000 --- a/Source/ZZR/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -HD1KZZRPREFIX = hd1k_zzr_prefix.dat -HD1KZZZROMBOIMG = hd1k_zzr_combo.img -ZZRROM = ../../Binary/RCZ280_nat_zzr.rom -ZZRROMHEX = RCZ280_nat_zzr.hex -HD1KIMGS = ../../Binary/hd1k_cpm22.img ../../Binary/hd1k_zsdos.img ../../Binary/hd1k_nzcom.img \ - ../../Binary/hd1k_cpm3.img ../../Binary/hd1k_zpm3.img ../../Binary/hd1k_ws4.img -ZZRROMSIZE = 262144 - -OBJECTS := - -ifneq ($(wildcard $(ZZRROM)),) - OBJECTS += $(ZZRROMHEX) $(HD1KZZRPREFIX) $(HD1KZZZROMBOIMG) -endif - -DEST=../../Binary - -TOOLS = ../../Tools - -include $(TOOLS)/Makefile.inc - -DIFFPATH = $(DIFFTO)/Binary - -zzrromchk: - [ `wc -c $(ZZRROM) | awk '{print $$1}'` = $(ZZRROMSIZE) ] - -$(HD1KZZRPREFIX): zzrromchk - cat zzr_cfldr.bin zzr_ptbl.bin zzr_fill_1.bin zzr_mon.bin zzr_fill_2.bin $(ZZRROM) zzr_fill_3.bin >$@ - -$(HD1KZZZROMBOIMG): zzrromchk $(HD1KZZRPREFIX) $(HD1KIMGS) - cat $(HD1KZZRPREFIX) $(HD1KIMGS) > $@ - -$(ZZRROMHEX): zzrromchk $(ZZRROM) - srec_cat $(ZZRROM) -Binary -Output $(ZZRROMHEX) -Intel -CRLF diff --git a/Source/ZZR/Bank Layout.txt b/Source/ZZRC/Bank Layout.txt similarity index 100% rename from Source/ZZR/Bank Layout.txt rename to Source/ZZRC/Bank Layout.txt diff --git a/Source/ZZRC/Build.cmd b/Source/ZZRC/Build.cmd new file mode 100644 index 00000000..700e21b7 --- /dev/null +++ b/Source/ZZRC/Build.cmd @@ -0,0 +1,42 @@ +:: @echo off +setlocal + +set ROMFILE=..\..\Binary\RCZ280_zzrc.rom +set ROMSIZE=262144 + +if not exist %ROMFILE% goto :eof + +:: +:: The ROM image *must* be exactly 256K or the resulting disk +:: image produced below will be invalid. Check for the proper size. +:: + +call :filesize %ROMFILE% + +if "%FILESIZE%" neq "%ROMSIZE%" ( + echo. + echo. + echo ERROR: "%ROMFILE%" is not exactly %ROMSIZE% bytes as required!!! + echo You must specify a ROMSIZE of "256" when building the ZZRCC ROM image. + echo. + echo. + exit /b 1 +) + +rem ..\..\Tools\srecord\srec_cat.exe ..\..\Binary\RCZ280_zzrc.rom -Binary -Exclude 0x5000 0x7000 zzrc_romldr.hex -Intel -Output ..\..\Binary\RCZ280_zzrc.hex -Intel || exit /b + +..\..\Tools\srecord\srec_cat.exe ..\..\Binary\RCZ280_zzrc.rom -Binary -Output ..\..\Binary\RCZ280_zzrc.hex -Intel || exit /b + +rem ..\..\Tools\srecord\srec_cat.exe ..\..\Binary\RCZ280_zzrc.hex -Intel -Output ..\..\Binary\RCZ280_zzrc_ldr.rom -Binary || exit /b + +rem copy /b zzrc_cfldr.bin + zzrc_ptbl.bin + zzrc_fill_1.bin + zzrc_mon.bin + zzrc_fill_2.bin + ..\..\Binary\RCZ280_zzrc_ldr.rom + zzrc_fill_3.bin ..\..\Binary\hd1k_zzrc_prefix.dat || exit /b + +copy /b zzrc_cfldr.bin + zzrc_ptbl.bin + zzrc_fill_1.bin + zzrc_mon.bin + zzrc_fill_2.bin + ..\..\Binary\RCZ280_zzrc.rom + zzrc_fill_3.bin ..\..\Binary\hd1k_zzrc_prefix.dat || exit /b + +copy /b ..\..\Binary\hd1k_zzrc_prefix.dat + ..\..\Binary\hd1k_cpm22.img + ..\..\Binary\hd1k_zsdos.img + ..\..\Binary\hd1k_nzcom.img + ..\..\Binary\hd1k_cpm3.img + ..\..\Binary\hd1k_zpm3.img + ..\..\Binary\hd1k_ws4.img ..\..\Binary\hd1k_zzrc_combo.img || exit /b + +goto :eof + +:filesize +set FILESIZE=%~z1 +goto :eof \ No newline at end of file diff --git a/Source/ZZR/Clean.cmd b/Source/ZZRC/Clean.cmd similarity index 100% rename from Source/ZZR/Clean.cmd rename to Source/ZZRC/Clean.cmd diff --git a/Source/ZZRC/Makefile b/Source/ZZRC/Makefile new file mode 100644 index 00000000..935a7bf2 --- /dev/null +++ b/Source/ZZRC/Makefile @@ -0,0 +1,33 @@ +HD1KZZRCPREFIX = hd1k_zzrc_prefix.dat +HD1KZZRCCOMBOIMG = hd1k_zzrc_combo.img +ZZRCROM = ../../Binary/RCZ280_zzrc.rom +ZZRCROMHEX = RCZ280_zzrc.hex +HD1KIMGS = ../../Binary/hd1k_cpm22.img ../../Binary/hd1k_zsdos.img ../../Binary/hd1k_nzcom.img \ + ../../Binary/hd1k_cpm3.img ../../Binary/hd1k_zpm3.img ../../Binary/hd1k_ws4.img +ZZRCROMSIZE = 262144 + +OBJECTS := + +ifneq ($(wildcard $(ZZRCROM)),) + OBJECTS += $(ZZRCROMHEX) $(HD1KZZRCPREFIX) $(HD1KZZRCCOMBOIMG) +endif + +DEST=../../Binary + +TOOLS = ../../Tools + +include $(TOOLS)/Makefile.inc + +DIFFPATH = $(DIFFTO)/Binary + +zzrcromchk: + [ `wc -c $(ZZRCROM) | awk '{print $$1}'` = $(ZZRCROMSIZE) ] + +$(HD1KZZRCPREFIX): zzrcromchk + cat zzrc_cfldr.bin zzrc_ptbl.bin zzrc_fill_1.bin zzrc_mon.bin zzrc_fill_2.bin $(ZZRCROM) zzrc_fill_3.bin >$@ + +$(HD1KZZRCCOMBOIMG): zzrcromchk $(HD1KZZRCPREFIX) $(HD1KIMGS) + cat $(HD1KZZRCPREFIX) $(HD1KIMGS) > $@ + +$(ZZRCROMHEX): zzrcromchk $(ZZRCROM) + srec_cat $(ZZRCROM) -Binary -Output $(ZZRCROMHEX) -Intel -CRLF diff --git a/Source/ZZR/ZZR Disk Layout.txt b/Source/ZZRC/ZZRC Disk Layout.txt similarity index 100% rename from Source/ZZR/ZZR Disk Layout.txt rename to Source/ZZRC/ZZRC Disk Layout.txt diff --git a/Source/ZZR/zzr_cfldr.bin b/Source/ZZRC/zzrc_cfldr.bin similarity index 100% rename from Source/ZZR/zzr_cfldr.bin rename to Source/ZZRC/zzrc_cfldr.bin diff --git a/Source/ZZR/zzr_fill_1.bin b/Source/ZZRC/zzrc_fill_1.bin similarity index 100% rename from Source/ZZR/zzr_fill_1.bin rename to Source/ZZRC/zzrc_fill_1.bin diff --git a/Source/ZZR/zzr_fill_2.bin b/Source/ZZRC/zzrc_fill_2.bin similarity index 100% rename from Source/ZZR/zzr_fill_2.bin rename to Source/ZZRC/zzrc_fill_2.bin diff --git a/Source/ZZR/zzr_fill_3.bin b/Source/ZZRC/zzrc_fill_3.bin similarity index 100% rename from Source/ZZR/zzr_fill_3.bin rename to Source/ZZRC/zzrc_fill_3.bin diff --git a/Source/ZZR/zzr_mon.bin b/Source/ZZRC/zzrc_mon.bin similarity index 100% rename from Source/ZZR/zzr_mon.bin rename to Source/ZZRC/zzrc_mon.bin diff --git a/Source/ZZR/zzr_ptbl.bin b/Source/ZZRC/zzrc_ptbl.bin similarity index 100% rename from Source/ZZR/zzr_ptbl.bin rename to Source/ZZRC/zzrc_ptbl.bin diff --git a/Source/ver.inc b/Source/ver.inc index 3b282151..81181ce0 100644 --- a/Source/ver.inc +++ b/Source/ver.inc @@ -2,4 +2,4 @@ #DEFINE RMN 1 #DEFINE RUP 1 #DEFINE RTP 0 -#DEFINE BIOSVER "3.1.1-pre.195" +#DEFINE BIOSVER "3.1.1-pre.197" diff --git a/Source/ver.lib b/Source/ver.lib index 97eebbc4..b10a6bff 100644 --- a/Source/ver.lib +++ b/Source/ver.lib @@ -3,5 +3,5 @@ rmn equ 1 rup equ 1 rtp equ 0 biosver macro - db "3.1.1-pre.195" + db "3.1.1-pre.197" endm