mirror of
https://github.com/wwarthen/RomWBW.git
synced 2026-02-06 22:43:15 -06:00
Compare commits
182 Commits
v3.6.0-dev
...
v3.6.0-dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e43b739ddd | ||
|
|
474a261649 | ||
|
|
2b459b1358 | ||
|
|
5e7009876c | ||
|
|
046c8cc20c | ||
|
|
caf7544219 | ||
|
|
58d0c7add0 | ||
|
|
067363824c | ||
|
|
edaa4e2a03 | ||
|
|
1a38b97e51 | ||
|
|
36dac79faf | ||
|
|
1738bfeb35 | ||
|
|
79180f2a3b | ||
|
|
a51a581d97 | ||
|
|
aee9b4aa87 | ||
|
|
9f2bee08b6 | ||
|
|
ec973d0b3f | ||
|
|
a6f04b8be2 | ||
|
|
cccb51b3c4 | ||
|
|
15f22a0cb0 | ||
|
|
b82910cad8 | ||
|
|
a188add0eb | ||
|
|
641a4d7daf | ||
|
|
d7dc9aafa4 | ||
|
|
072774a147 | ||
|
|
15e44ecd8e | ||
|
|
2eb4e5606c | ||
|
|
15f440ce4d | ||
|
|
1a8f03b322 | ||
|
|
2d2696d22c | ||
|
|
090d26b2af | ||
|
|
e4c55edc02 | ||
|
|
a68ae0cd24 | ||
|
|
45ac5cb3be | ||
|
|
21f7dfc4fb | ||
|
|
d92fb77f11 | ||
|
|
4006bc0224 | ||
|
|
0d5681d2db | ||
|
|
ab9e6d662d | ||
|
|
4fa7bf0117 | ||
|
|
14a9f51efe | ||
|
|
a052b145fe | ||
|
|
1d7b0d970f | ||
|
|
ddeb6ce48b | ||
|
|
b6598cdcc6 | ||
|
|
74f9daaaaa | ||
|
|
dddffac68f | ||
|
|
f03c68c016 | ||
|
|
8c629c637d | ||
|
|
2dba16c62d | ||
|
|
90bb60d423 | ||
|
|
52bf7a56e3 | ||
|
|
0a0f2f8a4b | ||
|
|
aacf98a82a | ||
|
|
42385fd120 | ||
|
|
d754e475c2 | ||
|
|
a75dada16e | ||
|
|
e5a98ec501 | ||
|
|
0a8b4355c9 | ||
|
|
bd6e374d72 | ||
|
|
e4c5f1e1f8 | ||
|
|
a29c6f35c7 | ||
|
|
c5da5b60a8 | ||
|
|
8a5f9eed2d | ||
|
|
5a70c0bd38 | ||
|
|
edfb568c82 | ||
|
|
d35207c7a8 | ||
|
|
347223fa02 | ||
|
|
d259411e72 | ||
|
|
2bb559d29a | ||
|
|
5855dafac6 | ||
|
|
b4fe4dc7e9 | ||
|
|
2269142a04 | ||
|
|
ae3cd27579 | ||
|
|
7dbe9a5abb | ||
|
|
1a955efee6 | ||
|
|
67b89d2a9c | ||
|
|
7d72d8c347 | ||
|
|
8475f29e43 | ||
|
|
7f64871014 | ||
|
|
1ef10c3c14 | ||
|
|
9f15687b03 | ||
|
|
e696dc6c19 | ||
|
|
c8014d1947 | ||
|
|
801ee17487 | ||
|
|
0a35539d1c | ||
|
|
43680193a9 | ||
|
|
7accbc4981 | ||
|
|
9689034523 | ||
|
|
af3401ac5b | ||
|
|
b50913e4c3 | ||
|
|
f99afc3d37 | ||
|
|
744736fa23 | ||
|
|
84770dc29a | ||
|
|
cebeee1157 | ||
|
|
f6b083d835 | ||
|
|
71abbfb8fc | ||
|
|
0932a43fe7 | ||
|
|
58b016d173 | ||
|
|
c884571384 | ||
|
|
cfaa2b39c1 | ||
|
|
a68467150e | ||
|
|
ed095285c5 | ||
|
|
4ad437d557 | ||
|
|
666e7717f8 | ||
|
|
5f4a6c5160 | ||
|
|
36ea53f612 | ||
|
|
540475b50f | ||
|
|
1d8ffa2d8a | ||
|
|
02f5e05761 | ||
|
|
1cba90ff15 | ||
|
|
5a519540bc | ||
|
|
782e614b29 | ||
|
|
f131b2486a | ||
|
|
c399864e95 | ||
|
|
4e49a0fede | ||
|
|
00a6c8143a | ||
|
|
ab7c566270 | ||
|
|
70742d5083 | ||
|
|
75c9a4e482 | ||
|
|
d83ed6f774 | ||
|
|
100b2fc46e | ||
|
|
53d2f3f57b | ||
|
|
024074b2cf | ||
|
|
4436209213 | ||
|
|
c8a551a781 | ||
|
|
e0d385af38 | ||
|
|
135641d66c | ||
|
|
f63ef6ba04 | ||
|
|
b62b8639a6 | ||
|
|
253b92377d | ||
|
|
b006343740 | ||
|
|
f0133d1b1b | ||
|
|
d1722923fd | ||
|
|
242c004749 | ||
|
|
e24860f474 | ||
|
|
ecb95cc161 | ||
|
|
4e23c9104d | ||
|
|
179abe7087 | ||
|
|
2b5a224a4f | ||
|
|
c350d153da | ||
|
|
347b7e6a06 | ||
|
|
802c1b41ff | ||
|
|
7e8560f9a9 | ||
|
|
580d7761e1 | ||
|
|
149ab3ca8a | ||
|
|
b7234d339a | ||
|
|
9abba42df7 | ||
|
|
22c26dba36 | ||
|
|
7e9c08993d | ||
|
|
3f6fc215e9 | ||
|
|
62d5a7b825 | ||
|
|
2b1d703c4e | ||
|
|
b98c506baf | ||
|
|
60cf40f0b8 | ||
|
|
9c96e7c7a2 | ||
|
|
ce0d04226e | ||
|
|
eec2147826 | ||
|
|
93d7c7ed77 | ||
|
|
1a44fbee0f | ||
|
|
9cbd8937d7 | ||
|
|
ca6979d97e | ||
|
|
72ec983c4f | ||
|
|
f63c324764 | ||
|
|
ea3ba6e0d4 | ||
|
|
bf2a45f83e | ||
|
|
3f8bc43596 | ||
|
|
e6143beb25 | ||
|
|
3b0f00520e | ||
|
|
db0afaedfa | ||
|
|
a92bd780c8 | ||
|
|
04dbb0e4bb | ||
|
|
601ddee38b | ||
|
|
1e1554937c | ||
|
|
b4421a0532 | ||
|
|
7c3eeaff27 | ||
|
|
ed47d2f8b6 | ||
|
|
c802bd2ce2 | ||
|
|
6ad93577db | ||
|
|
cb2f4e5773 | ||
|
|
e6a14dda4d | ||
|
|
8163c20342 |
3
.github/workflows/commit.yml
vendored
3
.github/workflows/commit.yml
vendored
@@ -26,7 +26,8 @@ jobs:
|
||||
run: |
|
||||
export TZ='America/Los_Angeles'
|
||||
sudo apt-get install srecord
|
||||
make distlog
|
||||
make transpile-c-code
|
||||
make distlog --trace
|
||||
rm -rf .git*
|
||||
|
||||
- name: List Output
|
||||
|
||||
3
.github/workflows/release.yml
vendored
3
.github/workflows/release.yml
vendored
@@ -19,7 +19,8 @@ jobs:
|
||||
export TZ='America/Los_Angeles'
|
||||
sudo apt-get install libncurses-dev
|
||||
sudo apt-get install srecord
|
||||
make distlog
|
||||
make transpile-c-code
|
||||
make distlog --trace
|
||||
rm -rf .git*
|
||||
|
||||
- name: Create Package Archive
|
||||
|
||||
18
.gitignore
vendored
18
.gitignore
vendored
@@ -114,20 +114,24 @@ Source/ZPM3/genbnk.dat
|
||||
Source/ZSDOS/zsdos.err
|
||||
|
||||
# Lets explicit list all generate untracked binary files
|
||||
Binary/*.upd
|
||||
Binary/Apps/bbcbasic.txt
|
||||
Binary/Apps/copysl.doc
|
||||
Binary/Apps/copysl.doc
|
||||
Binary/Apps/fdu.doc
|
||||
Binary/Apps/fdu.doc
|
||||
Binary/Apps/Tunes/bgm.vgm
|
||||
Binary/Apps/Tunes/ending.vgm
|
||||
Binary/Apps/Tunes/inchina.vgm
|
||||
Binary/Apps/Tunes/shirakaw.vgm
|
||||
Binary/Apps/Tunes/startdem.vgm
|
||||
Binary/Apps/Tunes/wonder01.vgm
|
||||
Binary/Apps/copysl.doc
|
||||
Binary/Apps/fdu.doc
|
||||
Binary/Apps/zmconfig.ovr
|
||||
Binary/Apps/zminit.ovr
|
||||
Binary/Apps/zmp.doc
|
||||
Binary/Apps/zmp.hlp
|
||||
Binary/Apps/zmp.cfg
|
||||
Binary/Apps/zmp.doc
|
||||
Binary/Apps/zmp.fon
|
||||
Binary/Apps/zmp.hlp
|
||||
Binary/Apps/zmterm.ovr
|
||||
Binary/Apps/zmxfer.ovr
|
||||
Binary/CPM3/bdos3.spr
|
||||
@@ -146,13 +150,12 @@ Binary/CPNET/cpn12ser.lbr
|
||||
Binary/CPNET/cpn3duo.lbr
|
||||
Binary/CPNET/cpn3mt.lbr
|
||||
Binary/CPNET/cpn3ser.lbr
|
||||
Binary/*.upd
|
||||
Binary/hd1k_prefix.dat
|
||||
Binary/ZPM3/bnkbdos3.spr
|
||||
Binary/ZPM3/bnkbios3.spr
|
||||
Binary/ZPM3/gencpm.dat
|
||||
Binary/ZPM3/resbdos3.spr
|
||||
Binary/ZPM3/zinstal.zpm
|
||||
Binary/hd1k_prefix.dat
|
||||
Source/BPBIOS/def-ww.lib
|
||||
Source/CPNET/cpn12duo.lbr
|
||||
Source/CPNET/cpn12mt.lbr
|
||||
@@ -180,6 +183,8 @@ Source/Fonts/fontvgarcc.bin
|
||||
Source/Fonts/fontvgarcu.asm
|
||||
Source/HBIOS/*.upd
|
||||
Source/HBIOS/build_env.cmd
|
||||
Source/HBIOS/build_env.cmd
|
||||
Source/HBIOS/hbios_env.sh
|
||||
Source/HBIOS/hbios_env.sh
|
||||
Source/HBIOS/netboot.mod
|
||||
Source/Images/*.cat
|
||||
@@ -197,4 +202,3 @@ Source/ZPM3/setz3.com
|
||||
Tools/unix/OpenSpin/build/
|
||||
Tools/unix/zxcc/config.h
|
||||
Tools/unix/zxcc/zxcc
|
||||
Binary/Apps/bbcbasic.txt
|
||||
|
||||
36
.vscode/settings.json
vendored
36
.vscode/settings.json
vendored
@@ -1,4 +1,38 @@
|
||||
{
|
||||
"z80-macroasm.format.enabled": true,
|
||||
"z80-macroasm.format.baseIndent": 1,
|
||||
"z80-macroasm.format.whitespaceAfterInstruction": "tab",
|
||||
"z80-macroasm.format.uppercaseKeywords": true,
|
||||
"z80-macroasm.format.spaceAfterArgument": true,
|
||||
"z80-macroasm.format.hexaNumberStyle": "motorola",
|
||||
"z80-macroasm.format.hexaNumberCase": true,
|
||||
"files.trimTrailingWhitespace": false,
|
||||
"files.eol": "\r\n"
|
||||
"files.eol": "\r\n",
|
||||
"files.associations": {
|
||||
"*.inc": "z80-macroasm",
|
||||
"*.asm": "z80-macroasm",
|
||||
"*.180": "z80-macroasm",
|
||||
"*.asm.m4": "z80-macroasm",
|
||||
"*.inc.m4": "z80-macroasm",
|
||||
"*.mac": "z80-macroasm",
|
||||
"*.asmpp": "z80-macroasm",
|
||||
"*.zdsproj": "xml",
|
||||
"*.Z80": "z80-macroasm",
|
||||
"ch376.h": "c",
|
||||
"protocol.h": "c",
|
||||
"usb_state.h": "c",
|
||||
"functional": "c",
|
||||
"class_scsi.h": "c",
|
||||
"z80.h": "c",
|
||||
"dev_transfers.h": "c",
|
||||
"usb-base-drv.h": "c",
|
||||
"critical-section.h": "c",
|
||||
"enumerate.h": "c",
|
||||
"ch376inc.h": "c",
|
||||
"enumerate_storage.h": "c",
|
||||
"work-area.h": "c",
|
||||
"hbios-driver-storage.h": "c",
|
||||
"class_hid_keyboard.h": "c",
|
||||
"print.h": "c"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,6 +62,7 @@ ZCPR D&J User Manual. This manual supplements the ZCPR Manual.
|
||||
|
||||
|
||||
ZSDOS Manual ("ZSDOS Manual.pdf")
|
||||
ZSDOS Programmer's Manual ("ZSDOS Programmers Manual.pdf")
|
||||
---------------------------------
|
||||
|
||||
ZSDOS is the DOS portion of Z-System. This is the manual for ZSDOS
|
||||
@@ -69,6 +70,10 @@ ZSDOS is the DOS portion of Z-System. This is the manual for ZSDOS
|
||||
ignored since that work has already been completed as part of the
|
||||
RomWBW distribution.
|
||||
|
||||
The ZSDOS Programmer's Manual is also included courtesy of Wayne
|
||||
Hortensius and Randy Merkel. This manual includes documentation of the
|
||||
ZSDOS BDOS API enhancements.
|
||||
|
||||
ZPM3 ("ZPM3.txt")
|
||||
-----------------
|
||||
|
||||
|
||||
BIN
Doc/CPM/ZSDOS Programmers Manual.pdf
Normal file
BIN
Doc/CPM/ZSDOS Programmers Manual.pdf
Normal file
Binary file not shown.
@@ -12,6 +12,20 @@ Version 3.6
|
||||
- WBW: Added boundary check to ram/rom disk driver
|
||||
- WBW: Per Peter Onion, switch KERMIT default file xfer mode to binary
|
||||
- J?L: Source for ZSDOS2 and BPBIOS Utilities (from disassembly)
|
||||
- WBW: Support ROM-based font storage
|
||||
- MAP: New Slice Inventory Rom App "S" display bootable slices, during boot
|
||||
- MAP: Device Inventory moved from HBIOS to Rom App, saving >1k space in HBIOS
|
||||
- MAP: Added disk image for all Infocom text adventure Games
|
||||
- M?R: Fixed formatting issue with SLABEL where Slice # < 10
|
||||
- WBW: Improved image creation process to allow user defined aggregates
|
||||
- WBW: Implemented config driven slice name and system image specification
|
||||
- D?N: Added native USB driver support (keyboard, floppy, mass storage)
|
||||
- MGG: Added sample program source files for all language disk iamges
|
||||
- WBW: Added support for S100 Dual CF Interface
|
||||
- WBW: Added support for S100 ESP32 SD Interface
|
||||
- MAP: User guide. Reorder sections around disk formatting
|
||||
- R?M: Randy Merkel provided ZSDOS Programmer's Manual as translated by Wayne Hortensius
|
||||
- WBW: Updated Cowgol disk image with latest COWFIX.COM from Ladislau Szilagyi
|
||||
|
||||
Version 3.5.1
|
||||
-------------
|
||||
@@ -82,7 +96,7 @@ Version 3.5
|
||||
- WBW: Add options to TUNE/HBIOS to force detection of MSX and RC AY/YM standard PSG ports
|
||||
- MAP: Added /B=OPTIONS for automated drive assignment to ASSIGN.COM
|
||||
- WBW: Added TE Editor (Ladislau Szilagyi)
|
||||
- WBW: Refrech Cowgol disk image (Ladislau Szilagyi)
|
||||
- WBW: Refresh Cowgol disk image (Ladislau Szilagyi)
|
||||
|
||||
Version 3.4
|
||||
-----------
|
||||
|
||||
BIN
Doc/Language/Cowgol Compiler Manual.pdf
Normal file
BIN
Doc/Language/Cowgol Compiler Manual.pdf
Normal file
Binary file not shown.
@@ -23,10 +23,14 @@ Borland TurboPascal User Manual ("Turbo_Pascal_Version_3.0_Reference_Manual_1986
|
||||
Official user manual Borland TurboPascal included in the pascal disk image.
|
||||
|
||||
|
||||
Cowgol Lanaguage ("Cowgol Language.pdf")
|
||||
The Cowgol Lanaguage ("The Cowgol Language.pdf")
|
||||
Cowgol Compiler Manual ("Cowgol Compiler Manual.pdf")
|
||||
|
||||
--------------------------------------
|
||||
|
||||
Documentation for Cowgol Language included in the cowgol disk image
|
||||
Documentation for Cowgol Language included in the cowgol disk image.
|
||||
The Cowgol Language describes the Cowgol Language itself while the
|
||||
Cowgol Compiler Manual describes the compiler operation.
|
||||
|
||||
|
||||
HI-TECH C Compiler User Manual ("HI-TECH Z80 C Compiler Manual.txt")
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
12
Dockerfile
12
Dockerfile
@@ -1,4 +1,4 @@
|
||||
FROM ubuntu:jammy-20240111 as basebuilder
|
||||
FROM ubuntu:jammy-20240111 AS basebuilder
|
||||
|
||||
# This docker file can be used to build a tool chain docker image for building RomWBW images.
|
||||
|
||||
@@ -10,7 +10,7 @@ FROM ubuntu:jammy-20240111 as basebuilder
|
||||
# After you have built the above image (called romwbw-chain), you can use it to compile and build the RomWBW images
|
||||
# as per the standard make scripts within RomWBW.
|
||||
# Start a new terminal, cd to where you have clone RomWBW, and then run this command:
|
||||
# docker run --rm -v ${PWD}:/src/ --privileged=true -u $(id -u ${USER}):$(id -g ${USER}) -it romwbw-chain:latest
|
||||
# docker run --rm -v ${PWD}:/src/ --privileged=true -u $(id -u ${USER}):$(id -g ${USER}) -it romwbw-chain
|
||||
|
||||
# you can now compile and build the required images:
|
||||
|
||||
@@ -21,13 +21,11 @@ FROM ubuntu:jammy-20240111 as basebuilder
|
||||
# when finish, type 'exit' to return to back to your standard terminal session
|
||||
|
||||
LABEL Maintainer="Dean Netherton" \
|
||||
Description="spike to use clang for ez80 target"
|
||||
Description="RomWBW builder platform"
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
|
||||
RUN dpkg --add-architecture i386
|
||||
RUN sed -i 's/http:\/\/archive\.ubuntu\.com\/ubuntu/http:\/\/au.archive.ubuntu.com\/ubuntu/g' /etc/apt/sources.list
|
||||
RUN apt update -y
|
||||
RUN apt dist-upgrade -y
|
||||
RUN apt install -y --no-install-recommends cmake lzip ca-certificates mtools build-essential dos2unix libboost-all-dev texinfo texi2html libxml2-dev subversion bison flex zlib1g-dev m4 git wget dosfstools curl
|
||||
@@ -35,10 +33,10 @@ RUN apt install -y --no-install-recommends cmake lzip ca-certificates mtools bui
|
||||
RUN mkdir work
|
||||
WORKDIR /work
|
||||
|
||||
FROM basebuilder as main
|
||||
FROM basebuilder AS main
|
||||
|
||||
LABEL Maintainer="Dean Netherton" \
|
||||
Description="spike to build RomWBW"
|
||||
Description="RomWBW builder platform"
|
||||
|
||||
RUN mkdir /src
|
||||
WORKDIR /src/
|
||||
|
||||
7
Makefile
7
Makefile
@@ -1,7 +1,7 @@
|
||||
.PHONY: tools source clean clobber diff dist
|
||||
|
||||
.ONESHELL:
|
||||
.SHELLFLAGS = -cex
|
||||
.SHELLFLAGS = -ce
|
||||
|
||||
all: tools source
|
||||
|
||||
@@ -22,6 +22,11 @@ clobber: clean
|
||||
diff:
|
||||
$(MAKE) --directory Source diff
|
||||
|
||||
# Convert c code to assembly code
|
||||
transpile-c-code:
|
||||
@cd Source/HBIOS/ch376-native
|
||||
$(MAKE) -j
|
||||
|
||||
dist:
|
||||
$(MAKE) ROM_PLATFORM=dist
|
||||
$(MAKE) --directory Tools clean
|
||||
|
||||
24
ReadMe.md
24
ReadMe.md
@@ -7,7 +7,7 @@
|
||||
**RomWBW Introduction** \
|
||||
Version 3.6 \
|
||||
Wayne Warthen ([wwarthen@gmail.com](mailto:wwarthen@gmail.com)) \
|
||||
19 Jun 2025
|
||||
12 Sep 2025
|
||||
|
||||
# Overview
|
||||
|
||||
@@ -80,7 +80,7 @@ Some of the included software:
|
||||
- Support for other operating systems, p-System, FreeRTOS, and FUZIX.
|
||||
- Programming Tools (Z80ASM, Turbo Pascal, Forth, Cowgol)
|
||||
- C Compiler’s including Aztec-C, and HI-TECH C
|
||||
- Microsoft Basic Compiler, and Microsoft Fortran
|
||||
- Microsoft Basic Compiler, Microsoft Fortran, and Microsoft COBOL
|
||||
- Some games such as Colossal Cave, Zork, etc
|
||||
- Wordstar Word processing software
|
||||
|
||||
@@ -290,8 +290,12 @@ let me know if I missed you!
|
||||
|
||||
- Tasty Basic is a product of Dimitri Theulings.
|
||||
|
||||
- Dean Netherton contributed eZ80 CPU support, the sound driver
|
||||
interface, and the SN76489 sound driver.
|
||||
- Dean Netherton contributed multiple components:
|
||||
|
||||
- eZ80 CPU support
|
||||
- Sound driver infrastructure
|
||||
- SN76489 sound driver
|
||||
- Native USB driver (keyboard, floppy, mass storage)
|
||||
|
||||
- The RomWBW Disk Catalog document was produced by Mykl Orders.
|
||||
|
||||
@@ -307,8 +311,10 @@ let me know if I missed you!
|
||||
- significant content in the Disk Catalog and User Guide
|
||||
- creation of the Introduction and Hardware documents
|
||||
- Z3PLUS operating system disk image
|
||||
- COPYSL utility
|
||||
- SLABEL utility
|
||||
- Infocom text adventure game disk image
|
||||
- COPYSL, and SLABEL utilities
|
||||
- Display of bootable slices via “S” command during startup
|
||||
- Optimisations of HBIOS and CBIOS to reduce overall code size
|
||||
- a feature for RomWBW configuration by NVRAM
|
||||
- the /B bulk mode of disk assignment to the ASSIGN utility
|
||||
|
||||
@@ -349,6 +355,12 @@ let me know if I missed you!
|
||||
- Jörg Linder has contributed disassembled and nicely commented source
|
||||
for ZSDOS2 and the BPBIOS utilities.
|
||||
|
||||
- Marshall Gates has contriubed sample program source files for all of
|
||||
the language disk images.
|
||||
|
||||
- Randy Merkel provided the ZSDOS Programmer’s Manual as translated by
|
||||
Wayne Hortensius.
|
||||
|
||||
## Related Projects
|
||||
|
||||
Outside of the hardware platforms adapted to RomWBW, there are a variety
|
||||
|
||||
24
ReadMe.txt
24
ReadMe.txt
@@ -1,6 +1,6 @@
|
||||
RomWBW Introduction
|
||||
Wayne Warthen (wwarthen@gmail.com)
|
||||
19 Jun 2025
|
||||
12 Sep 2025
|
||||
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ Some of the included software:
|
||||
- Support for other operating systems, p-System, FreeRTOS, and FUZIX.
|
||||
- Programming Tools (Z80ASM, Turbo Pascal, Forth, Cowgol)
|
||||
- C Compiler’s including Aztec-C, and HI-TECH C
|
||||
- Microsoft Basic Compiler, and Microsoft Fortran
|
||||
- Microsoft Basic Compiler, Microsoft Fortran, and Microsoft COBOL
|
||||
- Some games such as Colossal Cave, Zork, etc
|
||||
- Wordstar Word processing software
|
||||
|
||||
@@ -297,8 +297,12 @@ let me know if I missed you!
|
||||
|
||||
- Tasty Basic is a product of Dimitri Theulings.
|
||||
|
||||
- Dean Netherton contributed eZ80 CPU support, the sound driver
|
||||
interface, and the SN76489 sound driver.
|
||||
- Dean Netherton contributed multiple components:
|
||||
|
||||
- eZ80 CPU support
|
||||
- Sound driver infrastructure
|
||||
- SN76489 sound driver
|
||||
- Native USB driver (keyboard, floppy, mass storage)
|
||||
|
||||
- The RomWBW Disk Catalog document was produced by Mykl Orders.
|
||||
|
||||
@@ -314,8 +318,10 @@ let me know if I missed you!
|
||||
- significant content in the Disk Catalog and User Guide
|
||||
- creation of the Introduction and Hardware documents
|
||||
- Z3PLUS operating system disk image
|
||||
- COPYSL utility
|
||||
- SLABEL utility
|
||||
- Infocom text adventure game disk image
|
||||
- COPYSL, and SLABEL utilities
|
||||
- Display of bootable slices via “S” command during startup
|
||||
- Optimisations of HBIOS and CBIOS to reduce overall code size
|
||||
- a feature for RomWBW configuration by NVRAM
|
||||
- the /B bulk mode of disk assignment to the ASSIGN utility
|
||||
|
||||
@@ -356,6 +362,12 @@ let me know if I missed you!
|
||||
- Jörg Linder has contributed disassembled and nicely commented source
|
||||
for ZSDOS2 and the BPBIOS utilities.
|
||||
|
||||
- Marshall Gates has contriubed sample program source files for all of
|
||||
the language disk images.
|
||||
|
||||
- Randy Merkel provided the ZSDOS Programmer’s Manual as translated by
|
||||
Wayne Hortensius.
|
||||
|
||||
|
||||
Related Projects
|
||||
|
||||
|
||||
@@ -7,6 +7,6 @@ BF_SND .EQU $50
|
||||
BF_SNDRESET .EQU BF_SND + 0 ; RESET SOUND SYSTEM
|
||||
BF_SNDVOL .EQU BF_SND + 1 ; REQUEST SOUND VOL - L CONTAINS VOLUME (255 MAX, 0 SILENT) - SCALED AS REQUIRED BY DRIVER (EG: MAPS TO JUST 4 BIT RESOLUTION FOR SN76489)
|
||||
BF_SNDPRD .EQU BF_SND + 2 ; REQUEST SOUND PERIOD - HL CONTAINS DRIVER SPECIFIC VALUE
|
||||
BF_SNDNOTE .EQU BF_SND + 3 ; REQUEST NOTE - L CONTAINS NOTE - EACH VALUE IS QUARTER NOTE
|
||||
BF_SNDNOTE .EQU BF_SND + 3 ; REQUEST NOTE - L CONTAINS NOTE - EACH VALUE IS AN EIGHTH TONE
|
||||
BF_SNDPLAY .EQU BF_SND + 4 ; INITIATE THE REQUESTED SOUND COMMAND
|
||||
BF_SNDQUERY .EQU BF_SND + 5 ; E IS SUBFUNCTION
|
||||
|
||||
@@ -38,6 +38,8 @@
|
||||
; 2024-12-17 [MAP] Added new /B=opt feaure to assign drives
|
||||
; 2024-12-21 [MAP] Added CBIOS heap estimation to /B to prevent
|
||||
; overflow when the drives are finally added
|
||||
; 2025-07-19 [D?N] Support for native USB drivers
|
||||
; 2025-08-09 [WBW] Support for ESPSD driver
|
||||
;_______________________________________________________________________________
|
||||
;
|
||||
; ToDo:
|
||||
@@ -1179,8 +1181,9 @@ makdphwbw: ; determine appropriate dpb (WBW mode, unit number in A)
|
||||
jr makdph0 ; jump ahead
|
||||
makdph00:
|
||||
ld e,MID_FD144 ; assume floppy
|
||||
cp DIODEV_FD ; floppy?
|
||||
jr z,makdph0 ; yes, jump ahead
|
||||
;cp DIODEV_FD ; floppy?
|
||||
bit 7,c ; floppy?
|
||||
jr nz,makdph0 ; yes, jump ahead
|
||||
ld e,MID_RF ; assume ram floppy
|
||||
cp DIODEV_RF ; ram floppy?
|
||||
jr z,makdph0 ; yes, jump ahead
|
||||
@@ -1560,7 +1563,7 @@ drvmap:
|
||||
jr nz,drvmapu ; do UNA mode drvmap
|
||||
;
|
||||
; determine device code by scanning for string
|
||||
ld b,16 ; device table always has 16 entries
|
||||
ld b,devcnt ; number of entries in devtbl
|
||||
ld c,0 ; c is used to track table entry num
|
||||
ld de,tmpstr ; de points to specified device name
|
||||
ld hl,devtbl ; hl points to first entry of devtbl
|
||||
@@ -1826,7 +1829,7 @@ prtdev:
|
||||
rst 08 ; call hbios, D := device, E := unit
|
||||
push de ; save results
|
||||
ld a,d ; device to A
|
||||
and $0F ; mask out undesired bits
|
||||
and $1F ; mask out undesired bits
|
||||
push hl ; save HL
|
||||
add a,a ; multiple A by two for word table
|
||||
ld hl,devtbl ; point to start of device name table
|
||||
@@ -2427,6 +2430,7 @@ devtbl: ; device table
|
||||
.dw dev04, dev05, dev06, dev07
|
||||
.dw dev08, dev09, dev10, dev11
|
||||
.dw dev12, dev13, dev14, dev15
|
||||
.dw dev16, dev17
|
||||
;
|
||||
devunk .db "?",0
|
||||
dev00 .db "MD",0
|
||||
@@ -2444,9 +2448,11 @@ dev11 .db "IMM",0
|
||||
dev12 .db "SYQ",0
|
||||
dev13 .db "CHUSB",0
|
||||
dev14 .db "CHSD",0
|
||||
dev15 .equ devunk
|
||||
dev15 .db "USB",0
|
||||
dev16 .db "ESPSD",0
|
||||
dev17 .equ devunk
|
||||
;
|
||||
devcnt .equ 10 ; 10 devices defined
|
||||
devcnt .equ 18 ; 18 device types defined
|
||||
;
|
||||
udevram .db "RAM",0
|
||||
udevrom .db "ROM",0
|
||||
@@ -2464,13 +2470,13 @@ stack .equ $ ; stack top
|
||||
; Messages
|
||||
;
|
||||
indent .db " ",0
|
||||
msgban1 .db "ASSIGN v2.0 for RomWBW CP/M ",0
|
||||
msgban1 .db "ASSIGN v2.2 for RomWBW CP/M ",0
|
||||
msg22 .db "2.2",0
|
||||
msg3 .db "3",0
|
||||
msbban2 .db ", 21-Dec-2024",0
|
||||
msbban2 .db ", 9-Aug-2025",0
|
||||
msghb .db " (HBIOS Mode)",0
|
||||
msgub .db " (UBIOS Mode)",0
|
||||
msgban3 .db "Copyright 2024, Wayne Warthen, GNU GPL v3",0
|
||||
msgban3 .db "Copyright 2025, Wayne Warthen, GNU GPL v3",0
|
||||
msguse .db "Usage: ASSIGN D:[=[{D:|<device>[<unitnum>]:[<slicenum>]}]][,...]",13,10
|
||||
.db " ex. ASSIGN (display all active assignments)",13,10
|
||||
.db " ASSIGN /? (display version and usage)",13,10
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
;==============================================================================
|
||||
;
|
||||
; Author: Mark Pruden
|
||||
;
|
||||
; This is a SUPERSET of INVNTSLC.ASM -> Please See this program also when
|
||||
; making changes, as code ( in routine prtslc: ) exists there also
|
||||
;______________________________________________________________________________
|
||||
;
|
||||
; Usage:
|
||||
@@ -32,6 +35,7 @@
|
||||
; table once (per device), and work out all the LBA's from this single read.
|
||||
; Note this doesnt omit the fact that the 3 rd sector of each slice wold need to be read regarless.
|
||||
; To slightly reduce some IO only slices < 64 are considered.
|
||||
; - Output formatting misaligned with storage units enumerated as greater than 9 (ie 2 digits)
|
||||
;
|
||||
; This code will only execute on a Z80 CPU (or derivitive)
|
||||
; This code requirs the use of HBIOS
|
||||
@@ -42,6 +46,7 @@
|
||||
; 2024-12-11 [MAP] Started - Reboot v1.0 used as the basis for this code
|
||||
; 2024-12-14 [MAP] Initial 0.9 alpha with basic working functionality
|
||||
; 2025-04-21 [MAP] Initial v1.0 release for distribution, fixing all issues
|
||||
; 2025-07-12 [MR] Minor tweak to partially tidy up output formatting
|
||||
;______________________________________________________________________________
|
||||
;
|
||||
; Include Files
|
||||
@@ -91,7 +96,7 @@ exit:
|
||||
jp restart ; return to CP/M via restart
|
||||
;
|
||||
;===============================================================================
|
||||
; Initialization
|
||||
; Initialisation
|
||||
;
|
||||
init:
|
||||
; check for UNA (UBIOS)
|
||||
@@ -208,10 +213,10 @@ prtslc2a:
|
||||
ld a,c ; slice number
|
||||
ld (currslice),a ; save slice number
|
||||
;
|
||||
push bc ; save loop
|
||||
push bc ; save loop counter
|
||||
call prtslc3 ; print detals of the slice
|
||||
pop bc ; restore loop
|
||||
ret nz ; if error dont continie
|
||||
pop bc ; restore loop counter
|
||||
ret nz ; if error don't continue
|
||||
;
|
||||
inc c ; next slice number
|
||||
djnz prtslc2a ; loop if more slices
|
||||
@@ -245,15 +250,25 @@ prtslc3:
|
||||
cp c ; compare
|
||||
jr nz,prtslc5 ; ignore missing signature and loop
|
||||
;
|
||||
; Print volume label string at HL, '$' terminated, 16 chars max
|
||||
; Print slice label string at HL, '$' terminated, 16 chars max
|
||||
ld a,(currunit)
|
||||
call prtdecb ; print unit number as decimal
|
||||
call pdot ; print a DOT
|
||||
ld a,(currslice)
|
||||
ld a, (currslice) ; fetch the current slice numeric
|
||||
call prtdecb
|
||||
;
|
||||
;-------------------------------------------------------------------------------
|
||||
; Added by MartinR, July 2025, to help neaten the output formatting.
|
||||
; Note - this is not a complete fix and will still result in misaligned output
|
||||
; where the unit number exceeds 9 (ie - uses 2 digits).
|
||||
cp 10 ; is it less than 10?
|
||||
ld a,' '
|
||||
jr nc,jr01 ; If not, then we don't need an extra space printed
|
||||
call cout ; print the extra space necessary
|
||||
jr01: call cout ; print a space
|
||||
call cout ; print a space
|
||||
call cout ; print a space
|
||||
;-------------------------------------------------------------------------------
|
||||
;
|
||||
ld hl,bb_label ; point to label
|
||||
call pvol ; print it
|
||||
call crlf
|
||||
@@ -435,6 +450,7 @@ pdot:
|
||||
;
|
||||
;-------------------------------------------------------------------------------
|
||||
; Print character in A without destroying any registers
|
||||
; Use CP/M BDOS function $02 - Console Output
|
||||
;
|
||||
prtchr:
|
||||
cout:
|
||||
@@ -684,7 +700,7 @@ diskwrite:
|
||||
;===============================================================================
|
||||
;
|
||||
str_banner .db "\r\n"
|
||||
.db "Slice Label, v1.0, April 2025 - M.Pruden",0
|
||||
.db "Slice Label, v1.1, July 2025 - M.Pruden",0
|
||||
;
|
||||
str_err_una .db " ERROR: UNA not supported by application",0
|
||||
str_err_inv .db " ERROR: Invalid BIOS (signature missing)",0
|
||||
@@ -703,7 +719,7 @@ str_usage .db "\r\n\r\n"
|
||||
.db " Options are case insensitive.\r\n",0
|
||||
;
|
||||
PRTSLC_HDR .TEXT "\r\n\r\n"
|
||||
.TEXT "Un.Sl Drive \r\n"
|
||||
.TEXT "Un.Sl Label \r\n"
|
||||
.TEXT "----- ----------------\r\n"
|
||||
.DB 0
|
||||
;
|
||||
|
||||
@@ -4,7 +4,6 @@ setlocal
|
||||
:: call BuildDoc || exit /b
|
||||
call BuildProp || exit /b
|
||||
call BuildShared || exit /b
|
||||
call BuildBP || exit /b
|
||||
call BuildImages || exit /b
|
||||
call BuildROM %* || exit /b
|
||||
call BuildZRC || exit /b
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
pushd BPBIOS && call Build || exit /b & popd
|
||||
@@ -11,6 +11,7 @@ pushd ZSDOS && call Build || exit /b & popd
|
||||
pushd ZSDOS2 && call Build || exit /b & popd
|
||||
pushd CPM3 && call Build || exit /b & popd
|
||||
pushd ZPM3 && call Build || exit /b & popd
|
||||
pushd BPBIOS && call Build || exit /b & popd
|
||||
pushd CPNET && call Build || exit /b & popd
|
||||
pushd pSys && call Build || exit /b & popd
|
||||
pushd Apps && call Build || exit /b & popd
|
||||
|
||||
@@ -3201,8 +3201,9 @@ MAKDPH0: ; HANDLE RAM/ROM
|
||||
CP DIODEV_MD ; RAM/ROM DISK?
|
||||
JR Z,MAKDPH0 ; HANDLE SPECIAL
|
||||
LD DE,DPB_FD144 ; PRELOAD FLOPPY DPB
|
||||
CP DIODEV_FD ; FLOPPY?
|
||||
JR Z,MAKDPH1 ; IF SO, PROCEED TO DPH CREATION
|
||||
;CP DIODEV_FD ; FLOPPY?
|
||||
BIT 7,C ; FLOPPY?
|
||||
JR NZ,MAKDPH1 ; IF SO, PROCEED TO DPH CREATION
|
||||
LD DE,DPB_RF ; PRELOAD RAM FLOPPY DPB
|
||||
CP DIODEV_RF ; RAM FLOPPY?
|
||||
JR Z,MAKDPH1 ; IF SO, PROCEED TO DPH CREATION
|
||||
@@ -3381,7 +3382,7 @@ DEVUNK .DB "UNK$"
|
||||
RST 08 ; CALL HBIOS
|
||||
LD A,D ; RESULTANT DEVICE TYPE
|
||||
PUSH DE ; NEED TO SAVE UNIT NUMBER (IN E)
|
||||
AND $0F ; ISOLATE DEVICE BITS
|
||||
AND $1F ; ISOLATE DEVICE BITS
|
||||
ADD A,A ; MULTIPLY BY TWO FOR WORD TABLE
|
||||
LD HL,DEVTBL ; POINT TO START OF DEVICE NAME TABLE
|
||||
CALL ADDHLA ; ADD A TO HL TO POINT TO TABLE ENTRY
|
||||
@@ -3407,6 +3408,7 @@ DEVTBL: ; DEVICE TABLE
|
||||
.DW DEV04, DEV05, DEV06, DEV07
|
||||
.DW DEV08, DEV09, DEV10, DEV11
|
||||
.DW DEV12, DEV13, DEV14, DEV15
|
||||
.DW DEV16, DEV17
|
||||
;
|
||||
DEVUNK .DB "???$"
|
||||
DEV00 .DB "MD$"
|
||||
@@ -3424,7 +3426,9 @@ DEV11 .DB "IMM$"
|
||||
DEV12 .DB "SYQ$"
|
||||
DEV13 .DB "CHUSB$"
|
||||
DEV14 .DB "CHSD$"
|
||||
DEV15 .EQU DEVUNK
|
||||
DEV15 .DB "USB$"
|
||||
DEV16 .DB "ESPSD$"
|
||||
DEV17 .EQU DEVUNK
|
||||
;
|
||||
#ENDIF
|
||||
;
|
||||
|
||||
@@ -56,8 +56,22 @@ User Guide, and for the sake of completeness there is some overlap here.
|
||||
When a RomWBW system is started the user is presented with a sign-on
|
||||
message at the default console detailing the RomWBW version and build
|
||||
date. The system follows this with the list of hardware that it has
|
||||
discovered, a list of devices and the system units assigned to them,
|
||||
before finally inviting the to select a boot device with the prompt:
|
||||
discovered, a list of devices and the system units assigned to them.
|
||||
|
||||
If autoboot is configured then the message (below) will count down
|
||||
and once 0 is reached the system will automatically boot with the configured
|
||||
options
|
||||
|
||||
```
|
||||
AutoBoot in 3 Seconds (<esc> aborts, <enter> now)...
|
||||
```
|
||||
|
||||
Pressing `esc` - will bypass the auto boot process going immediately
|
||||
to the `Boot` prompt, or pressing `enter` - will proceed with autoboot
|
||||
immediately. Auto boot is configured using the `W` boot menu option.
|
||||
|
||||
If autoboot is bypassed (or not configured) the user is asked to
|
||||
select a boot device with the prompt:
|
||||
|
||||
```
|
||||
Boot [H=Help]:
|
||||
@@ -74,18 +88,23 @@ Furthermore, a ROM application may also be started from this prompt.
|
||||
This start-up process is described in some detailed in the RomWBW User Guide,
|
||||
and there is some overlap here.
|
||||
|
||||
## Help
|
||||
#### Help
|
||||
|
||||
After pressing H or ? at the boot prompt the user will be presented with
|
||||
the following list of available commands:
|
||||
|
||||
```
|
||||
L - List ROM Applications
|
||||
D - Device Inventory
|
||||
R - Reboot System
|
||||
I <u> [<c>] - Set Console Interface/Baud code
|
||||
V [<n>] - View/Set HBIOS Diagnostic Verbosity
|
||||
<u>[.<s>] - Boot Disk Unit/Slice
|
||||
Boot [H=Help]: H
|
||||
|
||||
L - List ROM Applications
|
||||
D - Device Inventory
|
||||
S - Slice Inventory
|
||||
R - Reboot System
|
||||
W - RomWBW Configure
|
||||
I <u> [<c>] - Set Console Interface/Baud code
|
||||
V [<n>] - View/Set HBIOS Diagnostic Verbosity
|
||||
N - Network Boot
|
||||
<u>[.<s>] - Boot Disk Unit/Slice
|
||||
```
|
||||
|
||||
The function performed by each command is described below:
|
||||
@@ -102,24 +121,45 @@ D:
|
||||
system was started.
|
||||
|
||||
|
||||
S:
|
||||
|
||||
: Displays the list of disk Slices that contain a label indicating that
|
||||
they may be bootable. See [SLABEL (Slice Label)] for more details about labels.
|
||||
|
||||
|
||||
R:
|
||||
|
||||
: Will restart the system. Note that this does not reset hardware devices
|
||||
in the same way that power-on or pressing the reset button would.
|
||||
|
||||
|
||||
W:
|
||||
|
||||
: Runs the [SYSCONF (System Configuration)] utility allowing RomWBW
|
||||
configuration stored in Non Volatile memory to be changed.
|
||||
|
||||
|
||||
I:
|
||||
|
||||
: Allows the user to select the interface connected to the console, and
|
||||
optionally the Baud rate. This could be used to allow the system to be
|
||||
operated from a second console.
|
||||
|
||||
|
||||
V:
|
||||
|
||||
: Enables the display of invalid RomWBW HBIOS API calls. This option
|
||||
is very unlikely to be used by a user and is used for development
|
||||
purposes.
|
||||
|
||||
|
||||
N:
|
||||
|
||||
: Boot into CP/M via an RCBus Wiznet MT011 network module if configured.
|
||||
Section 10 of the $doc_user$ provides complete instructions for setting
|
||||
up a CP/NET based network under RomWBW including network booting.
|
||||
|
||||
|
||||
And, finally, the system may be booted by specifying the unit number,
|
||||
and optional slice, separated by a period('.'), of where the disk operating
|
||||
system software is located - eg 2, 4.1, 5.3
|
||||
@@ -127,7 +167,7 @@ system software is located - eg 2, 4.1, 5.3
|
||||
Alternatively, a RomWBW ROM application may be started by pressing the appropriate
|
||||
key from the applications menu, shown in the following section.
|
||||
|
||||
## List ROM Applications
|
||||
#### List ROM Applications
|
||||
|
||||
If the user presses the L key at the Boot Loader prompt then the system will
|
||||
display the list of ROM applications that are built into RomWBW. If a command
|
||||
@@ -137,16 +177,19 @@ first displaying the menu.
|
||||
The ROM applications available from the boot prompt are:
|
||||
|
||||
```
|
||||
M: Monitor
|
||||
C: CP/M 2.2
|
||||
Z: Z-System
|
||||
B: BASIC
|
||||
T: Tasty BASIC
|
||||
F: Forth
|
||||
P: Play a Game
|
||||
N: Network Boot
|
||||
X: XModem Flash Updater
|
||||
U: User App
|
||||
Boot [H=Help]: L
|
||||
|
||||
ROM Applications:
|
||||
|
||||
M: Monitor
|
||||
Z: Z-System
|
||||
C: CP/M 2.2
|
||||
F: Forth
|
||||
B: BASIC
|
||||
T: Tasty BASIC
|
||||
P: Play a Game
|
||||
X: XModem Flash Updater
|
||||
U: User App
|
||||
```
|
||||
|
||||
Each of these will now be described in greater detail.
|
||||
@@ -168,11 +211,11 @@ language and there is no ability to save to persistent storage (disks).
|
||||
The available memory area for programming is `0100h-EDFFh`.
|
||||
The following areas are reserved:
|
||||
|
||||
Memory Area | Function
|
||||
------------|-----------------------------------
|
||||
`0000-00FFh`| Jump and restart (RST) vectors
|
||||
`EE00-FDFFh`| Monitor
|
||||
`FE00-FFFFh`| HBIOS proxy
|
||||
| Memory Area | Function |
|
||||
|----------------|---------------------------------|
|
||||
| `0000-00FFh` | Jump and restart (RST) vectors |
|
||||
| `EE00-FDFFh` | Monitor |
|
||||
| `FE00-FFFFh` | HBIOS proxy |
|
||||
|
||||
The monitor uses a prompt in the format of `xx>` where xx is the
|
||||
RomWBW bank id number. For example, the prompt may look like this
|
||||
@@ -198,7 +241,7 @@ allow selecting alternate banks.
|
||||
There now follows a more detailed guide to using the RomWBW
|
||||
Monitor program:
|
||||
|
||||
### Command Summary
|
||||
### Monitor Commands
|
||||
|
||||
**`?`** - Will display a summary of the available commands.
|
||||
|
||||
@@ -222,13 +265,13 @@ T xxxx - X-modem transfer to memory location xxxx
|
||||
X - Exit monitor
|
||||
```
|
||||
|
||||
### Cold Boot
|
||||
#### Cold Boot
|
||||
|
||||
**`B`** - Performs a cold boot of the RomWBW system. A complete
|
||||
re-initialization of the system is performed and the system
|
||||
returns to the Boot Loader prompt.
|
||||
|
||||
### Dump Memory
|
||||
#### Dump Memory
|
||||
|
||||
**`D xxxx [yyyy]`** - Dump memory from hex location xxxx to yyyy
|
||||
on the screen as lines of 16 hexadecimal bytes with their
|
||||
@@ -261,7 +304,7 @@ Example: `D 100 1FF`
|
||||
01F0: 01 C5 01 F0 F8 CF E5 26 00 0E 0A CD 39 02 7D 3C .Å.ðøÏå&...Í9.}<
|
||||
```
|
||||
|
||||
### Fill Memory
|
||||
#### Fill Memory
|
||||
|
||||
**`F xxxx yyyy zz`** - Fill memory from hex xxxx to yyyy with
|
||||
a single value of zz over the full range. The Dump command
|
||||
@@ -269,7 +312,7 @@ can be used to confirm that the fill completed as expected. A
|
||||
good way to zero out memory areas before writing machine data
|
||||
for debug purposes.
|
||||
|
||||
### Halt System
|
||||
#### Halt System
|
||||
|
||||
**`H`** - Halt system. A Z80 HALT instruction is executed. The
|
||||
system remains in the halt state until the system is
|
||||
@@ -277,20 +320,20 @@ physically rebooted. Interrupts will not restart the
|
||||
system. On systems that support a HALT status LED, the
|
||||
LED will be illuminated.
|
||||
|
||||
### Input from Port
|
||||
#### Input from Port
|
||||
|
||||
**`I xxxx`** - Input data from port xxxx and display to the screen.
|
||||
This command is used to read values from hardware I/O ports
|
||||
and display the contents in hexadecimal.
|
||||
|
||||
### Keyboard Echo
|
||||
#### Keyboard Echo
|
||||
|
||||
**`K`** - Echo any key-presses from the terminal. Press 'ESC' key
|
||||
to quit. This facility provides that any key stroke sent to
|
||||
the computer will be echoed back to the terminal. File down
|
||||
loads will be echoed as well while this facility is ‘on’.
|
||||
|
||||
### Load Hex
|
||||
#### Load Hex
|
||||
|
||||
**`L`** - Load a Intel Hex data via the terminal program.
|
||||
The load address is defined in the hex file of the
|
||||
@@ -304,21 +347,21 @@ Keep in mind that this will be transient unless the
|
||||
system supports battery backed memory. Saving to memory drive
|
||||
is not supported.
|
||||
|
||||
### Move Memory
|
||||
#### Move Memory
|
||||
|
||||
**`M xxxx yyyy zzzz`** - Move hex memory block xxxx to yyyy to
|
||||
memory starting at hex location zzzz. Care should be taken
|
||||
to insure that there is enough memory at the destination so
|
||||
that code does not get over-written or memory wrapped around.
|
||||
|
||||
### Output to Port
|
||||
#### Output to Port
|
||||
|
||||
**`O xxxx yy`** - Output data byte xx to port xxxx. This command is
|
||||
used to send hexadecimal values to hardware I/O ports to
|
||||
verify their operation and is the companion to the I operation.
|
||||
Use clip leaded LEDs to confirm the data written.
|
||||
|
||||
### Program Memory
|
||||
#### Program Memory
|
||||
|
||||
**`P xxxx`** - Program memory location xxxx. This routine will
|
||||
allow you to program a hexadecimal value 'into memory starting
|
||||
@@ -333,7 +376,7 @@ remote computer.
|
||||
An excellent online resource for looking up opcodes for entry
|
||||
can be found here: <https://clrhome.org/table>.
|
||||
|
||||
### Run Program
|
||||
#### Run Program
|
||||
|
||||
**`R xxxx [[yy] [zzzz]]`** - Run program at location xxxx. If optional
|
||||
arguments yy and zzzz are entered they are loaded into the
|
||||
@@ -342,7 +385,7 @@ Monitor is saved on the stack so the program can return
|
||||
to the monitor. On return to the monitor, the contents of
|
||||
the A, HL, DE and BC registers are displayed.
|
||||
|
||||
### Set Bank
|
||||
#### Set Bank
|
||||
|
||||
**`S xx`** - Set the physical memory bank to the RomWBW Bank Id
|
||||
indicated by xx. Memory addresses
|
||||
@@ -367,12 +410,12 @@ Section 4 of the $doc_sys$ provides detail on how Bank Ids map to the
|
||||
physical memory of the system and also how specific banks are utilized
|
||||
by RomWBW.
|
||||
|
||||
### Undo Bank
|
||||
#### Undo Bank
|
||||
|
||||
**`U`** - Change the bank in memory back to the previously selected bank.
|
||||
This command should be used in conjunction with the S command.
|
||||
|
||||
### X-Modem Transfer
|
||||
#### X-Modem Transfer
|
||||
|
||||
**`T xxxx`** - Receive an X-modem file transfer and load it into
|
||||
memory starting at location xxxx.
|
||||
@@ -380,116 +423,10 @@ memory starting at location xxxx.
|
||||
128 byte blocks and checksum mode is the only supported
|
||||
protocol.
|
||||
|
||||
### Exit Monitor
|
||||
#### Exit Monitor
|
||||
|
||||
**`X`** - Exit the monitor program back to the main boot menu.
|
||||
|
||||
## RomWBW System Configuration
|
||||
|
||||
System Configuration (`SYSCONF`) is a utility that allows system configuration to
|
||||
be set, dynamically and stored in NVRAM provided by an RTC chip.
|
||||
|
||||
(`SYSCONF`) is both a ROM application ('W' Menu option), and a CP/M utility.
|
||||
Noting however the CP/M utility is not included on an disk image, it is found in
|
||||
the `Binary/Applications` folder of the RomWBW distribution.
|
||||
|
||||
The $doc_user$ has additional information on the use of NVRAM to set your
|
||||
system configuration.
|
||||
|
||||
### Basic Operation
|
||||
|
||||
The application is an interactive application; it does not have a command line syntax.
|
||||
Instead commands are executed from within the application in a command line structure.
|
||||
|
||||
When you first start the (`SYSCONF`) utility it will display the current switches
|
||||
followed by a command listing.
|
||||
|
||||
When you first run the (`SYSCONF`) utility the NVRAM will be uninitialised, and can
|
||||
be initialised using the (R)eset command, which writes default values to NVRAM.
|
||||
|
||||
Updates are done immediately to NVRAM as you enter them, i.e. there is no confirm
|
||||
changes step. If you make any incorrect changes, you simply need to enter a new
|
||||
command to set the Switch value correctly.
|
||||
|
||||
Once a change has been made it is available, however it may not take effect until
|
||||
the next system reboot. This is dependent on the Switch itself.
|
||||
|
||||
If no NVRAM is provided by your hardware, then running this application will just
|
||||
report the missing hardware and exit immediately.
|
||||
|
||||
To exit from the application use the (Q)uit command.
|
||||
|
||||
### Commands and Syntax
|
||||
|
||||
The following are the accepted commands, unless otherwise specified a "Space"
|
||||
character is used to delimit parameters in the command.
|
||||
|
||||
| Command | Argument(s) | Description |
|
||||
|------------|------------------|-----------------------------------------------|
|
||||
| (P)rint | -none- | Display a list of the current switch value(s) |
|
||||
| (S)et | {SW} {val},... | Sets an Switch {SW} with specific values(s) |
|
||||
| (R)eset | -none- | Reset all setting to default |
|
||||
| (H)elp | {SW} | Provides help on the syntax (values) |
|
||||
| (Q)uit | -none- | Exit the application |
|
||||
|
||||
**Where**
|
||||
|
||||
| Argument | Description |
|
||||
|-----------|----------------------------------------------------------------------|
|
||||
| {SW} | Switch ID, typically this is 2 character name to identify the switch |
|
||||
| {val},... | a "Comma" separated list of values to set into the switch |
|
||||
|
||||
### Switch Options
|
||||
|
||||
#### Auto Boot (AB)
|
||||
|
||||
This switch will define if the system will perform auto boot at the RomWBW boot prompt.
|
||||
Enabling this will not prevent a user from typing a boot command, so long as the timeout is not
|
||||
exceeded. When configured this replaces the (`AUTO_CMD`) variable
|
||||
defined in build configuration.
|
||||
|
||||
Making changes to auto boot has no affect until the next reboot.
|
||||
|
||||
**Arguments**
|
||||
|
||||
| Type | Arguments | Description |
|
||||
|----------|------------|--------------------------------------------------------|
|
||||
| Enable | 'E' | Auto Boot. eg. "E,10" will auto boot, after 10 seconds |
|
||||
| | Timout | Timeout in seconds in the range 0-15, 0 = immediate |
|
||||
| Disabled | 'D' | No Auto Boot. e.g. "D" will disable autoboot |
|
||||
|
||||
**Examples**
|
||||
|
||||
| Command | Description |
|
||||
|-----------------------|---------------------------------------------------|
|
||||
| S AB E,10 | Enable Auto Boot with 10 second delay |
|
||||
| S AB D | Disable Auto Boot |
|
||||
|
||||
#### Boot Options (BO)
|
||||
|
||||
This switch will define the boot command to be executed when auto boot is
|
||||
enabled. When configured this replaces the (`AUTO_CMD`) variable
|
||||
defined in the ROM build configuration.
|
||||
|
||||
Making changes to boot options has no affect until the next reboot.
|
||||
|
||||
**Arguments**
|
||||
|
||||
| Type | Arguments | Description |
|
||||
|------|------------------|----------------------------------------------------------|
|
||||
| Disk | 'D' | Disk Boot. eg. "D,2,14" will boot, disk unit 2, slice 14 |
|
||||
| | Disk Unit Number | Unit number in the range 0-127 |
|
||||
| | Disk Slice | Slice in the range 0-255, use 0 for floppy boot |
|
||||
| ROM | 'R' | ROM App. e.g. "R,M" will boot the Monitor App |
|
||||
| | Rom App Name | single character used on the Menu to identify the app |
|
||||
|
||||
**Examples**
|
||||
|
||||
| Command | Description |
|
||||
|-------------|----------------------------------------------------------|
|
||||
| S BO D,2,14 | Set the default boot from Disk; Unit 2, Slice 14 |
|
||||
| S BO R,M | Set the default boot to be the (M)onitor Rom Application |
|
||||
|
||||
## CP/M 2.2
|
||||
|
||||
This option will boot the CP/M 2.2 disk operating system
|
||||
@@ -624,15 +561,15 @@ above.
|
||||
|
||||
### Structure of Forth source files
|
||||
|
||||
File | Description
|
||||
--------------|-----------------------------
|
||||
camel80.azm | Code Primitives
|
||||
camel80d.azm | CPU Dependencies
|
||||
camel80h.azm | High Level words
|
||||
camel80r.azm | RomWBW additions
|
||||
glosshi.txt | Glossary of high level words
|
||||
glosslo.txt | Glossary of low level words
|
||||
glossr.txt | Glossary of RomWBW additions
|
||||
| File | Description |
|
||||
|--------------|------------------------------|
|
||||
| camel80.azm | Code Primitives |
|
||||
| camel80d.azm | CPU Dependencies |
|
||||
| camel80h.azm | High Level words |
|
||||
| camel80r.azm | RomWBW additions |
|
||||
| glosshi.txt | Glossary of high level words |
|
||||
| glosslo.txt | Glossary of low level words |
|
||||
| glossr.txt | Glossary of RomWBW additions |
|
||||
|
||||
### RomWBW Additions
|
||||
|
||||
@@ -648,19 +585,17 @@ Extensions and changes to this implementation compared to the original distribut
|
||||
- James Bowman's double precision words have been added from his RC2014 version:
|
||||
<https://github.com/jamesbowman/camelforth-z80>.
|
||||
|
||||
Word | Syntax | Description
|
||||
--------|----------------------------|---------------------------------
|
||||
D+ | d1 d2 -- d1+d2 | Add double numbers
|
||||
2>R | d -- | 2 to R
|
||||
2R> | d -- | fetch 2 from R
|
||||
M*/ | d1 n2 u3 -- d=(d1*n2)/u3 | double precision mult. div
|
||||
SVC | hl de bc n -- hl de bc af | Execute a RomWBW function
|
||||
P! | n p -- | Write a byte to a I/O port
|
||||
P@ | p -- n | Read a byte from and I/O port
|
||||
| Word | Syntax | Description |
|
||||
|------|----------------------------|-------------------------------|
|
||||
| D+ | d1 d2 -- d1+d2 | Add double numbers |
|
||||
| 2>R | d -- | 2 to R |
|
||||
| 2R> | d -- | fetch 2 from R |
|
||||
| M*/ | d1 n2 u3 -- d=(d1*n2)/u3 | double precision mult. div |
|
||||
| SVC | hl de bc n -- hl de bc af | Execute a RomWBW function |
|
||||
| P! | n p -- | Write a byte to a I/O port |
|
||||
| P@ | p -- n | Read a byte from and I/O port |
|
||||
|
||||
## Play a Game
|
||||
|
||||
### 2048
|
||||
## Play a Game (2048)
|
||||
|
||||
2048 is a puzzle game that can be both mindless and challenging. It
|
||||
appears deceptively simple but failure can creep up on you suddenly.
|
||||
@@ -735,44 +670,40 @@ This is how I lost this game:
|
||||
|
||||
Press Q at any time to bring up the option to Quit or Restart the game.
|
||||
|
||||
## Network Boot
|
||||
|
||||
If your RomWBW system is equipped with an RCBus MT011 module, it is
|
||||
possible to boot into CP/M 2.2 directly from a CP/NET network server.
|
||||
This means that the operating system will be loaded directly from the
|
||||
network server and all of your drive letters will be provided by the
|
||||
network server.
|
||||
|
||||
This function requires substantial knowledge of CP/NET and it's
|
||||
implementation within RomWBW. Section 10 of the $doc_user$ provides
|
||||
complete instructions for setting up a CP/NET based network under RomWBW
|
||||
including a section on network booting.
|
||||
|
||||
## Xmodem Flash Updater
|
||||
|
||||
The RomWBW Xmodem flash updater provides the capability to update RomWBW from the boot loader using an x-modem file transfer. It offers similar capabilities to Will Sowerbutts FLASH4 utility except that the flashing process occurs during the file transfer.
|
||||
The RomWBW Xmodem flash updater provides the capability to update RomWBW
|
||||
from the boot loader using an x-modem file transfer. It offers similar
|
||||
capabilities to Will Sowerbutts FLASH4 utility except that the flashing
|
||||
process occurs during the file transfer.
|
||||
|
||||
These are the key differences between the two methods are:
|
||||
|
||||
Xmodem Flash Updater | FLASH.COM (aka FLASH4)
|
||||
--------------------------------|-----------------
|
||||
Available from the boot loader | Well proven and tested
|
||||
Xmodem transfer is integrated | Wider range of supported chips and hardware
|
||||
Integrated checksum utilities | Wider range of supported platforms
|
||||
Capability to copy a ROM image | Only reprograms sectors that have changed
|
||||
More convenient one step process | Ability save and verify ROM images
|
||||
No intermediate storage required | Progress display while flashing
|
||||
. | Displays chip identification information
|
||||
. | Faster file transfer
|
||||
| Xmodem Flash Updater | FLASH.COM (aka FLASH4) |
|
||||
|----------------------------------|----------------------------------------------|
|
||||
| Available from the boot loader | Well proven and tested |
|
||||
| Xmodem transfer is integrated | Wider range of supported chips and hardware |
|
||||
| Integrated checksum utilities | Wider range of supported platforms |
|
||||
| Capability to copy a ROM image | Only reprograms sectors that have changed |
|
||||
| More convenient one step process | Ability save and verify ROM images |
|
||||
| No intermediate storage required | Progress display while flashing |
|
||||
| . | Displays chip identification information |
|
||||
| . | Faster file transfer |
|
||||
|
||||
The major disadvantages of the Updater is that it is new and relatively untested. There is the risk that a failed transfer will result in a partially flashed and unbootable ROM. There are some limitations on serial transfer speeds.
|
||||
The major disadvantages of the Updater is that it is new and relatively
|
||||
untested. There is the risk that a failed transfer will result in a
|
||||
partially flashed and unbootable ROM. There are some limitations on
|
||||
serial transfer speeds.
|
||||
|
||||
The updater utility was initially intended to support the Retrobrew SBC-V2-005 platform using Atmel 39SF040 flash chips but has now been extended to be more generic in operation.
|
||||
The updater utility was initially intended to support the Retrobrew SBC-V2-005
|
||||
platform using Atmel 39SF040 flash chips but has now been extended to be
|
||||
more generic in operation.
|
||||
|
||||
Supported flash chips are
|
||||
39SF040, 29F040, AT49F040, AT29C040, M29F040 , MX29F040, A29010B, A29040B
|
||||
|
||||
The Atmel 39SF040 chip is recommended as it can erase and write 4Kb sectors. Other chips require the whole chip to be erased.
|
||||
The Atmel 39SF040 chip is recommended as it can erase and write 4Kb sectors.
|
||||
Other chips require the whole chip to be erased.
|
||||
|
||||
### Usage
|
||||
|
||||
@@ -784,24 +715,40 @@ In most cases, completing a ROM update is a simple as:
|
||||
4. Initiating an X-modem transfer of your ROM image on your console device
|
||||
5. Selecting option R - Reboot
|
||||
|
||||
If your console device is not able to transfer a ROM image i.e. your console is a VDU then you will have to use the console options to identify which character-input/output device is to be used as the serial device for transfer.
|
||||
If your console device is not able to transfer a ROM image i.e. your console
|
||||
is a VDU then you will have to use the console options to identify which
|
||||
character-input/output device is to be used as the serial device for transfer.
|
||||
|
||||
When your console is the serial device used for the transfer, no progress information is displayed as this would disrupt the x-modem file transfer. If you use an alternate character-input/output devices as the serial device for the transfer then progress information will be displayed on the console device.
|
||||
When your console is the serial device used for the transfer, no progress
|
||||
information is displayed as this would disrupt the x-modem file transfer.
|
||||
If you use an alternate character-input/output devices as the serial device
|
||||
for the transfer then progress information will be displayed on the console device.
|
||||
|
||||
Due to different platform processor speeds, serials speeds and flow control capabilities the default console or serial device speed may need to be reduced for a successful transfer and flash to occur. The **Set Console Interface/Baud code** option at the Boot Loader can be used to change the speed if required. Additionally, the Updater has options to set to and revert from a recommended speed.
|
||||
Due to different platform processor speeds, serials speeds and flow
|
||||
control capabilities the default console or serial device speed may
|
||||
need to be reduced for a successful transfer and flash to occur.
|
||||
The **Set Console Interface/Baud code** option at the Boot Loader can
|
||||
be used to change the speed if required. Additionally, the Updater has
|
||||
options to set to and revert from a recommended speed.
|
||||
|
||||
See the RomWBW Applications guide for additional information on performing upgrades.
|
||||
|
||||
### Console Options
|
||||
|
||||
Option ( C ) - Set Console Device
|
||||
|
||||
Option ( S ) - Set Serial Device
|
||||
|
||||
By default the updater assumes that the current console is a serial device and that the ROM file to be flashed will also be transferred across this device, so the Console and Serial device are both the same.
|
||||
By default the updater assumes that the current console is a serial device
|
||||
and that the ROM file to be flashed will also be transferred across this
|
||||
device, so the Console and Serial device are both the same.
|
||||
|
||||
Either device can be can be change to another character-input/output device but the updater will always expect to receive the x-modem transfer on the **Serial Device**
|
||||
Either device can be can be change to another character-input/output
|
||||
device but the updater will always expect to receive the x-modem
|
||||
transfer on the **Serial Device**
|
||||
|
||||
The advantage of transferring on a different device to the console is that progress information can be displayed during the transfer.
|
||||
The advantage of transferring on a different device to the console
|
||||
is that progress information can be displayed during the transfer.
|
||||
|
||||
Option ( > ) - Set Recommended Baud Rate
|
||||
|
||||
@@ -870,21 +817,32 @@ load CP/M and perform the normal x-modem / flash process to recover.
|
||||
Option ( 1 ) and ( 2 ) - Calculate and display CRC32 of 1st or 2nd 512k ROM.
|
||||
Option ( 3 ) - Calculate and display CRC32 of a 1024k (2x512Kb) ROM.
|
||||
|
||||
Can be used to verify if a ROM image has been transferred and flashed correctly. Refer to the Tera Term section below for details on configuring the automatic display of a files CRC after it has been transferred.
|
||||
Can be used to verify if a ROM image has been transferred and flashed
|
||||
correctly. Refer to the Tera Term section below for details on
|
||||
configuring the automatic display of a files CRC after it has been
|
||||
transferred.
|
||||
|
||||
In Windows, right clicking on a file should also give you a context menu option CRC SHA which will allow you to select a CRC32 calculation to be done on the selected file.
|
||||
In Windows, right clicking on a file should also give you a context
|
||||
menu option CRC SHA which will allow you to select a CRC32 calculation
|
||||
to be done on the selected file.
|
||||
|
||||
### Tera Term macro configuration
|
||||
|
||||
Macros are a useful tool for automatic common tasks. There are a number of instances where using macros to facilitate the update process could be worthwhile if you are:
|
||||
Macros are a useful tool for automatic common tasks. There are a
|
||||
number of instances where using macros to facilitate the update
|
||||
process could be worthwhile if you are:
|
||||
|
||||
* Following the RomWBW development builds.
|
||||
* Doing lots of configuration changes.
|
||||
* Doing development on RomWBW drivers
|
||||
|
||||
Macros can be used to automate sending ROM updates or images and for my own purposed I have set up a separate macro for transferring each of the standard build ROM, my own custom configuration ROM and update ROM.
|
||||
Macros can be used to automate sending ROM updates or images and
|
||||
for my own purposed I have set up a separate macro for transferring
|
||||
each of the standard build ROM, my own custom configuration ROM
|
||||
and update ROM.
|
||||
|
||||
An example macro file to send an *.upd file, using checksum mode and display the crc32 value of the transmitted file:
|
||||
An example macro file to send an *.upd file, using checksum mode
|
||||
and display the crc32 value of the transmitted file:
|
||||
|
||||
```
|
||||
Xmodem send, checksum, display crc32
|
||||
@@ -896,39 +854,45 @@ messagebox inputstr 'crc32'
|
||||
|
||||
### Serial speed guidelines
|
||||
|
||||
As identified in the introduction, there are limitations on serial speed depending on processor speed and flow control settings. Listed below are some of the results identified during testing.
|
||||
As identified in the introduction, there are limitations on serial
|
||||
speed depending on processor speed and flow control settings.
|
||||
Listed below are some of the results identified during testing.
|
||||
|
||||
Configuration | Processor Speed | Maximum Serial Speed
|
||||
-----------------------|-----------------|---------------------
|
||||
UART no flow control | 2MHz | 9600
|
||||
UART no flow control | 4MHz | 19200
|
||||
UART no flow control | 5MHz | 19200
|
||||
UART no flow control | 8MHz | 38400
|
||||
UART no flow control | 10MHz | 38400
|
||||
USB-fifo 2MHz+ | | n/a
|
||||
ASCI no flow control | 18.432MHz | 9600
|
||||
ASCI with flow control | 18.432MHz | 38400
|
||||
| Configuration | Processor Speed | Maximum Serial Speed |
|
||||
|------------------------|-----------------|----------------------|
|
||||
| UART no flow control | 2MHz | 9600 |
|
||||
| UART no flow control | 4MHz | 19200 |
|
||||
| UART no flow control | 5MHz | 19200 |
|
||||
| UART no flow control | 8MHz | 38400 |
|
||||
| UART no flow control | 10MHz | 38400 |
|
||||
| USB-fifo | 2MHz+ | n/a |
|
||||
| ASCI no flow control | 18.432MHz | 9600 |
|
||||
| ASCI with flow control | 18.432MHz | 38400 |
|
||||
|
||||
The **Set Recommend Baud Rate** option in the Updater menu follows the following guidelines.
|
||||
|
||||
Processor Speed | Baud Rate
|
||||
----------------|----------
|
||||
1MHz | 4800
|
||||
2-3MHz | 9600
|
||||
4-7MHz | 19200
|
||||
8-20MHz | 38400
|
||||
| Processor Speed | Baud Rate |
|
||||
|-----------------|-----------|
|
||||
| 1MHz | 4800 |
|
||||
| 2-3MHz | 9600 |
|
||||
| 4-7MHz | 19200 |
|
||||
| 8-20MHz | 38400 |
|
||||
|
||||
These can be customized in the updater.asm source code in the CLKTBL table if desired.
|
||||
Feedback to the RomWBW developers on these guidelines would be appreciated.
|
||||
|
||||
### Notes
|
||||
|
||||
All testing was done with Tera Term x-modem, Forcing checksum mode using macros was found to give the most reliable transfer.
|
||||
Partial writes can be completed with 39SF040 chips. Other chips require entire flash to be erased before being written.
|
||||
An SBC V2-005 MegaFlash or Z80 MBC required for 1mb flash support. The Updater assumes both chips are same type
|
||||
Failure handling has not been tested.
|
||||
Timing broadly calibrated on a Z80 SBC-v2
|
||||
Unabios not supported
|
||||
Notes
|
||||
* All testing was done with Tera Term x-modem, Forcing checksum mode
|
||||
using macros was found to give the most reliable transfer.
|
||||
* Partial writes can be completed with 39SF040 chips. Other chips
|
||||
require entire flash to be erased before being written.
|
||||
* An SBC V2-005 MegaFlash or Z80 MBC required for 1mb flash support.
|
||||
The Updater assumes both chips are same type
|
||||
* Failure handling has not been tested.
|
||||
* Timing broadly calibrated on a Z80 SBC-v2
|
||||
* Unabios not supported
|
||||
|
||||
## User Application
|
||||
|
||||
@@ -1368,6 +1332,11 @@ Use `CLRDIR` with caution as changes made to disks by `CLRDIR` cannot be undone.
|
||||
If `CLRDIR` is used on disk containing data then the directory area will be
|
||||
reinitialised and the data previously stored will be lost.
|
||||
|
||||
**WARNING**: Earlier versions of the `CLRDIR` application do not
|
||||
appear to check for disk errors when it runs. If you attempt to run
|
||||
`CLRDIR` on a drive that is mapped to a slice that does not actually fit
|
||||
on the physical disk, it may behave erratically.
|
||||
|
||||
`\clearpage`{=latex}
|
||||
|
||||
## CPUSPD (CPU Speed)
|
||||
@@ -1467,7 +1436,7 @@ The source code is provided in the RomWBW distribution.
|
||||
The purpose of this utility is to allow the copying of whole disk slices
|
||||
from one disk slice to another slice
|
||||
|
||||
This tool is only supported by RomWBW HBIOS, it uses HDIOS for all its
|
||||
This tool is only supported by RomWBW HBIOS, it uses HBIOS for all its
|
||||
disk IO. UNA UBIOS is not supported by this tool.
|
||||
|
||||
This tool is running on CP/M 2.2 or 3.0 and has access to full 64kb of
|
||||
@@ -2192,6 +2161,146 @@ discover ports that are 'write-only'.
|
||||
|
||||
`\clearpage`{=latex}
|
||||
|
||||
## SYSCONF (System Configuration)
|
||||
|
||||
| SYSCONF | |
|
||||
| --------------------|---|
|
||||
| ROM-based |Yes|
|
||||
| Disk-based |Yes|
|
||||
|
||||
System Configuration (`SYSCONF`) is a utility that allows system configuration to
|
||||
be set, dynamically and stored in NVRAM provided by an RTC chip.
|
||||
|
||||
(`SYSCONF`) is both a ROM utility ('W' Menu option), and a CP/M application.
|
||||
Noting however the CP/M application is not included on an disk image, it is found in
|
||||
the `Binary/Applications` folder of the RomWBW distribution.
|
||||
|
||||
The section "Setting NVRAM Options" in the $doc_user$ has additional information
|
||||
on the use of NVRAM to set your system configuration.
|
||||
|
||||
#### Syntax
|
||||
|
||||
The application is an interactive application; it does not have a command line syntax.
|
||||
Instead commands are executed from within the application in a command line structure.
|
||||
`SYSCONF` command takes no arguments.
|
||||
|
||||
| `SYSCONF`
|
||||
|
||||
#### Usage
|
||||
|
||||
When you first start the (`SYSCONF`) utility it will display the current switches
|
||||
followed by a command listing. e.g.
|
||||
|
||||
```
|
||||
RomWBW System Config Utility
|
||||
|
||||
Current Configuration:
|
||||
[BO] / Boot Options: ROM (App = "H")
|
||||
[AB] / Auto Boot: Disabled
|
||||
|
||||
Commands:
|
||||
(P)rint - Display Current settings
|
||||
(S)et {SW} {val}[,{val}[,{val}]]- Set a switch value(s)
|
||||
(R)eset - Init NVRAM to Defaults
|
||||
(H)elp [{SW}] - This help menu, or help on a switch
|
||||
e(X)it - Exit Configuration
|
||||
|
||||
$
|
||||
```
|
||||
|
||||
When you run (`SYSCONF`) for the first time the NVRAM will be uninitialised, and can
|
||||
be initialised using the (R)eset command, which writes default values to NVRAM.
|
||||
|
||||
Updates are done immediately to NVRAM as you enter them, i.e. there is no confirm
|
||||
changes step. If you make any incorrect changes, you simply need to enter a new
|
||||
command to set the Switch value correctly.
|
||||
|
||||
Once a change has been made it is available, however it may not take effect until
|
||||
the next system reboot. This is dependent on the Switch itself.
|
||||
|
||||
If no NVRAM is provided by your hardware, then running this application will just
|
||||
report the missing hardware and exit immediately.
|
||||
|
||||
To exit from the application use the (Q)uit command.
|
||||
|
||||
#### Commands and Syntax
|
||||
|
||||
The following are the accepted commands, unless otherwise specified a "Space"
|
||||
character is used to delimit parameters in the command.
|
||||
|
||||
| Command | Argument(s) | Description |
|
||||
|-----------|------------------|-----------------------------------------------|
|
||||
| (P)rint | -none- | Display a list of the current switch value(s) |
|
||||
| (S)et | {SW} {val},... | Sets an Switch {SW} with specific values(s) |
|
||||
| (R)eset | -none- | Reset all setting to default |
|
||||
| (H)elp | {SW} | Provides help on the syntax (values) |
|
||||
| e(X)it | -none- | Exit the application |
|
||||
|
||||
**Where**
|
||||
|
||||
| Argument | Description |
|
||||
|-----------|----------------------------------------------------------------------|
|
||||
| {SW} | Switch ID, typically this is 2 character name to identify the switch |
|
||||
| {val},... | a "Comma" separated list of values to set into the switch |
|
||||
|
||||
#### Switch Options
|
||||
|
||||
#### Auto Boot (AB)
|
||||
|
||||
This switch will define if the system will perform auto boot at the RomWBW boot prompt.
|
||||
Enabling this will not prevent a user from typing a boot command, so long as the timeout is not
|
||||
exceeded. When configured this replaces the (`AUTO_CMD`) variable
|
||||
defined in build configuration.
|
||||
|
||||
Making changes to auto boot has no affect until the next reboot.
|
||||
|
||||
**Arguments**
|
||||
|
||||
| Type | Arguments | Description |
|
||||
|----------|------------|--------------------------------------------------------|
|
||||
| Enable | 'E' | Auto Boot. eg. "E,10" will auto boot, after 10 seconds |
|
||||
| | Timout | Timeout in seconds in the range 0-15, 0 = immediate |
|
||||
| Disabled | 'D' | No Auto Boot. e.g. "D" will disable autoboot |
|
||||
|
||||
**Examples**
|
||||
|
||||
| Command | Description |
|
||||
|-----------------------|---------------------------------------------------|
|
||||
| S AB E,10 | Enable Auto Boot with 10 second delay |
|
||||
| S AB D | Disable Auto Boot |
|
||||
|
||||
#### Boot Options (BO)
|
||||
|
||||
This switch will define the boot command to be executed when auto boot is
|
||||
enabled. When configured this replaces the (`AUTO_CMD`) variable
|
||||
defined in the ROM build configuration.
|
||||
|
||||
Making changes to boot options has no affect until the next reboot.
|
||||
|
||||
**Arguments**
|
||||
|
||||
| Type | Arguments | Description |
|
||||
|------|------------------|----------------------------------------------------------|
|
||||
| Disk | 'D' | Disk Boot. eg. "D,2,14" will boot, disk unit 2, slice 14 |
|
||||
| | Disk Unit Number | Unit number in the range 0-127 |
|
||||
| | Disk Slice | Slice in the range 0-255, use 0 for floppy boot |
|
||||
| ROM | 'R' | ROM App. e.g. "R,M" will boot the Monitor App |
|
||||
| | Rom App Name | single character used on the Menu to identify the app |
|
||||
|
||||
**Examples**
|
||||
|
||||
| Command | Description |
|
||||
|-------------|----------------------------------------------------------|
|
||||
| S BO D,2,14 | Set the default boot from Disk; Unit 2, Slice 14 |
|
||||
| S BO R,M | Set the default boot to be the (M)onitor Rom Application |
|
||||
|
||||
#### Etymology
|
||||
|
||||
The `SYSCONF` utility is an original product specific to RomWBW, source code is included.
|
||||
`SYSCONF` was contributed by Mark Pruden.
|
||||
|
||||
`\clearpage`{=latex}
|
||||
|
||||
## SYSCOPY (System Copy)
|
||||
|
||||
| SYSCOPY | |
|
||||
@@ -2850,17 +2959,17 @@ emulation software for specific instructions on how to use XModem.
|
||||
|
||||
#### Notes
|
||||
|
||||
The ZMP adaptation that comes with RomWBW will default to using
|
||||
The ZMD adaptation that comes with RomWBW will default to using
|
||||
the current HBIOS console port for transfers. Note that if you
|
||||
change your console port at the OS level (e.g., STAT CON:=UC1:),
|
||||
this does not change the HBIOS console.
|
||||
|
||||
`ZMP` attempts to determine the best way to drive the serial port based
|
||||
`ZMD` attempts to determine the best way to drive the serial port based
|
||||
on your hardware configuration. When possible, it will bypass the
|
||||
HBIOS for faster operation. However, in many cases, it will use HBIOS
|
||||
so that flow control can be used.
|
||||
|
||||
`ZMP` is dependent on a reliable communications channel. You must
|
||||
`ZMD` is dependent on a reliable communications channel. You must
|
||||
ensure that the serial port can be serviced fast enough by either
|
||||
using a baud rate that is low enough or ensuring that hardware flow
|
||||
control is fully functional (end to end).
|
||||
|
||||
@@ -729,6 +729,7 @@ distribution. Some provide command line help themselves. Some are fairly obvio
|
||||
| `CRUNCH28.CFG` | | ZCNFG configuration file for CRUNCH & UNCR |
|
||||
| `DDTZ.COM` | | Z80 debug tool (modified to use RST 6) |
|
||||
| `DDTZ.DOC` | | Documentation for DDTZ |
|
||||
| `DOWNLOAD.COM` | Grant Searle | Grant Searle's DOWNLOAD, used by File Packager |
|
||||
| `EX.COM` | | Batch file processor (alternative to DRI SUBMIT) |
|
||||
| `FIND.COM` | Jay Cotton | Search all drives for a file () |
|
||||
| `GENHEX.COM` | | Generates an Intel Hex file from the input file |
|
||||
@@ -769,7 +770,7 @@ distribution. Some provide command line help themselves. Some are fairly obvio
|
||||
|
||||
## OS General Files
|
||||
|
||||
The following files are spcific files share across several OS's.
|
||||
The following files are specific files shared across several OS's.
|
||||
In general, there is no documentation for these applications included with
|
||||
the RomWBW distribution. Some provide command line help themselves.
|
||||
Some are fairly obvious.
|
||||
@@ -788,6 +789,7 @@ The following files are found in
|
||||
| `COPY.COM` | Z | File copier with ZSDOS date stamping awareness |
|
||||
| `COPY.CFG` | Z | ZCNFG configuration file for COPY application |
|
||||
| `EDITNDR.COM` | Z3 | Edit named directory register in memory. |
|
||||
| `HELLO.ASM` | CPM22 | Sample assembly language source file |
|
||||
| `HP-RPN.HLP` | Z3 | Help File for ZP.COM - HP RPN Calculators |
|
||||
| `HP-ZP.HLP` | Z3 | Help File for ZP.COM - HP ZP Calculators |
|
||||
| `KERCPM22.COM` | CPM22 | Kermit communication application |
|
||||
@@ -1121,7 +1123,7 @@ The following files are found in
|
||||
| `TESTAS.SUB` | SUBMIT file to build TESTAS sample program |
|
||||
| `Z80AS.COM` | Z80 assembler which assembles the output of COWFIX and other Z80 source files (see <https://github.com/Laci1953/Z80AS>) |
|
||||
|
||||
## Microsoft Fortran 80 (Fortran)
|
||||
## Microsoft Fortran 80
|
||||
|
||||
| Floppy Disk Image: **fd_fortran.img**
|
||||
| Hard Disk Image: **hd_fortran.img**
|
||||
@@ -1237,6 +1239,7 @@ The following files are found in
|
||||
| `DRTCPM.OBJ` | Startup Object File (???) |
|
||||
| `EXEC.H` | Language include file (see manual) |
|
||||
| `FLOAT.H` | Language include file (see manual) |
|
||||
| `HELLO.C` | Sample C source file |
|
||||
| `HITECH.H` | Language include file (see manual) |
|
||||
| `LIBC.LIB` | Standard C Runtime Library |
|
||||
| `LIBF.LIB` | Floating Point Library |
|
||||
@@ -1267,6 +1270,107 @@ The following files are found in
|
||||
| `UNIXIO.H` | Language include file (see manual) |
|
||||
| `ZAS.COM` | The assembler - in fact a general purpose macro assembler |
|
||||
|
||||
## Infocom (Text Adventure Games)
|
||||
|
||||
| Hard Disk Image: **hd_infocom.img**
|
||||
|
||||
A collection of all Official releases of the interactive fiction games
|
||||
produced by Infocom in the 1980's
|
||||
|
||||
The following files are found in
|
||||
|
||||
* /Source/Images/d_infocom
|
||||
|
||||
| **File** | **Description** |
|
||||
|--------------|----------------------------------------------------|
|
||||
| amfv.z4 | A Mind Forever Voyaging (*) |
|
||||
| arthur.z6 | Arthur - The Quest for Excalibur (*) |
|
||||
| ballyhoo.z3 | Ballyhoo |
|
||||
| beyond.z5 | Beyond Zork (*) |
|
||||
| border.z5 | Border Zone (*) |
|
||||
| bureau.z4 | Bureaucracy (*) |
|
||||
| cutthr.z3 | Cutthroats |
|
||||
| deadline.z3 | Deadline |
|
||||
| enchant.z3 | Enchanter |
|
||||
| h2g2.z3 | The Hitchhiker's Guide to the Galaxy |
|
||||
| hollyw.z3 | Hollywood Hijinx |
|
||||
| infidel.z3 | Infidel |
|
||||
| journey.z6 | Journey (*) |
|
||||
| leather.z3 | Leather Goddesses of Phobos |
|
||||
| lurking.z3 | The Lurking Horror |
|
||||
| moonmist.z3 | Moonmist |
|
||||
| nordbert.z4 | Nord and Bert Couldn't Make Head or Tail of It (*) |
|
||||
| planet.z3 | Planetfall |
|
||||
| plunder.z3 | Plundered Hearts |
|
||||
| readme.txt | Documentation about the Infocom games |
|
||||
| seastalk.z3 | Seastalker |
|
||||
| sherlock.z5 | Sherlock (*) |
|
||||
| shogun.z6 | Shogun (*) |
|
||||
| sorcerer.z3 | Sorcerer |
|
||||
| spellb.z3 | Spellbreaker |
|
||||
| starcros.z3 | Starcross |
|
||||
| stationf.z3 | Stationfall |
|
||||
| suspect.z3 | Suspect |
|
||||
| suspend.z3 | Suspended |
|
||||
| trinity.z4 | Trinity (*) |
|
||||
| wishb.z3 | Wishbringer |
|
||||
| witness.z3 | Witness |
|
||||
| zork0.z6 | Zork Zero (*) |
|
||||
| zork1.z3 | Zork I |
|
||||
| zork2.z3 | Zork II |
|
||||
| zork3.z3 | Zork III |
|
||||
| zorknote.txt | Documentation about terminal config of COM files |
|
||||
|
||||
The above games have been curated from here <https://eblong.com/infocom/>.
|
||||
Full game documentation can be found here <https://infodoc.plover.net/>
|
||||
|
||||
The game files are a virtual machine code commonly known as Z-Machine, they
|
||||
are portable and will run on any machine that has a Z-Machine interpreter.
|
||||
|
||||
* All the Z3 games come with the official CP/M interpreter (the `COM` file)
|
||||
version C last updated by Inforcom on 5th Feb 1985. You can simply run the
|
||||
game by running it from the `COM` program
|
||||
* All latter games Z4, Z5,.. and above, (Marked as * in the listing above)
|
||||
are more sophisticated and require a better interpreter. i.e. VEZZA.
|
||||
|
||||
#### VEZZA (User Area 15)
|
||||
|
||||
Vezza is a modern Infocom/Inform/Z-machine text adventure interpreter for 8 bit
|
||||
z80 based computers. What makes it modern is that it is written in hand-crafted
|
||||
z80 assembler for maximum speed, and can load not only the classics such as
|
||||
Zork 1,2 and 3 but also the later games.
|
||||
|
||||
It can run Z1 up to Z8 inform format interactive fiction game files. To run
|
||||
a game with Vezza just type Vezza followed by the game you want to run. e.g.
|
||||
|
||||
`VEZZA ZORK0.Z6`
|
||||
|
||||
**Note:** One of the bigger constraints is available RAM. An OS such as ZPM
|
||||
since it uses banked RAM does have a good amount of available RAM and was
|
||||
used to test these games work.
|
||||
|
||||
This tool is free but the developer accepts your support by letting
|
||||
you pay what you think is fair for the tool. If you find this useful
|
||||
consider donating at:
|
||||
|
||||
<https://sijnstra.itch.io/vezza>
|
||||
|
||||
You should (test and) choose one that works on you configuration,
|
||||
and best to copy and rename it as vezza.com
|
||||
|
||||
| **File** | **Description** |
|
||||
|--------------|-------------------------------------------------------------------|
|
||||
| vezza-B.com | 80x24, VT52 + Banked CP/M 3 |
|
||||
| vezza-FG.com | 80x25, VT100/ANSI (16 color) + CP/M 3 |
|
||||
| vezza-C2.com | 80x24, VT100 - CP/M 2.2 large memory, no timed input |
|
||||
| vezza-CC.com | 80x24, VT100 (256 colour) - CP/M 2.2 large memory, no timed input |
|
||||
| vezza-AV.com | 80x24, VT100 (16 colour) - CP/M 2.2 high RAM. |
|
||||
| vezza-AX.com | 80x25, VT100/ANSI (16 colour) - CP/M 2.2 high RAM. |
|
||||
| vezza-RW.com | 80x24, VT100 - CP/M 2.2 |
|
||||
|
||||
The above is a subset of available builds. The full repository including
|
||||
documentation is available at <https://gitlab.com/sijnstra1/vezza/>
|
||||
|
||||
## MSX ROMS
|
||||
|
||||
| Hard Disk Image: **hd_msxroms1.img**
|
||||
@@ -1329,7 +1433,7 @@ The following files are found in
|
||||
| `TURBO.OVR` | Part of TURBO Pascal |
|
||||
| `TURBOMSG.OVR` | Part of TURBO Pascal |
|
||||
|
||||
## WordStar 4
|
||||
## WordStar 4 (Word processor)
|
||||
|
||||
| Floppy Disk Image: **fd_ws4.img**
|
||||
| Hard Disk Image: **hd_ws4.img**
|
||||
|
||||
@@ -436,16 +436,21 @@ An FPGA Z80 based S100 SBC
|
||||
|
||||
#### Supported Hardware
|
||||
|
||||
- FP: LEDIO=255
|
||||
- DS5RTC: RTCIO=104, IO=104
|
||||
- SSER: IO=52
|
||||
- LPT: MODE=S100, IO=199
|
||||
- FV: IO=192, KBD MODE=FV, KBD IO=3
|
||||
- KBD: ENABLED
|
||||
- SCON: IO=0
|
||||
- ESPSD: IO=128, PRIMARY
|
||||
- ESPSD: IO=128, SECONDARY
|
||||
- MD: TYPE=RAM
|
||||
- PPIDE: IO=48, MASTER
|
||||
- PPIDE: IO=48, SLAVE
|
||||
- PPIDE: MODE=STD, IO=48, MASTER
|
||||
- PPIDE: MODE=STD, IO=48, SLAVE
|
||||
- PPIDE: MODE=S100A, IO=56, MASTER
|
||||
- PPIDE: MODE=S100A, IO=56, SLAVE
|
||||
- PPIDE: MODE=S100B, IO=56, MASTER
|
||||
- PPIDE: MODE=S100B, IO=56, SLAVE
|
||||
- SD: MODE=FZ80, IO=108, UNITS=2
|
||||
|
||||
#### Notes:
|
||||
@@ -1766,6 +1771,13 @@ as defined by the IEEE-696 specs.
|
||||
- MD: TYPE=RAM
|
||||
- MD: TYPE=ROM
|
||||
- SD: MODE=SC, IO=12, UNITS=1
|
||||
- ESPSD: IO=128, PRIMARY
|
||||
- ESPSD: IO=128, SECONDARY
|
||||
- ESPSD occupies 995 bytes.
|
||||
- PPIDE: MODE=S100A, IO=48, MASTER
|
||||
- PPIDE: MODE=S100A, IO=48, SLAVE
|
||||
- PPIDE: MODE=S100B, IO=48, MASTER
|
||||
- PPIDE: MODE=S100B, IO=48, SLAVE
|
||||
|
||||
#### Notes:
|
||||
|
||||
@@ -2266,6 +2278,7 @@ the active platform and configuration.
|
||||
| RF | RAM Floppy Disk Interface |
|
||||
| SD | SD Card Interface |
|
||||
| SYQ | Iomega SparQ Drive on PPI |
|
||||
| ESPSD | S100 ESP32-based SD Card Interface |
|
||||
|
||||
## Video
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ Some of the included software:
|
||||
* Support for other operating systems, p-System, FreeRTOS, and FUZIX.
|
||||
* Programming Tools (Z80ASM, Turbo Pascal, Forth, Cowgol)
|
||||
* C Compiler's including Aztec-C, and HI-TECH C
|
||||
* Microsoft Basic Compiler, and Microsoft Fortran
|
||||
* Microsoft Basic Compiler, Microsoft Fortran, and Microsoft COBOL
|
||||
* Some games such as Colossal Cave, Zork, etc
|
||||
* Wordstar Word processing software
|
||||
|
||||
@@ -273,8 +273,11 @@ please let me know if I missed you!
|
||||
|
||||
* Tasty Basic is a product of Dimitri Theulings.
|
||||
|
||||
* Dean Netherton contributed eZ80 CPU support, the sound driver
|
||||
interface, and the SN76489 sound driver.
|
||||
* Dean Netherton contributed multiple components:
|
||||
- eZ80 CPU support
|
||||
- Sound driver infrastructure
|
||||
- SN76489 sound driver
|
||||
- Native USB driver (keyboard, floppy, mass storage)
|
||||
|
||||
* The RomWBW Disk Catalog document was produced by Mykl Orders.
|
||||
|
||||
@@ -290,8 +293,10 @@ please let me know if I missed you!
|
||||
- significant content in the Disk Catalog and User Guide
|
||||
- creation of the Introduction and Hardware documents
|
||||
- Z3PLUS operating system disk image
|
||||
- COPYSL utility
|
||||
- SLABEL utility
|
||||
- Infocom text adventure game disk image
|
||||
- COPYSL, and SLABEL utilities
|
||||
- Display of bootable slices via "S" command during startup
|
||||
- Optimisations of HBIOS and CBIOS to reduce overall code size
|
||||
- a feature for RomWBW configuration by NVRAM
|
||||
- the /B bulk mode of disk assignment to the ASSIGN utility
|
||||
|
||||
@@ -334,6 +339,12 @@ please let me know if I missed you!
|
||||
* Jörg Linder has contributed disassembled and nicely commented
|
||||
source for ZSDOS2 and the BPBIOS utilities.
|
||||
|
||||
* Marshall Gates has contriubed sample program source files for all
|
||||
of the language disk images.
|
||||
|
||||
* Randy Merkel provided the ZSDOS Programmer's Manual as translated
|
||||
by Wayne Hortensius.
|
||||
|
||||
`\clearpage`{=latex}
|
||||
|
||||
## Related Projects
|
||||
|
||||
@@ -659,8 +659,10 @@ latter version of the SBC.
|
||||
On systems with RTC devices (that have Non-Volatile RAM), RomWBW supports storing
|
||||
some limited configuration option options inside this RAM.
|
||||
|
||||
Several configuration options are currently supported; these are known as Switches.
|
||||
The following switch ID's are defined, and described in sections below.
|
||||
Several configuration options are currently supported; these are
|
||||
referred to as Switches. In this case the term Switches refers to "soft"
|
||||
switches stored in NVRAM, not physical panel switches. The following
|
||||
switch ID's are defined, and described in sections below.
|
||||
|
||||
| Switch Number | Name | Description |
|
||||
|---------------|--------------|-----------------------------------------------|
|
||||
@@ -683,6 +685,11 @@ the bytes in NVRAM to check for authenticity before using the configuration.
|
||||
The above data is copied into the HBIOS Configuration Block (HCB) at startup at
|
||||
the location starting at CB_SWITCHES.
|
||||
|
||||
Although the switch data is stored in NVRAM, it is intended that you
|
||||
use [SYSGET Subfunction 0xC0 -- Get Switches (SWITCH)] or
|
||||
[SYSSET Subfunction 0xC0 -- Set Switches (SWITCH)] to read or write
|
||||
the switch values described here.
|
||||
|
||||
### Boot Options (NVSW_BOOTOPTS)
|
||||
|
||||
16 bit Switch defining the ROM application or Disk device to boot if
|
||||
@@ -705,13 +712,15 @@ automatic booting is enabled.
|
||||
|
||||
### Status Reset (0xFF)
|
||||
|
||||
The Status Reset switch is not a general purpose switch, it is a control mechanism
|
||||
to allow the global status of all switches to be determined. The meaning of the switch
|
||||
is different for Read (Get Status) and Write (Reset NVRAM)
|
||||
The Status Reset switch is a virtual switch that does not have a
|
||||
corresponding stored value. It is a control mechanism to allow the
|
||||
global status of all switches to be determined. The meaning of the
|
||||
switch is different for Read (Get Status) and Write (Reset NVRAM)
|
||||
|
||||
#### GET (Get Status)
|
||||
|
||||
The read Get Status of switches. This returns very specific values from the function call.
|
||||
When the switch number 0xFF is read (using the Get Switches function),
|
||||
the status of the NVRAM switches will be returned as follows:
|
||||
|
||||
| Status | A Register | Z / NZ Flag |
|
||||
|----------------------------------------------|------------|--------------|
|
||||
@@ -721,8 +730,10 @@ The read Get Status of switches. This returns very specific values from the func
|
||||
|
||||
#### SET (Reset NVRAM)
|
||||
|
||||
Reset NVRAM to default values. This will wipe any existing data and set default
|
||||
values into NVRAM.
|
||||
When the switch number 0xFF is written (using the Set Switches
|
||||
function), the stored values of all switches will be reset to their
|
||||
default values. This will wipe any existing data and set default values
|
||||
into NVRAM.
|
||||
|
||||
# Driver Model
|
||||
|
||||
@@ -1088,6 +1099,8 @@ below enumerates their values.
|
||||
| DIODEV_SYQ | 0x0C | Syquest Sparq Disk | syq.asm |
|
||||
| DIODEV_CHUSB | 0x0D | CH375/376 USB Disk | ch.asm |
|
||||
| DIODEV_CHSD | 0x0E | CH375/376 SD Card | ch.asm |
|
||||
| DIODEV_USB | 0x0F | CH376 Native USB Device | ch376.asm |
|
||||
| DIODEV_ESPSD | 0x10 | S100 ESP32 SD Card | espsd.asm |
|
||||
|
||||
A fixed set of media types are defined. The currently defined media
|
||||
types identifiers are listed below. Each driver will support one or
|
||||
@@ -1528,9 +1541,9 @@ Work in progress, documentation required...
|
||||
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
|
||||
Device Attributes (C) values are not yet defined. Device Type (D)
|
||||
indicates the specific hardware driver that handles the RTC 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.
|
||||
|
||||
@@ -2276,16 +2289,16 @@ 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.
|
||||
The Note (HL) values correspond to eighth tones. Increasing/decreasing
|
||||
the value by 8 results in a full tone 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.
|
||||
and below can still be played but each eighth tone step may not result
|
||||
in a tone change.
|
||||
|
||||
The following table shows the mapping of the Note (HL) value to the
|
||||
corresponding octave and note.
|
||||
@@ -2504,9 +2517,8 @@ If the Unit specified is not a hard disk the Media ID will be returned and
|
||||
the slice parameter ignored. If there is no media in device, or the slice
|
||||
number is invaid (Parameter Out Of Range) the function will return an error status.
|
||||
|
||||
**NOTE:
|
||||
This function was placed in HBIOS to be shared between the diffeent CP/M
|
||||
varients supported by RomWBW. It is not strictly a BIOS function,
|
||||
**NOTE:** This function was placed in HBIOS to be shared between the different CP/M
|
||||
variants supported by RomWBW. It is not strictly a BIOS function,
|
||||
and may be moved in future.
|
||||
|
||||
`\clearpage`{=latex}
|
||||
|
||||
@@ -340,14 +340,16 @@ enter the command followed by ***\<enter\>***.
|
||||
For example, typing `H<enter>` will display a short command summary:
|
||||
|
||||
```
|
||||
Boot [H=Help]: h
|
||||
Boot [H=Help]: H
|
||||
|
||||
L - List ROM Applications
|
||||
D - Device Inventory
|
||||
S - Slice Inventory
|
||||
R - Reboot System
|
||||
W - RomWBW Configure
|
||||
I <u> [<c>] - Set Console Interface/Baud Rate
|
||||
V [<n>] - View/Set HBIOS Diagnostic Verbosity
|
||||
N - Network Boot
|
||||
<u>[.<s>] - Boot Disk Unit/Slice
|
||||
```
|
||||
|
||||
@@ -366,7 +368,6 @@ ROM Applications:
|
||||
B: BASIC
|
||||
T: Tasty BASIC
|
||||
P: Play a Game
|
||||
N: Network Boot
|
||||
X: XModem Flash Updater
|
||||
U: User App
|
||||
```
|
||||
@@ -410,7 +411,6 @@ prompt:
|
||||
| BASIC | Microsoft ROM BASIC |
|
||||
| Tasty BASIC | Dimitri Theuling's Tiny BASIC implementation |
|
||||
| Play | A simple video game (requires ANSI terminal emulation) |
|
||||
| Network Boot | Boot system via Wiznet MT011 device |
|
||||
| Flash Update | Upload and flash a new ROMWBW image using xmodem |
|
||||
| User App | User written application placeholder |
|
||||
|
||||
@@ -992,10 +992,10 @@ whether you boot your OS from ROM or from the disk media itself.
|
||||
|
||||
## Drive Letter Assignment
|
||||
|
||||
In legacy CP/M operating systems only 16 drive letters (A:-P:) available
|
||||
to be assigned to disks Drive letters were generally mapped to disk
|
||||
In CP/M operating systems only 16 drive letters (A:-P:) available
|
||||
to be assigned to disks Drive letters were generally mapped to disk
|
||||
drives in a completely fixed way. For example, drive A: would **always**
|
||||
refer to the first floppy disk drive.
|
||||
refer to the first floppy disk drive.
|
||||
|
||||
RomWBW implements a much more flexible drive letter assignment mechanism
|
||||
so that any drive letter can dynamically be assigned to any disk device,
|
||||
@@ -1117,100 +1117,6 @@ starting the operating system. Even better, you can use an auto-submit
|
||||
batch file to customzie the assignments at startup without any user
|
||||
intervention.
|
||||
|
||||
## Disk Operations/Commands
|
||||
|
||||
With some understanding of how RomWBW presents disk space to the
|
||||
operating systems, we need to go over the options for actually setting
|
||||
up your disk(s) with content.
|
||||
|
||||
### Preparing Media for First Use
|
||||
|
||||
You can initialize the media in-place using your RomWBW system.
|
||||
Essentially, this means you are creating a set of blank directories on
|
||||
your disk so that files can be saved there.
|
||||
This is somewhat analogous to partitioning of a hard disk
|
||||
or doing a low level format of a floppy disk.
|
||||
|
||||
Initilizing a Floppy disk is covered in the section [Floppy Disk Formatting],
|
||||
or for a Hard disk the section [Hard Disk Preparation] covers the steps to
|
||||
manually setup a hard disk for first use.
|
||||
|
||||
### Clearing (Formatting) Drives
|
||||
|
||||
This is somewhat analogous to doing a FORMAT operation on other systems.
|
||||
|
||||
With RomWBW you use the `CLRDIR` command to do this.
|
||||
This command is merely "clearing out" the directory space of the drive
|
||||
referred to by a drive letter and setting up the new empty directory.
|
||||
|
||||
Refer to $doc_apps$ for more information on use of the `CLRDIR` command.
|
||||
|
||||
Since `CLRDIR` works on drive letters, make
|
||||
absolutely sure you know what media and slice are assigned to that
|
||||
drive letter before using `CLRDIR` because `CLRDIR` will wipe out any
|
||||
pre-existing contents of the slice.
|
||||
|
||||
After `CLRDIR` completes, the slice should be ready to use by the operating
|
||||
system via the drive letter assigned.
|
||||
Start by using the `DIR` command on the drive.
|
||||
This should return without error, but list no files.
|
||||
|
||||
Here is an example of using `CLRDIR`. In this example, the `ASSIGN`
|
||||
command is used to show the current drive letter assignments. Then
|
||||
the `CLRDIR` command is used to initialize the directory of drive 'G'
|
||||
which is slice 2 of hard disk device IDE0 ("IDE0:2").
|
||||
|
||||
```
|
||||
B>ASSIGN
|
||||
|
||||
A:=MD0:0
|
||||
B:=MD1:0
|
||||
C:=FD0:0
|
||||
D:=FD1:0
|
||||
E:=IDE0:0
|
||||
F:=IDE0:1
|
||||
G:=IDE0:2
|
||||
H:=IDE0:3
|
||||
|
||||
B>CLDIR G:
|
||||
CLRDIR Version 1.2B May 2024 by Max Scane
|
||||
|
||||
Warning - this utility will overwrite the directory sectors of Drive: G
|
||||
Type CAPITAL Y to proceed, any key other key to exit. Y
|
||||
Directory cleared.
|
||||
B>
|
||||
```
|
||||
|
||||
### Checking Disk Layout
|
||||
|
||||
If you are not sure which disk layout is used for your existing
|
||||
media, you can use the CP/M 2.2 `STAT` command to display information
|
||||
including the number of "32 Byte Directory Entries"
|
||||
for a drive letter on the corresponding hard disk.
|
||||
|
||||
- If it indicates 512, your disk layout is legacy (hd512).
|
||||
- If it indicates 1024, your disk layout is modern (hd1k).
|
||||
|
||||
Here is an example of checking the disk layout.
|
||||
|
||||
```
|
||||
B>STAT E:DSK:
|
||||
|
||||
E: Drive Characteristics
|
||||
65408: 128 Byte Record Capacity
|
||||
8176: Kilobyte Drive Capacity
|
||||
1024: 32 Byte Directory Entries
|
||||
0: Checked Directory Entries
|
||||
256: Records/ Extent
|
||||
32: Records/ Block
|
||||
64: Sectors/ Track
|
||||
2: Reserved Tracks
|
||||
```
|
||||
|
||||
It is critical that you include `DSK:` after the drive letter in the
|
||||
`STAT` command line. The important line to look at is labeled "32 Byte
|
||||
Directory Entries".
|
||||
|
||||
# Disk Types
|
||||
|
||||
## RAM & ROM Disks
|
||||
@@ -1335,14 +1241,14 @@ system.
|
||||
Two hard disk layout schemes exist:
|
||||
|
||||
* Modern (hd1k)
|
||||
* Legacy (hd512)
|
||||
* Classic (hd512)
|
||||
|
||||
You **cannot** mix disk layouts on a single disk device,
|
||||
however It is perfectly fine for one system to have
|
||||
multiple hard disks with different layouts -- each physical disk
|
||||
device is handled separately.
|
||||
|
||||
If you are setting up a new disk, the modern (hd1k) layout is
|
||||
If you are setting up a new disk, the Modern (hd1k) layout is
|
||||
recommended for the following reasons:
|
||||
|
||||
* Larger number of directory entries per filesystem
|
||||
@@ -1350,8 +1256,8 @@ recommended for the following reasons:
|
||||
* Reduces chances of data corruption
|
||||
* Each slice occupies exactly 8MB (an exact power of 2) in size
|
||||
|
||||
Both the legacy and modern disk layouts continue to be fully supported
|
||||
by RomWBW. There are no plans to deprecate the legacy layout.
|
||||
Both the classic and modern disk layouts continue to be fully supported
|
||||
by RomWBW. There are no plans to deprecate the classic layout.
|
||||
|
||||
#### Modern Layout
|
||||
|
||||
@@ -1368,14 +1274,14 @@ RomWBW does not support extended partitions -- only a single
|
||||
primary partition can be used.
|
||||
|
||||
The existence of a partition table entry for RomWBW on
|
||||
a hard disk makes it behave in the modern mode. Removing the RomWBW
|
||||
partition entry from a modern hard disk layout
|
||||
a hard disk makes it behaves in the modern disk layout mode.
|
||||
Removing the RomWBW partition entry from a modern hard disk layout
|
||||
will cause the existing data to be unavailable and/or corrupted
|
||||
|
||||
The CP/M filesystem in the slices of the modern disk layout
|
||||
contain 1024 directory entries.
|
||||
|
||||
#### Legacy Layout
|
||||
#### Classic Layout
|
||||
|
||||
Originally, RomWBW always used the very start of the hard disk media
|
||||
for the location of the slices. In this layout, slice 0 referred to
|
||||
@@ -1384,15 +1290,16 @@ chunk of ~8MB on the disk, and so on. The number of slices is limited
|
||||
to the size of the disk media -- if you attempted to read/write to a
|
||||
slice that would exceed the disk size, you would see I/O errors.
|
||||
|
||||
The legacy format takes steps to allow a partition table to still be
|
||||
The classic disk layout takes steps to allow a partition table to still be
|
||||
used for other types of filesystems such as DOS/FAT. It just does not
|
||||
use a partition table entry to determine the start of the RomWBW slices.
|
||||
|
||||
The lack of a RomWBW partition table entry will cause legacy behaviour.
|
||||
Adding a partition table entry on an existing legacy RomWBW hard disk
|
||||
The lack of a RomWBW partition table entry will cause the classic disk
|
||||
layout to be used.
|
||||
Adding a partition table entry on an existing classic RomWBW hard disk
|
||||
will cause the existing data to be unavailable and/or corrupted.
|
||||
|
||||
The CP/M filesystem in the slices of the legacy disk layout
|
||||
The CP/M filesystem in the slices of the classic disk layout
|
||||
contain 512 directory entries.
|
||||
|
||||
### Hard Disk Slices
|
||||
@@ -1466,9 +1373,9 @@ system.
|
||||
The exact number of CP/M filesystem slices that will fit on your
|
||||
specific physical hard disk can be determined as follows:
|
||||
|
||||
- For modern (hd1k) disk layouts, it is 1024KB + (slices * 8192KB).
|
||||
- For Modern (hd1k) disk layouts, it is 1024KB + (slices * 8192KB).
|
||||
Or equivalent to say 1MB + (slices * 8MB).
|
||||
- For legacy (hd512) disk layouts, it is slices * 8,320KB.
|
||||
- For Classic (hd512) disk layouts, it is slices * 8,320KB.
|
||||
|
||||
**WARNING**: In this document KB means 1024 bytes and MB means 1048576
|
||||
bytes (frequently expressed as KiB and MiB in modern terminology).
|
||||
@@ -1499,7 +1406,9 @@ There are two approaches to preparing disks for use by RomWBW.
|
||||
including files to a disk.
|
||||
|
||||
This section of the document describes the manual process of preparing
|
||||
empty disks that are ready for use by an operating system.
|
||||
empty disks that are ready for use by an operating system.
|
||||
This is somewhat analogous to partitioning and formatting of a hard disk
|
||||
or doing a low level format of a floppy disk.
|
||||
|
||||
Alternatively, you can use the pre-built RomWBW disk images to quickly
|
||||
create disk media that already has a large selection of files and
|
||||
@@ -1611,7 +1520,7 @@ This does not mean to imply it is the only possible way.
|
||||
|
||||
First you need to understand
|
||||
|
||||
* The disk layout approach (either hd1k or the legacy hd512).
|
||||
* The disk layout approach (either the Modern hd1k or the Classic hd512).
|
||||
See [Hard Disk Layouts] section if you are not sure.
|
||||
hd1k should be the preferred layout.
|
||||
* The number of 8MB slices that you want to allocate, preferred is 64 slices.
|
||||
@@ -1640,7 +1549,7 @@ The disk unit number was assigned at boot See [Device Unit Assignments]
|
||||
|
||||
Refer to $doc_apps$ for more information on use of the `FDISK80` utility.
|
||||
|
||||
If you want to use the legacy hd512 layout skip down to the [Legacy (hd512)] section
|
||||
If you want to use the Classic (hd512) layout skip down to the [Classic (hd512)] section
|
||||
|
||||
#### Modern (hd1k)
|
||||
|
||||
@@ -1702,14 +1611,14 @@ At this point, it is best to restart your system to make sure that
|
||||
the operating system is aware of the partition table updates. Start
|
||||
CP/M 2.2 or Z-System from ROM again.
|
||||
|
||||
#### Legacy (hd512)
|
||||
#### Classic (hd512)
|
||||
|
||||
At this point, use the `I` command to initialize (reset)
|
||||
the partition table to an empty state.
|
||||
|
||||
To use the hd512 layout, use `W` to write the empty table to the disk
|
||||
and exit. Remember that the lack of a partition for RomWBW implies the
|
||||
legacy (hd512) layout.
|
||||
Classic (hd512) layout.
|
||||
|
||||
At this point, it is best to restart your system to make sure that
|
||||
the operating system is aware of the partition table updates. Start
|
||||
@@ -1727,12 +1636,7 @@ You need to initialize each slice for CP/M to use it.
|
||||
This is somewhat analogous to doing a FORMAT operation on other systems,
|
||||
and is done using the `CLRDIR` command.
|
||||
|
||||
This is covered in the section [Clearing (Formatting) Drives]
|
||||
|
||||
**WARNING**: Earlier versions of the `CLRDIR` application do not
|
||||
appear to check for disk errors when it runs. If you attempt to run
|
||||
`CLRDIR` on a drive that is mapped to a slice that does not actually fit
|
||||
on the physical disk, it may behave erratically.
|
||||
This is covered in the next section [Clearing (Formatting) Drives]
|
||||
|
||||
Assuming you want to use additional slices, you should initialize them
|
||||
using the same process. You may need to reassign drive letters to
|
||||
@@ -1741,11 +1645,57 @@ You can use the `ASSIGN` command to handle this.
|
||||
|
||||
## Post Disk Preparation
|
||||
|
||||
Once a disk (either floppy or hard disk) has been initialised and
|
||||
formattted you may optionally;
|
||||
Once a disk has been initialised you may need to do one or more of the following;
|
||||
* Clear (Format) the drive
|
||||
* Make the disk bootable
|
||||
* Copy system (or other) files to the disk
|
||||
|
||||
### Clearing (Formatting) Drives
|
||||
|
||||
This is somewhat analogous to doing a FORMAT operation on other systems.
|
||||
|
||||
With RomWBW you use the `CLRDIR` command to do this.
|
||||
This command is merely "clearing out" the directory space of the drive
|
||||
referred to by a drive letter and setting up the new empty directory.
|
||||
|
||||
Refer to $doc_apps$ for more information on use of the `CLRDIR` command.
|
||||
|
||||
Since `CLRDIR` works on drive letters, make
|
||||
absolutely sure you know what media and slice are assigned to that
|
||||
drive letter before using `CLRDIR` because `CLRDIR` will wipe out any
|
||||
pre-existing contents of the slice.
|
||||
|
||||
After `CLRDIR` completes, the drive should be ready to use by the operating
|
||||
system via the drive letter assigned.
|
||||
Start by using the `DIR` command on the drive.
|
||||
This should return without error, but list no files.
|
||||
|
||||
Here is an example of using `CLRDIR`. In this example, the `ASSIGN`
|
||||
command is used to show the current drive letter assignments. Then
|
||||
the `CLRDIR` command is used to initialize the directory of drive 'G'
|
||||
which is slice 2 of hard disk device IDE0 ("IDE0:2").
|
||||
|
||||
```
|
||||
B>ASSIGN
|
||||
|
||||
A:=MD0:0
|
||||
B:=MD1:0
|
||||
C:=FD0:0
|
||||
D:=FD1:0
|
||||
E:=IDE0:0
|
||||
F:=IDE0:1
|
||||
G:=IDE0:2
|
||||
H:=IDE0:3
|
||||
|
||||
B>CLDIR G:
|
||||
CLRDIR Version 1.2B May 2024 by Max Scane
|
||||
|
||||
Warning - this utility will overwrite the directory sectors of Drive: G
|
||||
Type CAPITAL Y to proceed, any key other key to exit. Y
|
||||
Directory cleared.
|
||||
B>
|
||||
```
|
||||
|
||||
### Making a Disk Bootable
|
||||
|
||||
To make a disk bootable you will need to follow the specific instructions
|
||||
@@ -1776,6 +1726,38 @@ system and application files to your disks.
|
||||
Refer to [Transferring Files] for more information on getting
|
||||
files onto your disks.
|
||||
|
||||
### Checking Disk Layout
|
||||
|
||||
If you are not sure which disk layout is used for your existing
|
||||
media, you can use the CP/M 2.2 `STAT` command to display information
|
||||
including the number of "32 Byte Directory Entries"
|
||||
for a drive letter on the corresponding hard disk.
|
||||
|
||||
Note: For CP/M 3 the command is `SHOW [DRIVE]`
|
||||
|
||||
- If it indicates 512, your disk layout is Classic (hd512).
|
||||
- If it indicates 1024, your disk layout is Modern (hd1k).
|
||||
|
||||
Here is an example of checking the disk layout.
|
||||
|
||||
```
|
||||
B>STAT E:DSK:
|
||||
|
||||
E: Drive Characteristics
|
||||
65408: 128 Byte Record Capacity
|
||||
8176: Kilobyte Drive Capacity
|
||||
1024: 32 Byte Directory Entries
|
||||
0: Checked Directory Entries
|
||||
256: Records/ Extent
|
||||
32: Records/ Block
|
||||
64: Sectors/ Track
|
||||
2: Reserved Tracks
|
||||
```
|
||||
|
||||
It is critical that you include `DSK:` after the drive letter in the
|
||||
`STAT` command line. The important line to look at is labeled "32 Byte
|
||||
Directory Entries".
|
||||
|
||||
# Disk Images
|
||||
|
||||
Since it would be quite a bit of work to transfer over all the files you
|
||||
@@ -1806,6 +1788,7 @@ The following table shows the disk images available.
|
||||
| xxx_fortran.img | Microsoft Fortran-80 Compiler | No |
|
||||
| xxx_games.img | Games Disk for CP/M | No |
|
||||
| xxx_hitechc.img | HI-TECH Z80 CP/M C compiler | No |
|
||||
| xxx_infocom.img | Infocom Games Disk | No |
|
||||
| xxx_msxroms1.img | MSX ROMs Disk 1 | No |
|
||||
| xxx_msxroms2.img | MSX ROMs Disk 2 | No |
|
||||
| xxx_nzcom.img | NZCOM ZCPR 3.4 Operating System | Yes |
|
||||
@@ -1820,8 +1803,8 @@ You will find 3 sets of these .img files in the distribution. The
|
||||
"xxx" portion of the filename will be:
|
||||
|
||||
* "fd_" for a floppy image.
|
||||
* "hd1k_" for a modern layout hard disk image.
|
||||
* "hd512_" for a legacy layout hard disk image.
|
||||
* "hd1k_" for a Modern layout hard disk image.
|
||||
* "hd512_" for a Classic layout hard disk image.
|
||||
|
||||
In the case of xxx_dos65.img, only an hd512 variant is provided. This
|
||||
is a constraint of the DOS65 distribution.
|
||||
@@ -1895,7 +1878,7 @@ These partition sizes and locations were chosen to:
|
||||
The standard partition table table entries are:
|
||||
|
||||
+---------------------------------+-------------------------------+-------------------------------+
|
||||
| | **--- Modern (hd1k) ---** | **--- Legacy (hd512) ---** |
|
||||
| | **--- Modern (hd1k) ---** | **--- Classic (hd512) ---** |
|
||||
| +---------------+---------------+---------------+---------------+
|
||||
| | Byte(s) | Sector(s) | Byte(s) | Sector(s) |
|
||||
+=================================+==============:+==============:+==============:+==============:+
|
||||
@@ -1998,7 +1981,52 @@ that there are more disk (slice) images than the 6 that are included in
|
||||
the Combo Disk Images. These supplemental disk images are identified by
|
||||
looking for the files that start with hd1k_ or hd512_.
|
||||
|
||||
#### Adding Slices to Combo Image
|
||||
There are two approaches you can use to create custom hard disk
|
||||
images with multiple slices.
|
||||
|
||||
- You can add/modify a configuration file and run the RomWBW
|
||||
build process. This requires running the RomWBW build process, but
|
||||
will cause your custom hard disk images to be created with every
|
||||
build.
|
||||
|
||||
- You can manually combine the individual images using `COPY` (Windows)
|
||||
or `cat` (Linux/MacOS). This does not require running the RomWBW
|
||||
build process, but will require manually recreating your custom
|
||||
hard disk images when you upgrade to new releases of RomWBW.
|
||||
|
||||
The following sections provide more detail on each approach.
|
||||
|
||||
#### Building Custom Hard Disk Images
|
||||
|
||||
The RomWBW build process builds the disk images defined in the
|
||||
`Source/Images` directory. The resultant images are placed in the `Binary`
|
||||
directory and are ready to copy to your media.
|
||||
|
||||
These aggregate disk images are defined using .def files. You will see there
|
||||
is a combo.def file in the Images directory that defines the slices for the
|
||||
Combo disk image. You can create your own .def files as desired to
|
||||
automatically create custom aggregate disk images. When the RomWBW
|
||||
build process is run, it will automatically look for all .def files
|
||||
in the `Source/Images` directory and create aggregate disk images for
|
||||
each using the same base name as the .def file.
|
||||
|
||||
There is an example of this in the `Images` directory called
|
||||
`all.def.example`. You can remove the ".example" suffix so that the
|
||||
file is called `all.def`. Now, if you run the RomWBW build process, it
|
||||
will automatically generate `hd512_all.img` and `hd1k_all.img` files in
|
||||
the `/Binary` directory. This example creates an aggregate disk image
|
||||
with all of the possible slices.
|
||||
|
||||
You could also modify the contents of the Combo disk image by simply
|
||||
modifying the `combo.def` configuration file. However, it is recommended
|
||||
that you leave the Combo image alone and simply define your own.
|
||||
|
||||
NOTE: All of the `hd1k_xxx.img` aggregate disk image files created in
|
||||
this way (including the Combo disk image) will already be prefixed with
|
||||
`hd1k_prefix.dat`, so you do not need to add the prefix file. They are
|
||||
ready to write to your media.
|
||||
|
||||
#### Combining Hard Disk Images Manually
|
||||
|
||||
You can add slices to the Combo Disk Images simply by tacking
|
||||
slices onto the end. For example, if you want to add a slice
|
||||
@@ -2017,7 +2045,7 @@ Linus/MaxOS:
|
||||
Note that you **must** be sure to use either the hd1k_ or hd512_
|
||||
prefixed files together. You cannot mix them.
|
||||
|
||||
#### Creating a new Custom Image
|
||||
#### Creating a new Custom Image Manually
|
||||
|
||||
If you want to create a completely custom hard disk image that is not
|
||||
based on the existing combo image, you can generate a disk image entirely
|
||||
@@ -2446,6 +2474,7 @@ via the NZ-COM adaptation (see below).
|
||||
* [ZCPR Manual]($doc_root$/CPM/ZCPR Manual.pdf)
|
||||
* [ZCPR-DJ]($doc_root$/CPM/ZCPR-DJ.doc)
|
||||
* [ZSDOS Manual]($doc_root$/CPM/ZSDOS Manual.pdf)
|
||||
* [ZSDOS Programmer's Manual]($doc_root$/CPM/ZSDOS Programmers Manual.pdf)
|
||||
|
||||
#### Boot Disk
|
||||
|
||||
@@ -2526,6 +2555,7 @@ Manual.pdf" document in order to use this operating system effectively.
|
||||
* [NZCOM Users Manual]($doc_root$/CPM/NZCOM Users Manual.pdf)
|
||||
* [Z-System Users Guide]($doc_root$/CPM/Z-System Users Guide.pdf)
|
||||
* [ZCPR3.3 User Guide]($doc_root$/CPM/ZCPR3.3 User Guide.pdf)
|
||||
* [ZSDOS Programmer's Manual]($doc_root$/CPM/ZSDOS Programmers Manual.pdf)
|
||||
|
||||
#### Boot Disk
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ if %Platform%==DUO (
|
||||
)
|
||||
|
||||
::
|
||||
:: Bring the previously build font files into this directory
|
||||
:: Bring the previously build font files into this directory
|
||||
::
|
||||
|
||||
copy ..\Fonts\font*.asm . || exit /b
|
||||
@@ -91,19 +91,32 @@ tasm -t%CPUType% -g3 -dAPPBOOT hbios.asm hbios_app.bin hbios_app.lst || exit /b
|
||||
call :asm dbgmon || exit /b
|
||||
call :asm romldr || exit /b
|
||||
|
||||
call :asm invntdev || exit /b
|
||||
call :asm invntslc || exit /b
|
||||
call :asm eastaegg || exit /b
|
||||
call :asm nascom || exit /b
|
||||
:: call :asm tastybasic || exit /b
|
||||
call :asm game || exit /b
|
||||
call :asm usrrom || exit /b
|
||||
call :asm updater || exit /b
|
||||
|
||||
:: call :asm fonts || exit /b
|
||||
call :asm romfonts || exit /b
|
||||
|
||||
:: Sysconf builds as both BIN and COM files
|
||||
|
||||
tasm -t%CPUType% -g3 -fFF -dROMWBW sysconf.asm sysconf.bin sysconf_bin.lst || exit /b
|
||||
tasm -t%CPUType% -g3 -fFF -dCPM sysconf.asm sysconf.com sysconf_com.lst || exit /b
|
||||
|
||||
:: Create platform specific hardware monitor
|
||||
|
||||
if %Platform%==S100 (
|
||||
zxcc slr180 -s100mon/fh || exit /b
|
||||
zxcc mload25 -s100mon || exit /b
|
||||
set HwMon=s100mon.com
|
||||
) else (
|
||||
call :asm hwmon || exit /b
|
||||
set HwMon=hwmon.bin
|
||||
)
|
||||
|
||||
::
|
||||
:: Create additional ROM bank images by assembling components into
|
||||
:: 32K chunks which can be concatenated later. Note that
|
||||
@@ -113,15 +126,7 @@ tasm -t%CPUType% -g3 -fFF -dCPM sysconf.asm sysconf.com sysconf_com.lst || exit
|
||||
|
||||
copy /b romldr.bin + dbgmon.bin + ..\zsdos\zsys_wbw.bin + ..\cpm22\cpm_wbw.bin rom1.bin || exit /b
|
||||
copy /b ..\Forth\camel80.bin + nascom.bin + ..\tastybasic\src\tastybasic.bin + game.bin + eastaegg.bin + %NETBOOT% + updater.bin + sysconf.bin + usrrom.bin rom2.bin || exit /b
|
||||
|
||||
if %Platform%==S100 (
|
||||
zxcc slr180 -s100mon/fh
|
||||
zxcc mload25 -s100mon || exit /b
|
||||
copy /b s100mon.com rom3.bin || exit /b
|
||||
) else (
|
||||
copy nul rom3.bin
|
||||
)
|
||||
|
||||
copy /b %HwMon% + invntdev.bin + invntslc.bin + romfonts.bin rom3.bin
|
||||
copy /b romldr.bin + dbgmon.bin + ..\zsdos\zsys_wbw.bin appboot.bin || exit /b
|
||||
|
||||
::
|
||||
|
||||
@@ -54,3 +54,7 @@ PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
|
||||
SDENABLE .SET TRUE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM)
|
||||
;
|
||||
LPTENABLE .SET TRUE ; LPT: ENABLE CENTRONICS PRINTER DRIVER (LPT.ASM)
|
||||
;
|
||||
ESPSDENABLE .SET TRUE ; ESPSD: ENABLE S100 ESP32 SD DISK DRIVER (ESPSD.ASM)
|
||||
ESPSDCNT .SET 1 ; ESPSD: NUMBER OF BOARDS TO DETECT (1-2), 1-2 DEVICES PER BOARD
|
||||
ESPSD0DUAL .SET TRUE ; ESPSD 0: DUAL INTERFACE BOARD (DUAL SD)
|
||||
|
||||
@@ -55,7 +55,7 @@ CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP
|
||||
VDAEMU_SERKBD .SET $FF ; VDA EMULATION: SERIAL KBD UNIT #, OR $FF FOR HW KBD
|
||||
;;
|
||||
TMSENABLE .SET FALSE ; TMS: ENABLE TMS9918 VIDEO/KBD DRIVER (TMS.ASM)
|
||||
TMSMODE .SET TMSMODE_MSX ; TMS: DRIVER MODE: TMSMODE_[SCG|N8|MSX|MSXKBD|MSXMKY|MBC|COLECO|DUO|NABU]
|
||||
TMSMODE .SET TMSMODE_MSX ; TMS: DRIVER MODE: TMSMODE_[SCG|N8|MSX|MSXKBD|MSXMKY|MBC|COLECO|DUO|NABU|MSXUKY]
|
||||
TMS80COLS .SET FALSE ; TMS: ENABLE 80 COLUMN SCREEN, REQUIRES V9958
|
||||
TMSTIMENABLE .SET FALSE ; TMS: ENABLE TIMER INTERRUPTS (REQUIRES IM1)
|
||||
VRCENABLE .SET FALSE ; VRC: ENABLE VGARC VIDEO/KBD DRIVER (VRC.ASM)
|
||||
@@ -71,6 +71,14 @@ PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
|
||||
SDENABLE .SET FALSE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM)
|
||||
SDMODE .SET SDMODE_PIO ; SD: DRIVER MODE: SDMODE_[JUHA|N8|CSIO|PPI|UART|DSD|MK4|SC|MT|USR|PIO|Z80R|EPITX|FZ80|GM|EZ512|K80W]
|
||||
SDCNT .SET 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD/SC/MT ONLY
|
||||
;
|
||||
CHENABLE .SET TRUE ; CH: ENABLE CH375/376 USB SUPPORT
|
||||
CHNATIVEENABLE .SET FALSE ; CH376: ENABLE CH376 NATIVE USB DRIVER
|
||||
CHSCSIENABLE .SET FALSE ; CH376: ENABLE CH376 NATIVE MASS STORAGE DEVICES (REQUIRES CHNATIVEENABLE)
|
||||
CHUFIENABLE .SET FALSE ; CH376: ENABLE CH376 NATIVE UFI FLOPPY DISK DEVICES (REQUIRES CHNATIVEENABLE)
|
||||
CHNATIVEEZ80 .SET TRUE ; CH376: DELEGATE USB DRIVERS TO EZ80'S FIRMWARE
|
||||
CHNATIVEFORCE .SET FALSE ; CH376: DISABLE AUTO-DETECTION OF MODULE - ASSUME ITS INSTALLED
|
||||
;
|
||||
PRPENABLE .SET FALSE ; PRP: ENABLE ECB PROPELLER IO BOARD DRIVER (PRP.ASM)
|
||||
;
|
||||
LPTENABLE .SET FALSE ; LPT: ENABLE CENTRONICS PRINTER DRIVER (LPT.ASM)
|
||||
@@ -82,3 +90,5 @@ SN76489ENABLE .SET FALSE ; SN: ENABLE SN76489 SOUND DRIVER
|
||||
AY38910ENABLE .SET FALSE ; AY: ENABLE AY-3-8910 / YM2149 SOUND DRIVER
|
||||
AYMODE .SET AYMODE_RCZ80 ; AY: DRIVER MODE: AYMODE_[SCG|N8|RCZ80|RCZ180|MSX|LINC|MBC|DUO|NABU]
|
||||
AY_FORCE .SET FALSE ; AY: BYPASS AUTO-DETECT, FORCED PRESENT
|
||||
|
||||
EZ80TIMER .SET EZ80TMR_FIRM ; EZ80: TIMER TICK MODEL: EZ80TMR_[INT|FIRM]
|
||||
|
||||
@@ -72,7 +72,7 @@ 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|MSX|MSXKBD|MSXMKY|MBC|COLECO|DUO|NABU]
|
||||
TMSMODE .SET TMSMODE_MSX ; TMS: DRIVER MODE: TMSMODE_[SCG|N8|MSX|MSXKBD|MSXMKY|MBC|COLECO|DUO|NABU|MSXUKY]
|
||||
TMS80COLS .SET FALSE ; TMS: ENABLE 80 COLUMN SCREEN, REQUIRES V9958
|
||||
TMSTIMENABLE .SET FALSE ; TMS: ENABLE TIMER INTERRUPTS (REQUIRES IM1)
|
||||
VRCENABLE .SET FALSE ; VRC: ENABLE VGARC VIDEO/KBD DRIVER (VRC.ASM)
|
||||
@@ -92,6 +92,10 @@ SDMODE .SET SDMODE_PIO ; SD: DRIVER MODE: SDMODE_[JUHA|N8|CSIO|PPI|UART|DSD|MK4
|
||||
SDCNT .SET 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD/SC/MT ONLY
|
||||
;
|
||||
CHENABLE .SET TRUE ; CH: ENABLE CH375/376 USB SUPPORT
|
||||
CHNATIVEENABLE .SET FALSE ; CH376: ENABLE CH376 NATIVE USB DRIVER
|
||||
CHSCSIENABLE .SET FALSE ; CH376: ENABLE CH376 NATIVE MASS STORAGE DEVICES (REQUIRES CHNATIVEENABLE)
|
||||
CHUFIENABLE .SET FALSE ; CH376: ENABLE CH376 NATIVE UFI FLOPPY DISK DEVICES (REQUIRES CHNATIVEENABLE)
|
||||
CHNATIVEFORCE .SET FALSE ; CH376: DISABLE AUTO-DETECTION OF MODULE - ASSUME ITS INSTALLED
|
||||
;
|
||||
PRPENABLE .SET FALSE ; PRP: ENABLE ECB PROPELLER IO BOARD DRIVER (PRP.ASM)
|
||||
;
|
||||
|
||||
@@ -55,7 +55,7 @@ CPUOSC .SET 18432000 ; CPU OSC FREQ IN MHZ
|
||||
;
|
||||
Z180_CLKDIV .SET 1 ; Z180: CHK DIV: 0=OSC/2, 1=OSC, 2=OSC*2
|
||||
Z180_MEMWAIT .SET 1 ; Z180: MEMORY WAIT STATES (0-3)
|
||||
Z180_IOWAIT .SET 2 ; Z180: I/O WAIT STATES TO ADD ABOVE 1 W/S BUILT-IN (0-3)
|
||||
Z180_IOWAIT .SET 3 ; Z180: I/O WAIT STATES TO ADD ABOVE 1 W/S BUILT-IN (0-3)
|
||||
;
|
||||
CRTACT .SET TRUE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP
|
||||
DSRTCENABLE .SET FALSE ; DSRTC: ENABLE DS-1302 CLOCK DRIVER (DSRTC.ASM)
|
||||
@@ -66,8 +66,12 @@ SCONENABLE .SET TRUE ; SCON: ENABLE S100 CONSOLE DRIVER (SCON.ASM)
|
||||
;
|
||||
IDEENABLE .SET FALSE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM)
|
||||
;
|
||||
PPIDEENABLE .SET FALSE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.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|PIO|Z80R|EPITX|FZ80|GM|EZ512|K80W]
|
||||
SDCNT .SET 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD/SC/MT ONLY
|
||||
;
|
||||
ESPSDENABLE .SET TRUE ; ESPSD: ENABLE S100 ESP32 SD DISK DRIVER (ESPSD.ASM)
|
||||
ESPSDCNT .SET 1 ; ESPSD: NUMBER OF BOARDS TO DETECT (1-2), 1-2 DEVICES PER BOARD
|
||||
ESPSD0DUAL .SET TRUE ; ESPSD 0: DUAL INTERFACE BOARD (DUAL SD)
|
||||
|
||||
@@ -3,66 +3,72 @@ Final Output Files
|
||||
------------------
|
||||
|
||||
ROM Output File [512K] -> <config>.rom
|
||||
hbios_rom [32K]
|
||||
OSIMG [32K]
|
||||
OSIMG1 [32K]
|
||||
OSIMG2 [32K]
|
||||
romdisk - [384K]
|
||||
HBIOS_ROM [32K]
|
||||
ROM1 [32K]
|
||||
ROM2 [32K]
|
||||
ROM3 [32K]
|
||||
ROMDISK [384K] (size varies with ROM in system)
|
||||
|
||||
UPD Output File [128K] -> <config>.upd
|
||||
hbios_rom [32K]
|
||||
OSIMG [32K]
|
||||
OSIMG1 [32K]
|
||||
OSIMG2 [32K]
|
||||
HBIOS_ROM [32K]
|
||||
ROM1 [32K]
|
||||
ROM2 [32K]
|
||||
ROM3 [32K]
|
||||
|
||||
COM Output File -> <config>.com
|
||||
hbios_app [varies]
|
||||
OSIMG_SMALL [32K]
|
||||
HBIOS_APP [<32K] (size varies, no padding]
|
||||
APPBOOT [ 20K]
|
||||
|
||||
-------------------------
|
||||
Intermediate Output Files
|
||||
-------------------------
|
||||
|
||||
OSIMG [32K] -> osimg.bin
|
||||
romldr [4K]
|
||||
dbgmon [4K]
|
||||
ZSYS (zcpr/zsdos/cbios) [12K]
|
||||
CPM (ccp/bdos/cbios) [12K]
|
||||
ROM1 [32K] -> rom1.bin
|
||||
romldr [ 4K]
|
||||
dbgmon [ 4K]
|
||||
ZSYS [12K] (zcpr/zsdos/cbios)
|
||||
CPM [12K] (ccp/bdos/cbios)
|
||||
|
||||
OSIMG_SMALL [20K] -> osimg_small.bin
|
||||
romldr [4K]
|
||||
dbgmon [4K]
|
||||
ZSYS (zcpr/zsdos/cbios) [12K]
|
||||
|
||||
OSIMG1 [32K] -> osimg1.bin
|
||||
ROM2 [32K] -> rom2.bin
|
||||
camel80 [5.75K]
|
||||
nascom [8K]
|
||||
tastybasic [2.5K]
|
||||
nascom [8.00K]
|
||||
tastybasic [2.50K]
|
||||
game [2.25K]
|
||||
eastaegg [0.5K]
|
||||
netboot [4K]
|
||||
eastaegg [0.50K]
|
||||
netboot [4.00K]
|
||||
updater.bin [3.25K]
|
||||
sysconf.bin [2K]
|
||||
usrrom.bin [3.75K (padded)]
|
||||
sysconf.bin [2.00K]
|
||||
usrrom.bin [3.75K]
|
||||
|
||||
OSIMG2 [32K] -> osimg2.bin
|
||||
s100mon [8.25kb (optional)]
|
||||
(OR) not populated
|
||||
ROM3 [32K] -> rom3.bin
|
||||
hwmon [ 8.00K]
|
||||
invntdev [ 2.75K]
|
||||
invntslc [ 0.50K]
|
||||
fonts [ 8.00K]
|
||||
slack [12.75K]
|
||||
|
||||
APPBOOT [20K] -> appboot.bin
|
||||
romldr [ 4K]
|
||||
dbgmon [ 4K]
|
||||
ZSYS [12K] (zcpr/zsdos/cbios)
|
||||
|
||||
CPM [12K] -> cpm.bin
|
||||
ccp [2K]
|
||||
bdos [3.5K]
|
||||
cbios [6.5K]
|
||||
ccp [2.0K]
|
||||
bdos [3.5K]
|
||||
cbios [6.5K]
|
||||
|
||||
ZSYS [12K] -> zsys.bin
|
||||
zcpr [2K]
|
||||
zsdos [3.5K]
|
||||
cbios [6.5K]
|
||||
zcpr [2.0K]
|
||||
zsdos [3.5K]
|
||||
cbios [6.5K]
|
||||
|
||||
-----------------
|
||||
Compilation Units
|
||||
-----------------
|
||||
|
||||
NOTE: The following need to be reviewed. They are probably out
|
||||
of date.
|
||||
|
||||
hbios.asm -> hbios_rom.bin, hbios_app.bin
|
||||
std.asm
|
||||
ver.inc
|
||||
@@ -76,7 +82,7 @@ hbios.asm -> hbios_rom.bin, hbios_app.bin
|
||||
bcd.asm
|
||||
dsky.asm
|
||||
|
||||
romldr.asm -> romldr.bin: loader?
|
||||
romldr.asm -> romldr.bin
|
||||
std.asm
|
||||
ver.inc
|
||||
hbios.inc
|
||||
@@ -125,18 +131,16 @@ tastybasic.asm -> tastybasic.bin
|
||||
<config>.asm
|
||||
plt_<platform>.inc
|
||||
|
||||
|
||||
=======================================================================
|
||||
HBIOS Loading Modes:
|
||||
ROMBOOT: Startup from ROM Bank BID_BOOT
|
||||
APPBOOT: Startup as CP/M application
|
||||
IMGBOOT: Startup from RAM Bank BID_USR
|
||||
IMGBOOT: Startup from RAM Bank BID_USR (deprecated)
|
||||
=======================================================================
|
||||
|
||||
- If not (APPBOOT), include page 0
|
||||
|
||||
- Base Hardware Init
|
||||
- Iff (ROMBOOT), init BBR
|
||||
|
||||
- Install Proxy
|
||||
- Set CURBNK:
|
||||
@@ -149,6 +153,6 @@ HBIOS Loading Modes:
|
||||
|
||||
- Copy OS Image to USR Bank
|
||||
- If (ROM_MODE), copy BID_OS:0 --> BID_USR:0
|
||||
- Else, copy BID_USR:<os image start> --> BID_USR:0
|
||||
- Else, copy BID_BIOS:<os image start> --> BID_USR:0
|
||||
|
||||
- Chain to BID_USR:0
|
||||
|
||||
@@ -5,7 +5,7 @@ MOREDIFF = game.bin hbios_rom.bin nascom.bin usrrom.bin \
|
||||
|
||||
DEST = ../../Binary
|
||||
TOOLS =../../Tools
|
||||
OTHERS = *.img *.rom *.com *.upd *.bin *.hex cpm.sys zsys.sys Build.inc font*.asm *.dat hbios_env.sh netboot.mod
|
||||
OTHERS = *.img *.rom *.com *.upd *.bin *.hex cpm.sys zsys.sys Build.inc font*.asm *.dat hbios_env.sh
|
||||
|
||||
# DIFFMAKE = 1
|
||||
|
||||
@@ -25,7 +25,6 @@ include $(TOOLS)/Makefile.inc
|
||||
|
||||
FONTS := font6x8c.asm font6x8u.asm font8x8c.asm font8x8u.asm \
|
||||
font8x11c.asm font8x11u.asm font8x16c.asm font8x16u.asm
|
||||
|
||||
|
||||
ifeq ($(CPUFAM),2)
|
||||
TASM=$(BINDIR)/uz80as -t hd64180
|
||||
@@ -33,7 +32,7 @@ else ifeq ($(CPUFAM),3)
|
||||
TASM=$(BINDIR)/uz80as -t z280
|
||||
endif
|
||||
|
||||
DEPS=prereq dbgmon.bin romldr.bin nascom.bin tastybasic.bin game.bin eastaegg.bin updater.bin sysconf.bin sysconf.com usrrom.bin
|
||||
DEPS=prereq dbgmon.bin romldr.bin nascom.bin tastybasic.bin invntdev.bin invntslc.bin game.bin eastaegg.bin updater.bin sysconf.bin sysconf.com usrrom.bin romfonts.bin
|
||||
|
||||
ifeq ($(ROM_PLATFORM),UNA)
|
||||
ROMDEPS=romldr.bin dbgmon.bin
|
||||
@@ -44,9 +43,19 @@ else
|
||||
endif
|
||||
|
||||
ifeq ($(ROM_PLATFORM),S100)
|
||||
ROMDEPS += s100mon.bin
|
||||
HWMON=s100mon.bin
|
||||
else
|
||||
HWMON=hwmon.bin
|
||||
endif
|
||||
|
||||
ifeq ($(ROM_PLATFORM),DUO)
|
||||
NETBOOT=netboot-duo.mod
|
||||
else
|
||||
NETBOOT=netboot-mt.mod
|
||||
endif
|
||||
|
||||
DEPS += $(HWMON) $(NETBOOT)
|
||||
|
||||
ROMNAME=${ROM_PLATFORM}_${ROM_CONFIG}
|
||||
|
||||
# $(info DEPS=$(DEPS))
|
||||
@@ -61,18 +70,9 @@ ROMNAME=${ROM_PLATFORM}_${ROM_CONFIG}
|
||||
$(OBJECTS) : $(ROMDEPS)
|
||||
@cat romldr.bin dbgmon.bin ../ZSDOS/zsys_$(BIOS).bin ../CPM22/cpm_$(BIOS).bin >rom1.bin
|
||||
cat romldr.bin dbgmon.bin ../ZSDOS/zsys_$(BIOS).bin >appboot.bin
|
||||
if [ $(ROM_PLATFORM) = DUO ] ; then \
|
||||
cat netboot-duo.mod >netboot.mod ; \
|
||||
else \
|
||||
cat netboot-mt.mod >netboot.mod ; \
|
||||
fi
|
||||
if [ $(ROM_PLATFORM) != UNA ] ; then \
|
||||
cat camel80.bin nascom.bin tastybasic.bin game.bin eastaegg.bin netboot.mod updater.bin sysconf.bin usrrom.bin >rom2.bin ; \
|
||||
if [ $(ROM_PLATFORM) = S100 ] ; then \
|
||||
cat s100mon.bin >rom3.bin ; \
|
||||
else \
|
||||
>rom3.bin ; \
|
||||
fi ; \
|
||||
cat camel80.bin nascom.bin tastybasic.bin game.bin eastaegg.bin $(NETBOOT) updater.bin sysconf.bin usrrom.bin >rom2.bin ; \
|
||||
cat $(HWMON) invntdev.bin invntslc.bin romfonts.bin >rom3.bin ; \
|
||||
for f in hbios_rom.bin rom1.bin rom2.bin rom3.bin ; do \
|
||||
srec_cat $$f -Binary -Crop 0 0x7FFF -Checksum_Negative_Big_Endian 0x7FFF 1 1 -o $$f -Binary ; \
|
||||
done \
|
||||
@@ -133,8 +133,13 @@ hbios_env.sh: hbios_env.com
|
||||
romldr.bin: build.inc
|
||||
dbgmon.bin: build.inc
|
||||
nascom.bin: build.inc
|
||||
invntdev.bin: build.inc
|
||||
invntslc.bin: build.inc
|
||||
eastaegg.bin: build.inc
|
||||
updater.bin: build.inc
|
||||
romfonts.bin: build.inc
|
||||
hwmon.bin: build.inc
|
||||
s100mon.bin: build.inc
|
||||
|
||||
dumps:
|
||||
for i in $(MOREDIFF) ; do \
|
||||
|
||||
@@ -1554,4 +1554,4 @@ ANSI_DEVNUM .DB $FF ; TERMINAL DEVICE NUMBER
|
||||
; E Light Cyan
|
||||
; F Bright White
|
||||
;=============================================================
|
||||
;
|
||||
;
|
||||
|
||||
@@ -45,8 +45,8 @@ AUD_SCALE .EQU 3
|
||||
; ON ENTRY, DE IS ADDRESS OF NOTE TABLE, HL IS NOTE TO PLAY
|
||||
; NOTE VALUE 0 MEANS B0b/A0# IN OCTAVE 0 WHICH IS THE FIRST ENTRY
|
||||
; OF THE NOTE TABLE. THE NOTE TABLE REPRESENTS THE FREQUENCIES
|
||||
; FOR 1 FULL OCTAVE IN QUARTER NOTES. SINCE THERE ARE 12 NOTES
|
||||
; IN AN OCTAVE, THE TABLE HAS 48 ENTRIES FOR ALL QUARTER NOTES.
|
||||
; FOR 1 FULL OCTAVE IN EIGHTH TONES. SINCE THERE ARE 12 HALF TONES
|
||||
; IN AN OCTAVE, THE TABLE HAS 48 ENTRIES FOR ALL EIGHTH TONES.
|
||||
;
|
||||
; ON EXIT, HL CONTAINS THE PERIOD VALUE TO PROGRAM INTO THE PSG
|
||||
; DERIVED FROM THE NOTE TABLE SCALED TO THE REQUESTED OCTAVE.
|
||||
|
||||
@@ -556,10 +556,10 @@ AYT_REGWR .DB "\r\nOUT AY-3-8910 $"
|
||||
#ENDIF
|
||||
;
|
||||
;======================================================================
|
||||
; QUARTER TONE FREQUENCY TABLE
|
||||
; EIGHTH TONE FREQUENCY TABLE
|
||||
;======================================================================
|
||||
;
|
||||
; THE FOLLOWING TABLE MAPS A FULL OCTAVE OF QUARTER-NOTES
|
||||
; THE FOLLOWING TABLE MAPS A FULL OCTAVE OF EIGHTH-TONES
|
||||
; STARTING AT A# IN OCTAVE 0 TO THE CORRESPONDING PERIOD
|
||||
; VALUE TO USE ON THE PSG TO ACHIEVE THE DESIRED NOTE FREQUENCY.
|
||||
;
|
||||
|
||||
@@ -71,6 +71,7 @@ INTMODE .SET 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280)
|
||||
;
|
||||
RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM
|
||||
APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING)
|
||||
MEMMGR .SET MM_Z2 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512]
|
||||
MPGSEL_0 .SET $50 ; Z2 MEM MGR BANK 0 PAGE SELECT REG (WRITE ONLY)
|
||||
@@ -281,15 +282,18 @@ IDE2B8BIT .SET TRUE ; IDE 2B (MASTER): 8 BIT XFER
|
||||
PPIDEENABLE .SET FALSE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
|
||||
PPIDETRACE .SET 1 ; PPIDE: TRACE LEVEL (0=NO,1=ERRORS,2=ALL)
|
||||
PPIDECNT .SET 1 ; PPIDE: NUMBER OF PPI CHIPS TO DETECT (1-3), 2 DRIVES PER CHIP
|
||||
PPIDE0MODE .SET PPIDEMODE_STD ; PPIDE 0: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE0BASE .SET $88 ; PPIDE 0: PPI REGISTERS BASE ADR
|
||||
PPIDE0A8BIT .SET FALSE ; PPIDE 0A (MASTER): 8 BIT XFER
|
||||
PPIDE0B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE1MODE .SET PPIDEMODE_STD ; PPIDE 1: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE1BASE .SET $20 ; PPIDE 1: PPI REGISTERS BASE ADR
|
||||
PPIDE1A8BIT .SET FALSE ; PPIDE 1A (MASTER): 8 BIT XFER
|
||||
PPIDE1B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE2MODE .SET PPIDEMODE_STD ; PPIDE 2: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE2BASE .SET $14 ; PPIDE 2: PPI REGISTERS BASE ADR
|
||||
PPIDE2A8BIT .SET FALSE ; PPIDE 2A (MASTER): 8 BIT XFER
|
||||
PPIDE2B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE2B8BIT .SET FALSE ; PPIDE 2B (SLAVE): 8 BIT XFER
|
||||
;
|
||||
SDENABLE .SET FALSE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM)
|
||||
SDMODE .SET SDMODE_MT ; SD: DRIVER MODE: SDMODE_[JUHA|N8|CSIO|PPI|UART|DSD|MK4|SC|MT|USR|PIO|Z80R|EPITX|FZ80|GM|EZ512|K80W]
|
||||
@@ -353,6 +357,8 @@ SYQMODE .SET IMMMODE_SPP ; SYQ: DRIVER MODE: SYQMODE_[NONE|SPP|MG014]
|
||||
SYQ0BASE .SET LPT0BASE ; SYQ 0: BASE I/O ADDRESS OF PPI FOR SYQ
|
||||
SYQ1BASE .SET LPT1BASE ; SYQ 1: BASE I/O ADDRESS OF PPI FOR SYQ
|
||||
;
|
||||
ESPSDENABLE .SET FALSE ; ESPSD: ENABLE S100 ESP32 SD DISK DRIVER (ESPSD.ASM)
|
||||
;
|
||||
PIO_4P .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB 4P BOARD
|
||||
PIO4BASE .SET $90 ; PIO: PIO REGISTERS BASE ADR FOR ECB 4P BOARD
|
||||
PIO_ZP .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB ZILOG PERIPHERALS BOARD (PIO.ASM)
|
||||
@@ -374,6 +380,9 @@ AYMODE .SET AYMODE_DUO ; AY: DRIVER MODE: AYMODE_[SCG|N8|RCZ80|RCZ180|MSX|LINC|
|
||||
AY_FORCE .SET FALSE ; AY: BYPASS AUTO-DETECT, FORCED PRESENT
|
||||
;
|
||||
SPKENABLE .SET TRUE ; SPK: ENABLE RTC LATCH IOBIT SOUND DRIVER (SPK.ASM)
|
||||
SPKPORT .SET RTCIO ; SPK: THE PORT WITH THE SPEAKER IO BIT
|
||||
SPKSHADOW .SET HB_RTCVAL ; SPK: THE SHADOW VALUE FOR THE PORT THAT HAS TO BE MAINTAINED
|
||||
SPKMASK .SET %00000100 ; SPK: THE BIT MASK TO ACTUALLY TOGGLE
|
||||
;
|
||||
DMAENABLE .SET FALSE ; DMA: ENABLE DMA DRIVER (DMA.ASM)
|
||||
DMABASE .SET $40 ; DMA: DMA BASE ADDRESS
|
||||
|
||||
@@ -71,6 +71,7 @@ INTMODE .SET 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280)
|
||||
;
|
||||
RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM
|
||||
APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING)
|
||||
MEMMGR .SET MM_Z180 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512]
|
||||
RAMBIAS .SET ROMSIZE ; OFFSET OF START OF RAM IN PHYSICAL ADDRESS SPACE
|
||||
@@ -296,15 +297,18 @@ IDE2B8BIT .SET TRUE ; IDE 2B (MASTER): 8 BIT XFER
|
||||
PPIDEENABLE .SET FALSE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
|
||||
PPIDETRACE .SET 1 ; PPIDE: TRACE LEVEL (0=NO,1=ERRORS,2=ALL)
|
||||
PPIDECNT .SET 1 ; PPIDE: NUMBER OF PPI CHIPS TO DETECT (1-3), 2 DRIVES PER CHIP
|
||||
PPIDE0MODE .SET PPIDEMODE_STD ; PPIDE 0: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE0BASE .SET $4C ; PPIDE 0: PPI REGISTERS BASE ADR
|
||||
PPIDE0A8BIT .SET FALSE ; PPIDE 0A (MASTER): 8 BIT XFER
|
||||
PPIDE0B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE1MODE .SET PPIDEMODE_STD ; PPIDE 1: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE1BASE .SET $00 ; PPIDE 1: PPI REGISTERS BASE ADR
|
||||
PPIDE1A8BIT .SET FALSE ; PPIDE 1A (MASTER): 8 BIT XFER
|
||||
PPIDE1B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE2MODE .SET PPIDEMODE_STD ; PPIDE 2: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE2BASE .SET $00 ; PPIDE 2: PPI REGISTERS BASE ADR
|
||||
PPIDE2A8BIT .SET FALSE ; PPIDE 2A (MASTER): 8 BIT XFER
|
||||
PPIDE2B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE2B8BIT .SET FALSE ; PPIDE 2B (SLAVE): 8 BIT XFER
|
||||
;
|
||||
SDENABLE .SET FALSE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM)
|
||||
SDMODE .SET SDMODE_PPI ; SD: DRIVER MODE: SDMODE_[JUHA|N8|CSIO|PPI|UART|DSD|MK4|SC|MT|USR|PIO|Z80R|EPITX|FZ80|GM|EZ512|K80W]
|
||||
@@ -337,6 +341,8 @@ IMMENABLE .SET FALSE ; IMM: ENABLE IOMEGA ZIP PLUS DRIVE (IMM) DISK DRIVER (IMM
|
||||
;
|
||||
SYQENABLE .SET FALSE ; SYQ: ENABLE SYQUEST SPARQ DISK DRIVER (SYQ.ASM)
|
||||
;
|
||||
ESPSDENABLE .SET FALSE ; ESPSD: ENABLE S100 ESP32 SD DISK DRIVER (ESPSD.ASM)
|
||||
;
|
||||
PIO_4P .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB 4P BOARD
|
||||
PIO_ZP .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB ZILOG PERIPHERALS BOARD (PIO.ASM)
|
||||
PIO_SBC .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR 8255 CHIP
|
||||
|
||||
@@ -71,6 +71,7 @@ INTMODE .SET 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280)
|
||||
;
|
||||
RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM
|
||||
APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING)
|
||||
MEMMGR .SET MM_Z180 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512]
|
||||
RAMBIAS .SET ROMSIZE ; OFFSET OF START OF RAM IN PHYSICAL ADDRESS SPACE
|
||||
@@ -292,15 +293,18 @@ IDE2B8BIT .SET TRUE ; IDE 2B (MASTER): 8 BIT XFER
|
||||
PPIDEENABLE .SET FALSE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
|
||||
PPIDETRACE .SET 1 ; PPIDE: TRACE LEVEL (0=NO,1=ERRORS,2=ALL)
|
||||
PPIDECNT .SET 1 ; PPIDE: NUMBER OF PPI CHIPS TO DETECT (1-3), 2 DRIVES PER CHIP
|
||||
PPIDE0MODE .SET PPIDEMODE_STD ; PPIDE 0: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE0BASE .SET $20 ; PPIDE 0: PPI REGISTERS BASE ADR
|
||||
PPIDE0A8BIT .SET FALSE ; PPIDE 0A (MASTER): 8 BIT XFER
|
||||
PPIDE0B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE1MODE .SET PPIDEMODE_STD ; PPIDE 1: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE1BASE .SET $00 ; PPIDE 1: PPI REGISTERS BASE ADR
|
||||
PPIDE1A8BIT .SET FALSE ; PPIDE 1A (MASTER): 8 BIT XFER
|
||||
PPIDE1B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE2MODE .SET PPIDEMODE_STD ; PPIDE 2: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE2BASE .SET $00 ; PPIDE 2: PPI REGISTERS BASE ADR
|
||||
PPIDE2A8BIT .SET FALSE ; PPIDE 2A (MASTER): 8 BIT XFER
|
||||
PPIDE2B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE2B8BIT .SET FALSE ; PPIDE 2B (SLAVE): 8 BIT XFER
|
||||
;
|
||||
SDENABLE .SET TRUE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM)
|
||||
SDMODE .SET SDMODE_EPITX ; SD: DRIVER MODE: SDMODE_[JUHA|N8|CSIO|PPI|UART|DSD|MK4|SC|MT|USR|PIO|Z80R|EPITX|FZ80|GM|EZ512|K80W]
|
||||
@@ -363,6 +367,8 @@ SYQMODE .SET IMMMODE_MG014 ; SYQ: DRIVER MODE: SYQMODE_[NONE|SPP|MG014]
|
||||
SYQ0BASE .SET LPT0BASE ; SYQ 0: BASE I/O ADDRESS OF PPI FOR SYQ
|
||||
SYQ1BASE .SET LPT1BASE ; SYQ 1: BASE I/O ADDRESS OF PPI FOR SYQ
|
||||
;
|
||||
ESPSDENABLE .SET FALSE ; ESPSD: ENABLE S100 ESP32 SD DISK DRIVER (ESPSD.ASM)
|
||||
;
|
||||
PIO_4P .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB 4P BOARD
|
||||
PIO_ZP .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB ZILOG PERIPHERALS BOARD (PIO.ASM)
|
||||
PIO_SBC .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR 8255 CHIP
|
||||
|
||||
@@ -71,6 +71,7 @@ INTMODE .SET 1 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280)
|
||||
;
|
||||
RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM
|
||||
APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING)
|
||||
MEMMGR .SET MM_Z2 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512]
|
||||
MPGSEL_0 .SET $78 ; Z2 MEM MGR BANK 0 PAGE SELECT REG (WRITE ONLY)
|
||||
@@ -301,15 +302,18 @@ IDE2B8BIT .SET TRUE ; IDE 2B (MASTER): 8 BIT XFER
|
||||
PPIDEENABLE .SET FALSE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
|
||||
PPIDETRACE .SET 1 ; PPIDE: TRACE LEVEL (0=NO,1=ERRORS,2=ALL)
|
||||
PPIDECNT .SET 1 ; PPIDE: NUMBER OF PPI CHIPS TO DETECT (1-3), 2 DRIVES PER CHIP
|
||||
PPIDE0MODE .SET PPIDEMODE_STD ; PPIDE 0: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE0BASE .SET $20 ; PPIDE 0: PPI REGISTERS BASE ADR
|
||||
PPIDE0A8BIT .SET FALSE ; PPIDE 0A (MASTER): 8 BIT XFER
|
||||
PPIDE0B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE1MODE .SET PPIDEMODE_STD ; PPIDE 1: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE1BASE .SET $00 ; PPIDE 1: PPI REGISTERS BASE ADR
|
||||
PPIDE1A8BIT .SET FALSE ; PPIDE 1A (MASTER): 8 BIT XFER
|
||||
PPIDE1B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE2MODE .SET PPIDEMODE_STD ; PPIDE 2: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE2BASE .SET $00 ; PPIDE 2: PPI REGISTERS BASE ADR
|
||||
PPIDE2A8BIT .SET FALSE ; PPIDE 2A (MASTER): 8 BIT XFER
|
||||
PPIDE2B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE2B8BIT .SET FALSE ; PPIDE 2B (SLAVE): 8 BIT XFER
|
||||
;
|
||||
SDENABLE .SET FALSE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM)
|
||||
SDMODE .SET SDMODE_PIO ; SD: DRIVER MODE: SDMODE_[JUHA|N8|CSIO|PPI|UART|DSD|MK4|SC|MT|USR|PIO|Z80R|EPITX|FZ80|GM|EZ512|K80W]
|
||||
@@ -372,6 +376,8 @@ SYQMODE .SET IMMMODE_MG014 ; SYQ: DRIVER MODE: SYQMODE_[NONE|SPP|MG014]
|
||||
SYQ0BASE .SET LPT0BASE ; SYQ 0: BASE I/O ADDRESS OF PPI FOR SYQ
|
||||
SYQ1BASE .SET LPT1BASE ; SYQ 1: BASE I/O ADDRESS OF PPI FOR SYQ
|
||||
;
|
||||
ESPSDENABLE .SET FALSE ; ESPSD: ENABLE S100 ESP32 SD DISK DRIVER (ESPSD.ASM)
|
||||
;
|
||||
PIO_4P .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB 4P BOARD
|
||||
PIO_ZP .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB ZILOG PERIPHERALS BOARD (PIO.ASM)
|
||||
PIO_SBC .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR 8255 CHIP
|
||||
|
||||
@@ -71,6 +71,7 @@ INTMODE .SET 0 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280)
|
||||
;
|
||||
RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMSIZE .SET 0 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM
|
||||
APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING)
|
||||
MEMMGR .SET MM_Z2 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512]
|
||||
MPGSEL_0 .SET $78 ; Z2 MEM MGR BANK 0 PAGE SELECT REG (WRITE ONLY)
|
||||
@@ -300,16 +301,19 @@ IDE2B8BIT .SET TRUE ; IDE 2B (MASTER): 8 BIT XFER
|
||||
;
|
||||
PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
|
||||
PPIDETRACE .SET 1 ; PPIDE: TRACE LEVEL (0=NO,1=ERRORS,2=ALL)
|
||||
PPIDECNT .SET 1 ; PPIDE: NUMBER OF PPI CHIPS TO DETECT (1-3), 2 DRIVES PER CHIP
|
||||
PPIDECNT .SET 3 ; PPIDE: NUMBER OF PPI CHIPS TO DETECT (1-3), 2 DRIVES PER CHIP
|
||||
PPIDE0MODE .SET PPIDEMODE_STD ; PPIDE 0: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE0BASE .SET $30 ; PPIDE 0: PPI REGISTERS BASE ADR
|
||||
PPIDE0A8BIT .SET FALSE ; PPIDE 0A (MASTER): 8 BIT XFER
|
||||
PPIDE0B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE1BASE .SET $00 ; PPIDE 1: PPI REGISTERS BASE ADR
|
||||
PPIDE1MODE .SET PPIDEMODE_S100A ; PPIDE 1: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE1BASE .SET $38 ; PPIDE 1: PPI REGISTERS BASE ADR
|
||||
PPIDE1A8BIT .SET FALSE ; PPIDE 1A (MASTER): 8 BIT XFER
|
||||
PPIDE1B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE2BASE .SET $00 ; PPIDE 2: PPI REGISTERS BASE ADR
|
||||
PPIDE2MODE .SET PPIDEMODE_S100B ; PPIDE 2: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE2BASE .SET $38 ; PPIDE 2: PPI REGISTERS BASE ADR
|
||||
PPIDE2A8BIT .SET FALSE ; PPIDE 2A (MASTER): 8 BIT XFER
|
||||
PPIDE2B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE2B8BIT .SET FALSE ; PPIDE 2B (SLAVE): 8 BIT XFER
|
||||
;
|
||||
SDENABLE .SET TRUE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM)
|
||||
SDMODE .SET SDMODE_FZ80 ; SD: DRIVER MODE: SDMODE_[JUHA|N8|CSIO|PPI|UART|DSD|MK4|SC|MT|USR|PIO|Z80R|EPITX|FZ80|GM|EZ512|K80W]
|
||||
@@ -372,6 +376,15 @@ SYQMODE .SET IMMMODE_MG014 ; SYQ: DRIVER MODE: SYQMODE_[NONE|SPP|MG014]
|
||||
SYQ0BASE .SET LPT0BASE ; SYQ 0: BASE I/O ADDRESS OF PPI FOR SYQ
|
||||
SYQ1BASE .SET LPT1BASE ; SYQ 1: BASE I/O ADDRESS OF PPI FOR SYQ
|
||||
;
|
||||
ESPSDENABLE .SET TRUE ; ESPSD: ENABLE S100 ESP32 SD DISK DRIVER (ESPSD.ASM)
|
||||
ESPSDTRACE .SET 1 ; ESPSD: TRACE LEVEL (0=NO,1=ERRORS,2=ALL)
|
||||
ESPSDCNT .SET 1 ; ESPSD: NUMBER OF BOARDS TO DETECT (1-2), 1-2 DEVICES PER BOARD
|
||||
ESPSD_USECD .SET TRUE ; ESPSD: ENABLE CARD DETECT SIGNAL USAGE
|
||||
ESPSD0BASE .SET $80 ; ESPSD 0: ESP32 INTERFACE IO BASE ADR
|
||||
ESPSD0DUAL .SET TRUE ; ESPSD 0: DUAL INTERFACE BOARD (DUAL SD)
|
||||
ESPSD1BASE .SET $82 ; ESPSD 1: ESP32 INTERFACE IO BASE ADR
|
||||
ESPSD1DUAL .SET TRUE ; ESPSD 1: DUAL INTERFACE BOARD (DUAL SD)
|
||||
;
|
||||
PIO_4P .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB 4P BOARD
|
||||
PIO_ZP .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB ZILOG PERIPHERALS BOARD (PIO.ASM)
|
||||
PIO_SBC .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR 8255 CHIP
|
||||
|
||||
@@ -70,6 +70,7 @@ INTMODE .SET 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280)
|
||||
;
|
||||
RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM
|
||||
APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING)
|
||||
MEMMGR .SET MM_Z180 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512]
|
||||
RAMBIAS .SET ROMSIZE ; OFFSET OF START OF RAM IN PHYSICAL ADDRESS SPACE
|
||||
@@ -291,15 +292,18 @@ IDE2B8BIT .SET TRUE ; IDE 2B (MASTER): 8 BIT XFER
|
||||
PPIDEENABLE .SET FALSE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
|
||||
PPIDETRACE .SET 1 ; PPIDE: TRACE LEVEL (0=NO,1=ERRORS,2=ALL)
|
||||
PPIDECNT .SET 1 ; PPIDE: NUMBER OF PPI CHIPS TO DETECT (1-3), 2 DRIVES PER CHIP
|
||||
PPIDE0MODE .SET PPIDEMODE_STD ; PPIDE 0: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE0BASE .SET $20 ; PPIDE 0: PPI REGISTERS BASE ADR
|
||||
PPIDE0A8BIT .SET FALSE ; PPIDE 0A (MASTER): 8 BIT XFER
|
||||
PPIDE0B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE1MODE .SET PPIDEMODE_STD ; PPIDE 1: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE1BASE .SET $00 ; PPIDE 1: PPI REGISTERS BASE ADR
|
||||
PPIDE1A8BIT .SET FALSE ; PPIDE 1A (MASTER): 8 BIT XFER
|
||||
PPIDE1B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE2MODE .SET PPIDEMODE_STD ; PPIDE 2: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE2BASE .SET $00 ; PPIDE 2: PPI REGISTERS BASE ADR
|
||||
PPIDE2A8BIT .SET FALSE ; PPIDE 2A (MASTER): 8 BIT XFER
|
||||
PPIDE2B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE2B8BIT .SET FALSE ; PPIDE 2B (SLAVE): 8 BIT XFER
|
||||
;
|
||||
SDENABLE .SET TRUE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM)
|
||||
SDMODE .SET SDMODE_GM ; SD: DRIVER MODE: SDMODE_[JUHA|N8|CSIO|PPI|UART|DSD|MK4|SC|MT|USR|PIO|Z80R|EPITX|FZ80|GM|EZ512|K80W]
|
||||
@@ -362,6 +366,8 @@ SYQMODE .SET IMMMODE_MG014 ; SYQ: DRIVER MODE: SYQMODE_[NONE|SPP|MG014]
|
||||
SYQ0BASE .SET LPT0BASE ; SYQ 0: BASE I/O ADDRESS OF PPI FOR SYQ
|
||||
SYQ1BASE .SET LPT1BASE ; SYQ 1: BASE I/O ADDRESS OF PPI FOR SYQ
|
||||
;
|
||||
ESPSDENABLE .SET FALSE ; ESPSD: ENABLE S100 ESP32 SD DISK DRIVER (ESPSD.ASM)
|
||||
;
|
||||
PIO_4P .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB 4P BOARD
|
||||
PIO_ZP .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB ZILOG PERIPHERALS BOARD (PIO.ASM)
|
||||
PIO_SBC .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR 8255 CHIP
|
||||
|
||||
@@ -71,6 +71,7 @@ INTMODE .SET 1 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280)
|
||||
;
|
||||
RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM
|
||||
APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING)
|
||||
MEMMGR .SET MM_Z2 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512]
|
||||
MPGSEL_0 .SET $78 ; Z2 MEM MGR BANK 0 PAGE SELECT REG (WRITE ONLY)
|
||||
@@ -301,15 +302,18 @@ IDE2B8BIT .SET TRUE ; IDE 2B (MASTER): 8 BIT XFER
|
||||
PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
|
||||
PPIDETRACE .SET 1 ; PPIDE: TRACE LEVEL (0=NO,1=ERRORS,2=ALL)
|
||||
PPIDECNT .SET 1 ; PPIDE: NUMBER OF PPI CHIPS TO DETECT (1-3), 2 DRIVES PER CHIP
|
||||
PPIDE0MODE .SET PPIDEMODE_STD ; PPIDE 0: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE0BASE .SET $20 ; PPIDE 0: PPI REGISTERS BASE ADR
|
||||
PPIDE0A8BIT .SET FALSE ; PPIDE 0A (MASTER): 8 BIT XFER
|
||||
PPIDE0B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE1MODE .SET PPIDEMODE_STD ; PPIDE 1: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE1BASE .SET $00 ; PPIDE 1: PPI REGISTERS BASE ADR
|
||||
PPIDE1A8BIT .SET FALSE ; PPIDE 1A (MASTER): 8 BIT XFER
|
||||
PPIDE1B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE2MODE .SET PPIDEMODE_STD ; PPIDE 2: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE2BASE .SET $00 ; PPIDE 2: PPI REGISTERS BASE ADR
|
||||
PPIDE2A8BIT .SET FALSE ; PPIDE 2A (MASTER): 8 BIT XFER
|
||||
PPIDE2B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE2B8BIT .SET FALSE ; PPIDE 2B (SLAVE): 8 BIT XFER
|
||||
;
|
||||
SDENABLE .SET FALSE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM)
|
||||
SDMODE .SET SDMODE_MT ; SD: DRIVER MODE: SDMODE_[JUHA|N8|CSIO|PPI|UART|DSD|MK4|SC|MT|USR|PIO|Z80R|EPITX|FZ80|GM|EZ512|K80W]
|
||||
@@ -362,6 +366,8 @@ SYQMODE .SET IMMMODE_MG014 ; SYQ: DRIVER MODE: SYQMODE_[NONE|SPP|MG014]
|
||||
SYQ0BASE .SET LPT0BASE ; SYQ 0: BASE I/O ADDRESS OF PPI FOR SYQ
|
||||
SYQ1BASE .SET LPT1BASE ; SYQ 1: BASE I/O ADDRESS OF PPI FOR SYQ
|
||||
;
|
||||
ESPSDENABLE .SET FALSE ; ESPSD: ENABLE S100 ESP32 SD DISK DRIVER (ESPSD.ASM)
|
||||
;
|
||||
PIO_4P .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB 4P BOARD
|
||||
PIO_ZP .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB ZILOG PERIPHERALS BOARD (PIO.ASM)
|
||||
PIO_SBC .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR 8255 CHIP
|
||||
|
||||
@@ -71,6 +71,7 @@ INTMODE .EQU 0 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280)
|
||||
;
|
||||
RAMSIZE .EQU 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMSIZE .EQU 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMFONTS .EQU TRUE ; LOAD FONTS FROM ROM
|
||||
APP_BNKS .EQU $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING)
|
||||
MEMMGR .EQU MM_NONE ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512]
|
||||
RAMBIAS .EQU ROMSIZE ; OFFSET OF START OF RAM IN PHYSICAL ADDRESS SPACE
|
||||
@@ -360,15 +361,18 @@ 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
|
||||
PPIDE0MODE .EQU PPIDEMODE_NONE ; PPIDE 0: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE0BASE .EQU $60 ; PPIDE 0: PPI REGISTERS BASE ADR
|
||||
PPIDE0A8BIT .EQU FALSE ; PPIDE 0A (MASTER): 8 BIT XFER
|
||||
PPIDE0B8BIT .EQU FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE1MODE .EQU PPIDEMODE_NONE ; PPIDE 1: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE1BASE .EQU $20 ; PPIDE 1: PPI REGISTERS BASE ADR
|
||||
PPIDE1A8BIT .EQU FALSE ; PPIDE 1A (MASTER): 8 BIT XFER
|
||||
PPIDE1B8BIT .EQU FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE2MODE .EQU PPIDEMODE_NONE ; PPIDE 2: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE2BASE .EQU $14 ; PPIDE 2: PPI REGISTERS BASE ADR
|
||||
PPIDE2A8BIT .EQU FALSE ; PPIDE 2A (MASTER): 8 BIT XFER
|
||||
PPIDE2B8BIT .EQU FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE2B8BIT .EQU FALSE ; PPIDE 2B (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|PIO|Z80R|EPITX|FZ80|GM|EZ512|K80W]
|
||||
@@ -440,6 +444,15 @@ SYQMODE .EQU IMMMODE_NONE ; SYQ: DRIVER MODE: SYQMODE_[NONE|SPP|MG014]
|
||||
SYQ0BASE .EQU LPT0BASE ; SYQ 0: BASE I/O ADDRESS OF PPI FOR SYQ
|
||||
SYQ1BASE .EQU LPT1BASE ; SYQ 1: BASE I/O ADDRESS OF PPI FOR SYQ
|
||||
;
|
||||
ESPSDENABLE .EQU FALSE ; ESPSD: ENABLE S100 ESP32 SD DISK DRIVER (ESPSD.ASM)
|
||||
ESPSDTRACE .EQU 1 ; ESPSD: TRACE LEVEL (0=NO,1=ERRORS,2=ALL)
|
||||
ESPSD_USECD .EQU FALSE ; ESPSD: ENABLE CARD DETECT SIGNAL USAGE
|
||||
ESPSDCNT .EQU 1 ; ESPSD: NUMBER OF BOARDS TO DETECT (1-2), 1-2 DEVICES PER BOARD
|
||||
ESPSD0BASE .EQU $80 ; ESPSD 0: ESP32 INTERFACE IO BASE ADR
|
||||
ESPSD0DUAL .EQU TRUE ; ESPSD 0: DUAL INTERFACE BOARD (DUAL SD)
|
||||
ESPSD1BASE .EQU $82 ; ESPSD 1: ESP32 INTERFACE IO BASE ADR
|
||||
ESPSD1DUAL .EQU TRUE ; ESPSD 1: DUAL INTERFACE BOARD (DUAL SD)
|
||||
;
|
||||
PIO_4P .EQU FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB 4P BOARD
|
||||
PIO4BASE .EQU $90 ; PIO: PIO REGISTERS BASE ADR FOR ECB 4P BOARD
|
||||
PIO_ZP .EQU FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB ZILOG PERIPHERALS BOARD (PIO.ASM)
|
||||
@@ -462,6 +475,9 @@ AYMODE .EQU AYMODE_NONE ; AY: DRIVER MODE: AYMODE_[SCG|N8|RCZ80|RCZ180|MSX|LINC
|
||||
AY_FORCE .EQU FALSE ; AY: BYPASS AUTO-DETECT, FORCED PRESENT
|
||||
;
|
||||
SPKENABLE .EQU FALSE ; SPK: ENABLE RTC LATCH IOBIT SOUND DRIVER (SPK.ASM)
|
||||
SPKPORT .EQU RTCIO ; SPK: THE PORT WITH THE SPEAKER IO BIT
|
||||
SPKSHADOW .EQU HB_RTCVAL ; SPK: THE SHADOW VALUE FOR THE PORT THAT HAS TO BE MAINTAINED
|
||||
SPKMASK .EQU %00000100 ; SPK: THE BIT MASK TO ACTUALLY TOGGLE
|
||||
;
|
||||
DMAENABLE .EQU FALSE ; DMA: ENABLE DMA DRIVER (DMA.ASM)
|
||||
DMABASE .EQU $E0 ; DMA: DMA BASE ADDRESS
|
||||
@@ -499,3 +515,14 @@ EZ80_WSMD_TYP .EQU EZ80WSMD_CALC ; BUS WAIT STATE CONFIG: EZ80WSMD_[CALC|CYCLES]
|
||||
EZ80_FLSH_WS .EQU 1 ; WAIT STATES FOR ON CHIP FLASH (0-7)
|
||||
EZ80_FLSH_MIN_NS .EQU 60 ; MINIMUM WAIT STATES TO APPLY TO ON-CHIP FLASH, IF EZ80_WSMD_TYP = EZ80WSMD_CALC
|
||||
EZ80_FWSMD_TYP .EQU EZ80WSMD_CALC ; WAIT STATE TYPE: EZ80RMMD_[CALC|WAIT] (CYCLES NOT ALLOWED)
|
||||
|
||||
CHNATIVEENABLE .EQU FALSE ; CH376: ENABLE CH376 NATIVE USB DRIVER
|
||||
CHSCSIENABLE .EQU FALSE ; CH376: ENABLE CH376 NATIVE MASS STORAGE DEVICES (REQUIRES CHNATIVEENABLE)
|
||||
CHUFIENABLE .EQU FALSE ; CH376: ENABLE CH376 NATIVE UFI FLOPPY DISK DEVICES (REQUIRES CHNATIVEENABLE)
|
||||
CHNATIVEFORCE .EQU FALSE ; CH376: DISABLE AUTO-DETECTION OF MODULE - ASSUME ITS INSTALLED (REQUIRES CHNATIVEENABLE)
|
||||
CHNATIVEEZ80 .EQU FALSE ; CH376: DELEGATE USB DRIVERS TO EZ80'S FIRMWARE
|
||||
|
||||
_CH376_DATA_PORT .EQU $FF88 ; CH376: DATA PORT
|
||||
_CH376_COMMAND_PORT .EQU $FF89 ; CH376: COMMAND PORT
|
||||
_USB_MODULE_LEDS .EQU $FF8A ; CH376: LED CONTROL PORT
|
||||
|
||||
|
||||
@@ -71,6 +71,7 @@ INTMODE .SET 0 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280)
|
||||
;
|
||||
RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM
|
||||
APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING)
|
||||
MEMMGR .SET MM_MBC ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512]
|
||||
MPCL_RAM .SET $78 ; SBC MEM MGR RAM PAGE SELECT REG (WRITE ONLY)
|
||||
@@ -275,15 +276,18 @@ IDE2B8BIT .SET TRUE ; IDE 2B (MASTER): 8 BIT XFER
|
||||
PPIDEENABLE .SET FALSE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
|
||||
PPIDETRACE .SET 1 ; PPIDE: TRACE LEVEL (0=NO,1=ERRORS,2=ALL)
|
||||
PPIDECNT .SET 1 ; PPIDE: NUMBER OF PPI CHIPS TO DETECT (1-3), 2 DRIVES PER CHIP
|
||||
PPIDE0MODE .SET PPIDEMODE_STD ; PPIDE 0: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE0BASE .SET $60 ; PPIDE 0: PPI REGISTERS BASE ADR
|
||||
PPIDE0A8BIT .SET FALSE ; PPIDE 0A (MASTER): 8 BIT XFER
|
||||
PPIDE0B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE1MODE .SET PPIDEMODE_STD ; PPIDE 1: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE1BASE .SET $20 ; PPIDE 1: PPI REGISTERS BASE ADR
|
||||
PPIDE1A8BIT .SET FALSE ; PPIDE 1A (MASTER): 8 BIT XFER
|
||||
PPIDE1B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE2MODE .SET PPIDEMODE_STD ; PPIDE 2: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE2BASE .SET $14 ; PPIDE 2: PPI REGISTERS BASE ADR
|
||||
PPIDE2A8BIT .SET FALSE ; PPIDE 2A (MASTER): 8 BIT XFER
|
||||
PPIDE2B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE2B8BIT .SET FALSE ; PPIDE 2B (SLAVE): 8 BIT XFER
|
||||
;
|
||||
SDENABLE .SET FALSE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM)
|
||||
SDMODE .SET SDMODE_JUHA ; SD: DRIVER MODE: SDMODE_[JUHA|N8|CSIO|PPI|UART|DSD|MK4|SC|MT|USR|PIO|Z80R|EPITX|FZ80|GM|EZ512|K80W]
|
||||
@@ -341,6 +345,8 @@ SYQMODE .SET IMMMODE_SPP ; SYQ: DRIVER MODE: SYQMODE_[NONE|SPP|MG014]
|
||||
SYQ0BASE .SET LPT0BASE ; SYQ 0: BASE I/O ADDRESS OF PPI FOR SYQ
|
||||
SYQ1BASE .SET LPT1BASE ; SYQ 1: BASE I/O ADDRESS OF PPI FOR SYQ
|
||||
;
|
||||
ESPSDENABLE .SET FALSE ; ESPSD: ENABLE S100 ESP32 SD DISK DRIVER (ESPSD.ASM)
|
||||
;
|
||||
PIO_4P .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB 4P BOARD
|
||||
PIO4BASE .SET $90 ; PIO: PIO REGISTERS BASE ADR FOR ECB 4P BOARD
|
||||
PIO_ZP .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB ZILOG PERIPHERALS BOARD (PIO.ASM)
|
||||
@@ -361,6 +367,9 @@ AY_CLK .SET 1789772 ; AY: PSG CLOCK FREQ, ASSUME MSX STD
|
||||
AYMODE .SET AYMODE_MBC ; AY: DRIVER MODE: AYMODE_[SCG|N8|RCZ80|RCZ180|MSX|LINC|MBC|DUO|NABU]
|
||||
;
|
||||
SPKENABLE .SET TRUE ; SPK: ENABLE RTC LATCH IOBIT SOUND DRIVER (SPK.ASM)
|
||||
SPKPORT .SET RTCIO ; SPK: THE PORT WITH THE SPEAKER IO BIT
|
||||
SPKSHADOW .SET HB_RTCVAL ; SPK: THE SHADOW VALUE FOR THE PORT THAT HAS TO BE MAINTAINED
|
||||
SPKMASK .SET %00000100 ; SPK: THE BIT MASK TO ACTUALLY TOGGLE
|
||||
;
|
||||
DMAENABLE .SET FALSE ; DMA: ENABLE DMA DRIVER (DMA.ASM)
|
||||
DMABASE .SET $E0 ; DMA: DMA BASE ADDRESS
|
||||
|
||||
@@ -71,6 +71,7 @@ INTMODE .SET 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280)
|
||||
;
|
||||
RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM
|
||||
APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING)
|
||||
MEMMGR .SET MM_Z180 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512]
|
||||
RAMBIAS .SET ROMSIZE ; OFFSET OF START OF RAM IN PHYSICAL ADDRESS SPACE
|
||||
@@ -286,15 +287,18 @@ IDE2B8BIT .SET FALSE ; IDE 2B (MASTER): 8 BIT XFER
|
||||
PPIDEENABLE .SET FALSE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
|
||||
PPIDETRACE .SET 1 ; PPIDE: TRACE LEVEL (0=NO,1=ERRORS,2=ALL)
|
||||
PPIDECNT .SET 2 ; PPIDE: NUMBER OF PPI CHIPS TO DETECT (1-3), 2 DRIVES PER CHIP
|
||||
PPIDE0MODE .SET PPIDEMODE_STD ; PPIDE 0: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE0BASE .SET $14 ; PPIDE 0: PPI REGISTERS BASE ADR
|
||||
PPIDE0A8BIT .SET FALSE ; PPIDE 0A (MASTER): 8 BIT XFER
|
||||
PPIDE0B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE1MODE .SET PPIDEMODE_STD ; PPIDE 1: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE1BASE .SET $20 ; PPIDE 1: PPI REGISTERS BASE ADR
|
||||
PPIDE1A8BIT .SET FALSE ; PPIDE 1A (MASTER): 8 BIT XFER
|
||||
PPIDE1B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE2MODE .SET PPIDEMODE_STD ; PPIDE 2: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE2BASE .SET $00 ; PPIDE 2: PPI REGISTERS BASE ADR
|
||||
PPIDE2A8BIT .SET FALSE ; PPIDE 2A (MASTER): 8 BIT XFER
|
||||
PPIDE2B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE2B8BIT .SET FALSE ; PPIDE 2B (SLAVE): 8 BIT XFER
|
||||
;
|
||||
SDENABLE .SET TRUE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM)
|
||||
SDMODE .SET SDMODE_MK4 ; SD: DRIVER MODE: SDMODE_[JUHA|N8|CSIO|PPI|UART|DSD|MK4|SC|MT|USR|PIO|Z80R|EPITX|FZ80|GM|EZ512|K80W]
|
||||
@@ -334,6 +338,8 @@ IMMENABLE .SET FALSE ; IMM: ENABLE IOMEGA ZIP PLUS DRIVE (IMM) DISK DRIVER (IMM
|
||||
;
|
||||
SYQENABLE .SET FALSE ; SYQ: ENABLE SYQUEST SPARQ DISK DRIVER (SYQ.ASM)
|
||||
;
|
||||
ESPSDENABLE .SET FALSE ; ESPSD: ENABLE S100 ESP32 SD DISK DRIVER (ESPSD.ASM)
|
||||
;
|
||||
PIO_4P .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB 4P BOARD
|
||||
PIO4BASE .SET $90 ; PIO: PIO REGISTERS BASE ADR FOR ECB 4P BOARD
|
||||
PIO_ZP .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB ZILOG PERIPHERALS BOARD (PIO.ASM)
|
||||
|
||||
@@ -73,6 +73,7 @@ INTMODE .SET 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280)
|
||||
;
|
||||
RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM
|
||||
APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING)
|
||||
MEMMGR .SET MM_MON ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512]
|
||||
;
|
||||
@@ -298,15 +299,18 @@ IDE2B8BIT .SET TRUE ; IDE 2B (MASTER): 8 BIT XFER
|
||||
PPIDEENABLE .SET FALSE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
|
||||
PPIDETRACE .SET 1 ; PPIDE: TRACE LEVEL (0=NO,1=ERRORS,2=ALL)
|
||||
PPIDECNT .SET 1 ; PPIDE: NUMBER OF PPI CHIPS TO DETECT (1-3), 2 DRIVES PER CHIP
|
||||
PPIDE0MODE .SET PPIDEMODE_STD ; PPIDE 0: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE0BASE .SET $20 ; PPIDE 0: PPI REGISTERS BASE ADR
|
||||
PPIDE0A8BIT .SET FALSE ; PPIDE 0A (MASTER): 8 BIT XFER
|
||||
PPIDE0B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE1MODE .SET PPIDEMODE_STD ; PPIDE 1: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE1BASE .SET $00 ; PPIDE 1: PPI REGISTERS BASE ADR
|
||||
PPIDE1A8BIT .SET FALSE ; PPIDE 1A (MASTER): 8 BIT XFER
|
||||
PPIDE1B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE2MODE .SET PPIDEMODE_STD ; PPIDE 2: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE2BASE .SET $00 ; PPIDE 2: PPI REGISTERS BASE ADR
|
||||
PPIDE2A8BIT .SET FALSE ; PPIDE 2A (MASTER): 8 BIT XFER
|
||||
PPIDE2B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE2B8BIT .SET FALSE ; PPIDE 2B (SLAVE): 8 BIT XFER
|
||||
;
|
||||
SDENABLE .SET FALSE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM)
|
||||
SDMODE .SET SDMODE_MT ; SD: DRIVER MODE: SDMODE_[JUHA|N8|CSIO|PPI|UART|DSD|MK4|SC|MT|USR|PIO|Z80R|EPITX|FZ80|GM|EZ512|K80W]
|
||||
@@ -369,6 +373,8 @@ SYQMODE .SET IMMMODE_MG014 ; SYQ: DRIVER MODE: SYQMODE_[NONE|SPP|MG014]
|
||||
SYQ0BASE .SET LPT0BASE ; SYQ 0: BASE I/O ADDRESS OF PPI FOR SYQ
|
||||
SYQ1BASE .SET LPT1BASE ; SYQ 1: BASE I/O ADDRESS OF PPI FOR SYQ
|
||||
;
|
||||
ESPSDENABLE .SET FALSE ; ESPSD: ENABLE S100 ESP32 SD DISK DRIVER (ESPSD.ASM)
|
||||
;
|
||||
PIO_4P .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB 4P BOARD
|
||||
PIO_ZP .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB ZILOG PERIPHERALS BOARD (PIO.ASM)
|
||||
PIO_SBC .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR 8255 CHIP
|
||||
|
||||
@@ -71,6 +71,7 @@ INTMODE .SET 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280)
|
||||
;
|
||||
RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM
|
||||
APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING)
|
||||
MEMMGR .SET MM_N8 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512]
|
||||
RAMBIAS .SET 0 ; OFFSET OF START OF RAM IN PHYSICAL ADDRESS SPACE
|
||||
@@ -288,15 +289,18 @@ IDE2B8BIT .SET TRUE ; IDE 2B (MASTER): 8 BIT XFER
|
||||
PPIDEENABLE .SET FALSE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
|
||||
PPIDETRACE .SET 1 ; PPIDE: TRACE LEVEL (0=NO,1=ERRORS,2=ALL)
|
||||
PPIDECNT .SET 1 ; PPIDE: NUMBER OF PPI CHIPS TO DETECT (1-3), 2 DRIVES PER CHIP
|
||||
PPIDE0MODE .SET PPIDEMODE_STD ; PPIDE 0: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE0BASE .SET N8_PPI0 ; PPIDE 0: PPI REGISTERS BASE ADR
|
||||
PPIDE0A8BIT .SET FALSE ; PPIDE 0A (MASTER): 8 BIT XFER
|
||||
PPIDE0B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE1MODE .SET PPIDEMODE_STD ; PPIDE 1: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE1BASE .SET $00 ; PPIDE 1: PPI REGISTERS BASE ADR
|
||||
PPIDE1A8BIT .SET FALSE ; PPIDE 1A (MASTER): 8 BIT XFER
|
||||
PPIDE1B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE2MODE .SET PPIDEMODE_STD ; PPIDE 2: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE2BASE .SET $00 ; PPIDE 2: PPI REGISTERS BASE ADR
|
||||
PPIDE2A8BIT .SET FALSE ; PPIDE 2A (MASTER): 8 BIT XFER
|
||||
PPIDE2B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE2B8BIT .SET FALSE ; PPIDE 2B (SLAVE): 8 BIT XFER
|
||||
;
|
||||
SDENABLE .SET TRUE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM)
|
||||
SDMODE .SET SDMODE_CSIO ; SD: DRIVER MODE: SDMODE_[JUHA|N8|CSIO|PPI|UART|DSD|MK4|SC|MT|USR|PIO|Z80R|EPITX|FZ80|GM|EZ512|K80W]
|
||||
@@ -336,6 +340,8 @@ IMMENABLE .SET FALSE ; IMM: ENABLE IOMEGA ZIP PLUS DRIVE (IMM) DISK DRIVER (IMM
|
||||
;
|
||||
SYQENABLE .SET FALSE ; SYQ: ENABLE SYQUEST SPARQ DISK DRIVER (SYQ.ASM)
|
||||
;
|
||||
ESPSDENABLE .SET FALSE ; ESPSD: ENABLE S100 ESP32 SD DISK DRIVER (ESPSD.ASM)
|
||||
;
|
||||
PIO_4P .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB 4P BOARD
|
||||
PIO4BASE .SET $90 ; PIO: PIO REGISTERS BASE ADR FOR ECB 4P BOARD
|
||||
PIO_ZP .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB ZILOG PERIPHERALS BOARD (PIO.ASM)
|
||||
|
||||
@@ -71,6 +71,7 @@ INTMODE .SET 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280)
|
||||
;
|
||||
RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM
|
||||
APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING)
|
||||
MEMMGR .SET MM_Z2 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512]
|
||||
MPGSEL_0 .SET $78 ; Z2 MEM MGR BANK 0 PAGE SELECT REG (WRITE ONLY)
|
||||
@@ -301,15 +302,18 @@ IDE2B8BIT .SET TRUE ; IDE 2B (MASTER): 8 BIT XFER
|
||||
PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
|
||||
PPIDETRACE .SET 1 ; PPIDE: TRACE LEVEL (0=NO,1=ERRORS,2=ALL)
|
||||
PPIDECNT .SET 1 ; PPIDE: NUMBER OF PPI CHIPS TO DETECT (1-3), 2 DRIVES PER CHIP
|
||||
PPIDE0MODE .SET PPIDEMODE_STD ; PPIDE 0: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE0BASE .SET $60 ; PPIDE 0: PPI REGISTERS BASE ADR
|
||||
PPIDE0A8BIT .SET FALSE ; PPIDE 0A (MASTER): 8 BIT XFER
|
||||
PPIDE0B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE1MODE .SET PPIDEMODE_STD ; PPIDE 1: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE1BASE .SET $00 ; PPIDE 1: PPI REGISTERS BASE ADR
|
||||
PPIDE1A8BIT .SET FALSE ; PPIDE 1A (MASTER): 8 BIT XFER
|
||||
PPIDE1B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE2MODE .SET PPIDEMODE_STD ; PPIDE 2: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE2BASE .SET $00 ; PPIDE 2: PPI REGISTERS BASE ADR
|
||||
PPIDE2A8BIT .SET FALSE ; PPIDE 2A (MASTER): 8 BIT XFER
|
||||
PPIDE2B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE2B8BIT .SET FALSE ; PPIDE 2B (SLAVE): 8 BIT XFER
|
||||
;
|
||||
SDENABLE .SET FALSE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM)
|
||||
SDMODE .SET SDMODE_MT ; SD: DRIVER MODE: SDMODE_[JUHA|N8|CSIO|PPI|UART|DSD|MK4|SC|MT|USR|PIO|Z80R|EPITX|FZ80|GM|EZ512|K80W]
|
||||
@@ -372,6 +376,8 @@ SYQMODE .SET IMMMODE_MG014 ; SYQ: DRIVER MODE: SYQMODE_[NONE|SPP|MG014]
|
||||
SYQ0BASE .SET LPT0BASE ; SYQ 0: BASE I/O ADDRESS OF PPI FOR SYQ
|
||||
SYQ1BASE .SET LPT1BASE ; SYQ 1: BASE I/O ADDRESS OF PPI FOR SYQ
|
||||
;
|
||||
ESPSDENABLE .SET FALSE ; ESPSD: ENABLE S100 ESP32 SD DISK DRIVER (ESPSD.ASM)
|
||||
;
|
||||
PIO_4P .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB 4P BOARD
|
||||
PIO_ZP .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB ZILOG PERIPHERALS BOARD (PIO.ASM)
|
||||
PIO_SBC .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR 8255 CHIP
|
||||
|
||||
@@ -69,6 +69,7 @@ INTMODE .SET 1 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280)
|
||||
;
|
||||
RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM
|
||||
APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING)
|
||||
MEMMGR .SET MM_Z2 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512]
|
||||
MPGSEL_0 .SET $78 ; Z2 MEM MGR BANK 0 PAGE SELECT REG (WRITE ONLY)
|
||||
@@ -249,7 +250,7 @@ VDUENABLE .SET FALSE ; VDU: ENABLE VDU VIDEO/KBD DRIVER (VDU.ASM)
|
||||
CVDUENABLE .SET FALSE ; CVDU: ENABLE CVDU VIDEO/KBD DRIVER (CVDU.ASM)
|
||||
GDCENABLE .SET FALSE ; GDC: ENABLE 7220 GDC VIDEO/KBD DRIVER (GDC.ASM)
|
||||
TMSENABLE .SET FALSE ; TMS: ENABLE TMS9918 VIDEO/KBD DRIVER (TMS.ASM)
|
||||
TMSMODE .SET TMSMODE_MSX ; TMS: DRIVER MODE: TMSMODE_[SCG|N8|MSX|MSXKBD|MSXMKY|MBC|COLECO|DUO|NABU]
|
||||
TMSMODE .SET TMSMODE_MSX ; TMS: DRIVER MODE: TMSMODE_[SCG|N8|MSX|MSXKBD|MSXMKY|MBC|COLECO|DUO|NABU|MSXUKY]
|
||||
TMS80COLS .SET FALSE ; TMS: ENABLE 80 COLUMN SCREEN, REQUIRES V9958
|
||||
TMSTIMENABLE .SET FALSE ; TMS: ENABLE TIMER INTERRUPTS (REQUIRES IM1)
|
||||
VGAENABLE .SET FALSE ; VGA: ENABLE VGA VIDEO/KBD DRIVER (VGA.ASM)
|
||||
@@ -299,15 +300,18 @@ IDE2B8BIT .SET TRUE ; IDE 2B (MASTER): 8 BIT XFER
|
||||
PPIDEENABLE .SET FALSE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
|
||||
PPIDETRACE .SET 1 ; PPIDE: TRACE LEVEL (0=NO,1=ERRORS,2=ALL)
|
||||
PPIDECNT .SET 1 ; PPIDE: NUMBER OF PPI CHIPS TO DETECT (1-3), 2 DRIVES PER CHIP
|
||||
PPIDE0MODE .SET PPIDEMODE_STD ; PPIDE 0: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE0BASE .SET $20 ; PPIDE 0: PPI REGISTERS BASE ADR
|
||||
PPIDE0A8BIT .SET FALSE ; PPIDE 0A (MASTER): 8 BIT XFER
|
||||
PPIDE0B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE1MODE .SET PPIDEMODE_STD ; PPIDE 1: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE1BASE .SET $00 ; PPIDE 1: PPI REGISTERS BASE ADR
|
||||
PPIDE1A8BIT .SET FALSE ; PPIDE 1A (MASTER): 8 BIT XFER
|
||||
PPIDE1B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE2MODE .SET PPIDEMODE_STD ; PPIDE 2: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE2BASE .SET $00 ; PPIDE 2: PPI REGISTERS BASE ADR
|
||||
PPIDE2A8BIT .SET FALSE ; PPIDE 2A (MASTER): 8 BIT XFER
|
||||
PPIDE2B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE2B8BIT .SET FALSE ; PPIDE 2B (SLAVE): 8 BIT XFER
|
||||
;
|
||||
SDENABLE .SET FALSE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM)
|
||||
SDMODE .SET SDMODE_MT ; SD: DRIVER MODE: SDMODE_[JUHA|N8|CSIO|PPI|UART|DSD|MK4|SC|MT|USR|PIO|Z80R|EPITX|FZ80|GM|EZ512|K80W]
|
||||
@@ -373,6 +377,8 @@ SYQMODE .SET IMMMODE_MG014 ; SYQ: DRIVER MODE: SYQMODE_[NONE|SPP|MG014]
|
||||
SYQ0BASE .SET LPT0BASE ; SYQ 0: BASE I/O ADDRESS OF PPI FOR SYQ
|
||||
SYQ1BASE .SET LPT1BASE ; SYQ 1: BASE I/O ADDRESS OF PPI FOR SYQ
|
||||
;
|
||||
ESPSDENABLE .SET FALSE ; ESPSD: ENABLE S100 ESP32 SD DISK DRIVER (ESPSD.ASM)
|
||||
;
|
||||
PIO_4P .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB 4P BOARD
|
||||
PIO_ZP .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB ZILOG PERIPHERALS BOARD (PIO.ASM)
|
||||
PIO_SBC .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR 8255 CHIP
|
||||
@@ -405,6 +411,12 @@ EZ80TMR_NONE .SET 0 ; DO NOT USE ON-BOARD TIMER TO GENERATE TICKS
|
||||
EZ80TMR_INT .SET 1 ; MARSHALL TIMER TICK INTERRUPTS FROM EZ80 TO HBIOS
|
||||
EZ80TMR_FIRM .SET 2 ; DELEGATE SYS TIMER HBIOS CALL TO EZ80 FIRMWARE (TIMER TICK INTS DISABLED)
|
||||
;
|
||||
CHNATIVEENABLE .SET FALSE ; CH376: ENABLE CH376 NATIVE USB DRIVER
|
||||
CHSCSIENABLE .SET FALSE ; CH376: ENABLE CH376 NATIVE MASS STORAGE DEVICES (REQUIRES CHNATIVEENABLE)
|
||||
CHUFIENABLE .SET FALSE ; CH376: ENABLE CH376 NATIVE UFI FLOPPY DISK DEVICES (REQUIRES CHNATIVEENABLE)
|
||||
CHNATIVEFORCE .SET FALSE ; CH376: DISABLE AUTO-DETECTION OF MODULE - ASSUME ITS INSTALLED (REQUIRES CHNATIVEENABLE)
|
||||
CHNATIVEEZ80 .SET TRUE ; CH376: DELEGATE USB DRIVERS TO EZ80'S FIRMWARE
|
||||
|
||||
EZ80UARTENABLE .SET TRUE ; EZ80 UART: ENABLE EZ80 UART0 DRIVER (EZ80UART.ASM)
|
||||
EZ80RTCENABLE .SET TRUE ; EZ80 ON CHIP RTC
|
||||
EZ80TIMER .SET EZ80TMR_FIRM ; EZ80: TIMER TICK MODEL: EZ80TMR_[INT|FIRM]
|
||||
|
||||
@@ -71,6 +71,7 @@ INTMODE .SET 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280)
|
||||
;
|
||||
RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM
|
||||
APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING)
|
||||
MEMMGR .SET MM_Z180 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512]
|
||||
RAMBIAS .SET ROMSIZE ; OFFSET OF START OF RAM IN PHYSICAL ADDRESS SPACE
|
||||
@@ -296,15 +297,18 @@ IDE2B8BIT .SET TRUE ; IDE 2B (MASTER): 8 BIT XFER
|
||||
PPIDEENABLE .SET FALSE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
|
||||
PPIDETRACE .SET 1 ; PPIDE: TRACE LEVEL (0=NO,1=ERRORS,2=ALL)
|
||||
PPIDECNT .SET 1 ; PPIDE: NUMBER OF PPI CHIPS TO DETECT (1-3), 2 DRIVES PER CHIP
|
||||
PPIDE0MODE .SET PPIDEMODE_STD ; PPIDE 0: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE0BASE .SET $20 ; PPIDE 0: PPI REGISTERS BASE ADR
|
||||
PPIDE0A8BIT .SET FALSE ; PPIDE 0A (MASTER): 8 BIT XFER
|
||||
PPIDE0B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE1MODE .SET PPIDEMODE_STD ; PPIDE 1: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE1BASE .SET $00 ; PPIDE 1: PPI REGISTERS BASE ADR
|
||||
PPIDE1A8BIT .SET FALSE ; PPIDE 1A (MASTER): 8 BIT XFER
|
||||
PPIDE1B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE2MODE .SET PPIDEMODE_STD ; PPIDE 2: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE2BASE .SET $00 ; PPIDE 2: PPI REGISTERS BASE ADR
|
||||
PPIDE2A8BIT .SET FALSE ; PPIDE 2A (MASTER): 8 BIT XFER
|
||||
PPIDE2B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE2B8BIT .SET FALSE ; PPIDE 2B (SLAVE): 8 BIT XFER
|
||||
;
|
||||
SDENABLE .SET FALSE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM)
|
||||
SDMODE .SET SDMODE_PIO ; SD: DRIVER MODE: SDMODE_[JUHA|N8|CSIO|PPI|UART|DSD|MK4|SC|MT|USR|PIO|Z80R|EPITX|FZ80|GM|EZ512|K80W]
|
||||
@@ -370,6 +374,8 @@ SYQMODE .SET IMMMODE_MG014 ; SYQ: DRIVER MODE: SYQMODE_[NONE|SPP|MG014]
|
||||
SYQ0BASE .SET LPT0BASE ; SYQ 0: BASE I/O ADDRESS OF PPI FOR SYQ
|
||||
SYQ1BASE .SET LPT1BASE ; SYQ 1: BASE I/O ADDRESS OF PPI FOR SYQ
|
||||
;
|
||||
ESPSDENABLE .SET FALSE ; ESPSD: ENABLE S100 ESP32 SD DISK DRIVER (ESPSD.ASM)
|
||||
;
|
||||
PIO_4P .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB 4P BOARD
|
||||
PIO_ZP .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB ZILOG PERIPHERALS BOARD (PIO.ASM)
|
||||
PIO_SBC .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR 8255 CHIP
|
||||
|
||||
@@ -71,6 +71,7 @@ INTMODE .SET 0 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280)
|
||||
;
|
||||
RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM
|
||||
APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING)
|
||||
MEMMGR .SET MM_Z2 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512]
|
||||
RAMBIAS .SET ROMSIZE ; OFFSET OF START OF RAM IN PHYSICAL ADDRESS SPACE
|
||||
@@ -306,15 +307,18 @@ IDE2B8BIT .SET TRUE ; IDE 2B (MASTER): 8 BIT XFER
|
||||
PPIDEENABLE .SET FALSE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
|
||||
PPIDETRACE .SET 1 ; PPIDE: TRACE LEVEL (0=NO,1=ERRORS,2=ALL)
|
||||
PPIDECNT .SET 1 ; PPIDE: NUMBER OF PPI CHIPS TO DETECT (1-3), 2 DRIVES PER CHIP
|
||||
PPIDE0MODE .SET PPIDEMODE_STD ; PPIDE 0: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE0BASE .SET $20 ; PPIDE 0: PPI REGISTERS BASE ADR
|
||||
PPIDE0A8BIT .SET FALSE ; PPIDE 0A (MASTER): 8 BIT XFER
|
||||
PPIDE0B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE1MODE .SET PPIDEMODE_STD ; PPIDE 1: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE1BASE .SET $00 ; PPIDE 1: PPI REGISTERS BASE ADR
|
||||
PPIDE1A8BIT .SET FALSE ; PPIDE 1A (MASTER): 8 BIT XFER
|
||||
PPIDE1B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE2MODE .SET PPIDEMODE_STD ; PPIDE 2: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE2BASE .SET $00 ; PPIDE 2: PPI REGISTERS BASE ADR
|
||||
PPIDE2A8BIT .SET FALSE ; PPIDE 2A (MASTER): 8 BIT XFER
|
||||
PPIDE2B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE2B8BIT .SET FALSE ; PPIDE 2B (SLAVE): 8 BIT XFER
|
||||
;
|
||||
SDENABLE .SET FALSE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM)
|
||||
SDMODE .SET SDMODE_PIO ; SD: DRIVER MODE: SDMODE_[JUHA|N8|CSIO|PPI|UART|DSD|MK4|SC|MT|USR|PIO|Z80R|EPITX|FZ80|GM|EZ512|K80W]
|
||||
@@ -380,6 +384,8 @@ SYQMODE .SET IMMMODE_MG014 ; SYQ: DRIVER MODE: SYQMODE_[NONE|SPP|MG014]
|
||||
SYQ0BASE .SET LPT0BASE ; SYQ 0: BASE I/O ADDRESS OF PPI FOR SYQ
|
||||
SYQ1BASE .SET LPT1BASE ; SYQ 1: BASE I/O ADDRESS OF PPI FOR SYQ
|
||||
;
|
||||
ESPSDENABLE .SET FALSE ; ESPSD: ENABLE S100 ESP32 SD DISK DRIVER (ESPSD.ASM)
|
||||
;
|
||||
PIO_4P .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB 4P BOARD
|
||||
PIO_ZP .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB ZILOG PERIPHERALS BOARD (PIO.ASM)
|
||||
PIO_SBC .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR 8255 CHIP
|
||||
|
||||
@@ -71,6 +71,7 @@ INTMODE .SET 1 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280)
|
||||
;
|
||||
RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM
|
||||
APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING)
|
||||
MEMMGR .SET MM_Z2 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512]
|
||||
MPGSEL_0 .SET $78 ; Z2 MEM MGR BANK 0 PAGE SELECT REG (WRITE ONLY)
|
||||
@@ -304,15 +305,18 @@ IDE2B8BIT .SET TRUE ; IDE 2B (MASTER): 8 BIT XFER
|
||||
PPIDEENABLE .SET FALSE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
|
||||
PPIDETRACE .SET 1 ; PPIDE: TRACE LEVEL (0=NO,1=ERRORS,2=ALL)
|
||||
PPIDECNT .SET 1 ; PPIDE: NUMBER OF PPI CHIPS TO DETECT (1-3), 2 DRIVES PER CHIP
|
||||
PPIDE0MODE .SET PPIDEMODE_STD ; PPIDE 0: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE0BASE .SET $20 ; PPIDE 0: PPI REGISTERS BASE ADR
|
||||
PPIDE0A8BIT .SET FALSE ; PPIDE 0A (MASTER): 8 BIT XFER
|
||||
PPIDE0B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE1MODE .SET PPIDEMODE_STD ; PPIDE 1: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE1BASE .SET $00 ; PPIDE 1: PPI REGISTERS BASE ADR
|
||||
PPIDE1A8BIT .SET FALSE ; PPIDE 1A (MASTER): 8 BIT XFER
|
||||
PPIDE1B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE2MODE .SET PPIDEMODE_STD ; PPIDE 2: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE2BASE .SET $00 ; PPIDE 2: PPI REGISTERS BASE ADR
|
||||
PPIDE2A8BIT .SET FALSE ; PPIDE 2A (MASTER): 8 BIT XFER
|
||||
PPIDE2B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE2B8BIT .SET FALSE ; PPIDE 2B (SLAVE): 8 BIT XFER
|
||||
;
|
||||
SDENABLE .SET FALSE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM)
|
||||
SDMODE .SET SDMODE_PIO ; SD: DRIVER MODE: SDMODE_[JUHA|N8|CSIO|PPI|UART|DSD|MK4|SC|MT|USR|PIO|Z80R|EPITX|FZ80|GM|EZ512|K80W]
|
||||
@@ -375,6 +379,8 @@ SYQMODE .SET IMMMODE_MG014 ; SYQ: DRIVER MODE: SYQMODE_[NONE|SPP|MG014]
|
||||
SYQ0BASE .SET LPT0BASE ; SYQ 0: BASE I/O ADDRESS OF PPI FOR SYQ
|
||||
SYQ1BASE .SET LPT1BASE ; SYQ 1: BASE I/O ADDRESS OF PPI FOR SYQ
|
||||
;
|
||||
ESPSDENABLE .SET FALSE ; ESPSD: ENABLE S100 ESP32 SD DISK DRIVER (ESPSD.ASM)
|
||||
;
|
||||
PIO_4P .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB 4P BOARD
|
||||
PIO_ZP .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB ZILOG PERIPHERALS BOARD (PIO.ASM)
|
||||
PIO_SBC .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR 8255 CHIP
|
||||
|
||||
@@ -71,6 +71,7 @@ INTMODE .SET 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280)
|
||||
;
|
||||
RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM
|
||||
APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING)
|
||||
MEMMGR .SET MM_RPH ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512]
|
||||
RAMBIAS .SET 0 ; OFFSET OF START OF RAM IN PHYSICAL ADDRESS SPACE
|
||||
@@ -276,15 +277,18 @@ IDE2B8BIT .SET TRUE ; IDE 2B (MASTER): 8 BIT XFER
|
||||
PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
|
||||
PPIDETRACE .SET 1 ; PPIDE: TRACE LEVEL (0=NO,1=ERRORS,2=ALL)
|
||||
PPIDECNT .SET 1 ; PPIDE: NUMBER OF PPI CHIPS TO DETECT (1-3), 2 DRIVES PER CHIP
|
||||
PPIDE0MODE .SET PPIDEMODE_STD ; PPIDE 0: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE0BASE .SET RPH_PPI0 ; PPIDE 0: PPI REGISTERS BASE ADR
|
||||
PPIDE0A8BIT .SET FALSE ; PPIDE 0A (MASTER): 8 BIT XFER
|
||||
PPIDE0B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE1MODE .SET PPIDEMODE_STD ; PPIDE 1: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE1BASE .SET $00 ; PPIDE 1: PPI REGISTERS BASE ADR
|
||||
PPIDE1A8BIT .SET FALSE ; PPIDE 1A (MASTER): 8 BIT XFER
|
||||
PPIDE1B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE2MODE .SET PPIDEMODE_STD ; PPIDE 2: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE2BASE .SET $00 ; PPIDE 2: PPI REGISTERS BASE ADR
|
||||
PPIDE2A8BIT .SET FALSE ; PPIDE 2A (MASTER): 8 BIT XFER
|
||||
PPIDE2B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE2B8BIT .SET FALSE ; PPIDE 2B (SLAVE): 8 BIT XFER
|
||||
;
|
||||
SDENABLE .SET FALSE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM)
|
||||
SDMODE .SET SDMODE_CSIO ; SD: DRIVER MODE: SDMODE_[JUHA|N8|CSIO|PPI|UART|DSD|MK4|SC|MT|USR|PIO|Z80R|EPITX|FZ80|GM|EZ512|K80W]
|
||||
@@ -317,6 +321,8 @@ IMMENABLE .SET FALSE ; IMM: ENABLE IOMEGA ZIP PLUS DRIVE (IMM) DISK DRIVER (IMM
|
||||
;
|
||||
SYQENABLE .SET FALSE ; SYQ: ENABLE SYQUEST SPARQ DISK DRIVER (SYQ.ASM)
|
||||
;
|
||||
ESPSDENABLE .SET FALSE ; ESPSD: ENABLE S100 ESP32 SD DISK DRIVER (ESPSD.ASM)
|
||||
;
|
||||
PIO_4P .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB 4P BOARD
|
||||
PIO4BASE .SET $90 ; PIO: PIO REGISTERS BASE ADR FOR ECB 4P BOARD
|
||||
PIO_ZP .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB ZILOG PERIPHERALS BOARD (PIO.ASM)
|
||||
|
||||
@@ -71,6 +71,7 @@ INTMODE .SET 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280)
|
||||
;
|
||||
RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM
|
||||
APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING)
|
||||
MEMMGR .SET MM_Z180 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512]
|
||||
RAMBIAS .SET ROMSIZE ; OFFSET OF START OF RAM IN PHYSICAL ADDRESS SPACE
|
||||
@@ -83,7 +84,7 @@ MPGENA .SET $7C ; Z2 MEM MGR PAGING ENABLE REGISTER (BIT 0, WRITE ONLY)
|
||||
Z180_BASE .SET $C0 ; Z180: I/O BASE ADDRESS FOR INTERNAL REGISTERS
|
||||
Z180_CLKDIV .SET 1 ; Z180: CHK DIV: 0=OSC/2, 1=OSC, 2=OSC*2
|
||||
Z180_MEMWAIT .SET 1 ; Z180: MEMORY WAIT STATES (0-3)
|
||||
Z180_IOWAIT .SET 2 ; Z180: I/O WAIT STATES TO ADD ABOVE 1 W/S BUILT-IN (0-3)
|
||||
Z180_IOWAIT .SET 3 ; Z180: I/O WAIT STATES TO ADD ABOVE 1 W/S BUILT-IN (0-3)
|
||||
Z180_TIMER .SET TRUE ; Z180: ENABLE Z180 SYSTEM PERIODIC TIMER
|
||||
;
|
||||
RTCIO .SET $0C ; RTC LATCH REGISTER ADR
|
||||
@@ -295,16 +296,19 @@ IDE2B8BIT .SET TRUE ; IDE 2B (MASTER): 8 BIT XFER
|
||||
;
|
||||
PPIDEENABLE .SET FALSE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
|
||||
PPIDETRACE .SET 1 ; PPIDE: TRACE LEVEL (0=NO,1=ERRORS,2=ALL)
|
||||
PPIDECNT .SET 1 ; PPIDE: NUMBER OF PPI CHIPS TO DETECT (1-3), 2 DRIVES PER CHIP
|
||||
PPIDE0BASE .SET $20 ; PPIDE 0: PPI REGISTERS BASE ADR
|
||||
PPIDECNT .SET 2 ; PPIDE: NUMBER OF PPI CHIPS TO DETECT (1-3), 2 DRIVES PER CHIP
|
||||
PPIDE0MODE .SET PPIDEMODE_S100A ; PPIDE 0: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE0BASE .SET $30 ; PPIDE 0: PPI REGISTERS BASE ADR
|
||||
PPIDE0A8BIT .SET FALSE ; PPIDE 0A (MASTER): 8 BIT XFER
|
||||
PPIDE0B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE1BASE .SET $00 ; PPIDE 1: PPI REGISTERS BASE ADR
|
||||
PPIDE1MODE .SET PPIDEMODE_S100B ; PPIDE 1: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE1BASE .SET $30 ; PPIDE 1: PPI REGISTERS BASE ADR
|
||||
PPIDE1A8BIT .SET FALSE ; PPIDE 1A (MASTER): 8 BIT XFER
|
||||
PPIDE1B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE2MODE .SET PPIDEMODE_NONE ; PPIDE 2: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE2BASE .SET $00 ; PPIDE 2: PPI REGISTERS BASE ADR
|
||||
PPIDE2A8BIT .SET FALSE ; PPIDE 2A (MASTER): 8 BIT XFER
|
||||
PPIDE2B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE2B8BIT .SET FALSE ; PPIDE 2B (SLAVE): 8 BIT XFER
|
||||
;
|
||||
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|PIO|Z80R|EPITX|FZ80|GM|EZ512|K80W]
|
||||
@@ -357,6 +361,15 @@ SYQMODE .SET IMMMODE_MG014 ; SYQ: DRIVER MODE: SYQMODE_[NONE|SPP|MG014]
|
||||
SYQ0BASE .SET LPT0BASE ; SYQ 0: BASE I/O ADDRESS OF PPI FOR SYQ
|
||||
SYQ1BASE .SET LPT1BASE ; SYQ 1: BASE I/O ADDRESS OF PPI FOR SYQ
|
||||
;
|
||||
ESPSDENABLE .SET TRUE ; ESPSD: ENABLE S100 ESP32 SD DISK DRIVER (ESPSD.ASM)
|
||||
ESPSDTRACE .SET 1 ; ESPSD: TRACE LEVEL (0=NO,1=ERRORS,2=ALL)
|
||||
ESPSD_USECD .SET TRUE ; ESPSD: ENABLE CARD DETECT SIGNAL USAGE
|
||||
ESPSDCNT .SET 1 ; ESPSD: NUMBER OF BOARDS TO DETECT (1-2), 1-2 DEVICES PER BOARD
|
||||
ESPSD0BASE .SET $80 ; ESPSD 0: ESP32 INTERFACE IO BASE ADR
|
||||
ESPSD0DUAL .SET TRUE ; ESPSD 0: DUAL INTERFACE BOARD (DUAL SD)
|
||||
ESPSD1BASE .SET $82 ; ESPSD 1: ESP32 INTERFACE IO BASE ADR
|
||||
ESPSD1DUAL .SET TRUE ; ESPSD 1: DUAL INTERFACE BOARD (DUAL SD)
|
||||
;
|
||||
PIO_4P .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB 4P BOARD
|
||||
PIO_ZP .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB ZILOG PERIPHERALS BOARD (PIO.ASM)
|
||||
PIO_SBC .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR 8255 CHIP
|
||||
|
||||
@@ -71,6 +71,7 @@ INTMODE .SET 0 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280)
|
||||
;
|
||||
RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM
|
||||
APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING)
|
||||
MEMMGR .SET MM_SBC ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512]
|
||||
MPCL_RAM .SET $78 ; SBC MEM MGR RAM PAGE SELECT REG (WRITE ONLY)
|
||||
@@ -276,15 +277,18 @@ IDE2B8BIT .SET TRUE ; IDE 2B (MASTER): 8 BIT XFER
|
||||
PPIDEENABLE .SET FALSE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
|
||||
PPIDETRACE .SET 1 ; PPIDE: TRACE LEVEL (0=NO,1=ERRORS,2=ALL)
|
||||
PPIDECNT .SET 1 ; PPIDE: NUMBER OF PPI CHIPS TO DETECT (1-3), 2 DRIVES PER CHIP
|
||||
PPIDE0MODE .SET PPIDEMODE_STD ; PPIDE 0: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE0BASE .SET $60 ; PPIDE 0: PPI REGISTERS BASE ADR
|
||||
PPIDE0A8BIT .SET FALSE ; PPIDE 0A (MASTER): 8 BIT XFER
|
||||
PPIDE0B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE1MODE .SET PPIDEMODE_STD ; PPIDE 1: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE1BASE .SET $20 ; PPIDE 1: PPI REGISTERS BASE ADR
|
||||
PPIDE1A8BIT .SET FALSE ; PPIDE 1A (MASTER): 8 BIT XFER
|
||||
PPIDE1B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE2MODE .SET PPIDEMODE_STD ; PPIDE 2: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE2BASE .SET $14 ; PPIDE 2: PPI REGISTERS BASE ADR
|
||||
PPIDE2A8BIT .SET FALSE ; PPIDE 2A (MASTER): 8 BIT XFER
|
||||
PPIDE2B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE2B8BIT .SET FALSE ; PPIDE 2B (SLAVE): 8 BIT XFER
|
||||
;
|
||||
SDENABLE .SET FALSE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM)
|
||||
SDMODE .SET SDMODE_JUHA ; SD: DRIVER MODE: SDMODE_[JUHA|N8|CSIO|PPI|UART|DSD|MK4|SC|MT|USR|PIO|Z80R|EPITX|FZ80|GM|EZ512|K80W]
|
||||
@@ -325,6 +329,8 @@ IMMENABLE .SET FALSE ; IMM: ENABLE IOMEGA ZIP PLUS DRIVE (IMM) DISK DRIVER (IMM
|
||||
;
|
||||
SYQENABLE .SET FALSE ; SYQ: ENABLE SYQUEST SPARQ DISK DRIVER (SYQ.ASM)
|
||||
;
|
||||
ESPSDENABLE .SET FALSE ; ESPSD: ENABLE S100 ESP32 SD DISK DRIVER (ESPSD.ASM)
|
||||
;
|
||||
PIO_4P .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB 4P BOARD
|
||||
PIO4BASE .SET $90 ; PIO: PIO REGISTERS BASE ADR FOR ECB 4P BOARD
|
||||
PIO_ZP .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB ZILOG PERIPHERALS BOARD (PIO.ASM)
|
||||
@@ -347,6 +353,9 @@ AYMODE .SET AYMODE_SCG ; AY: DRIVER MODE: AYMODE_[SCG|N8|RCZ80|RCZ180|MSX|LINC|
|
||||
AY_FORCE .SET FALSE ; AY: BYPASS AUTO-DETECT, FORCED PRESENT
|
||||
;
|
||||
SPKENABLE .SET FALSE ; SPK: ENABLE RTC LATCH IOBIT SOUND DRIVER (SPK.ASM)
|
||||
SPKPORT .SET RTCIO ; SPK: THE PORT WITH THE SPEAKER IO BIT
|
||||
SPKSHADOW .SET HB_RTCVAL ; SPK: THE SHADOW VALUE FOR THE PORT THAT HAS TO BE MAINTAINED
|
||||
SPKMASK .SET %00000100 ; SPK: THE BIT MASK TO ACTUALLY TOGGLE
|
||||
;
|
||||
DMAENABLE .SET FALSE ; DMA: ENABLE DMA DRIVER (DMA.ASM)
|
||||
DMABASE .SET $E0 ; DMA: DMA BASE ADDRESS
|
||||
|
||||
@@ -71,6 +71,7 @@ INTMODE .SET 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280)
|
||||
;
|
||||
RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM
|
||||
APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING)
|
||||
MEMMGR .SET MM_Z180 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512]
|
||||
RAMBIAS .SET ROMSIZE ; OFFSET OF START OF RAM IN PHYSICAL ADDRESS SPACE
|
||||
@@ -296,15 +297,18 @@ IDE2B8BIT .SET TRUE ; IDE 2B (MASTER): 8 BIT XFER
|
||||
PPIDEENABLE .SET FALSE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
|
||||
PPIDETRACE .SET 1 ; PPIDE: TRACE LEVEL (0=NO,1=ERRORS,2=ALL)
|
||||
PPIDECNT .SET 1 ; PPIDE: NUMBER OF PPI CHIPS TO DETECT (1-3), 2 DRIVES PER CHIP
|
||||
PPIDE0MODE .SET PPIDEMODE_STD ; PPIDE 0: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE0BASE .SET $20 ; PPIDE 0: PPI REGISTERS BASE ADR
|
||||
PPIDE0A8BIT .SET FALSE ; PPIDE 0A (MASTER): 8 BIT XFER
|
||||
PPIDE0B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE1MODE .SET PPIDEMODE_STD ; PPIDE 1: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE1BASE .SET $00 ; PPIDE 1: PPI REGISTERS BASE ADR
|
||||
PPIDE1A8BIT .SET FALSE ; PPIDE 1A (MASTER): 8 BIT XFER
|
||||
PPIDE1B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE2MODE .SET PPIDEMODE_STD ; PPIDE 2: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE2BASE .SET $00 ; PPIDE 2: PPI REGISTERS BASE ADR
|
||||
PPIDE2A8BIT .SET FALSE ; PPIDE 2A (MASTER): 8 BIT XFER
|
||||
PPIDE2B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
PPIDE2B8BIT .SET FALSE ; PPIDE 2B (SLAVE): 8 BIT XFER
|
||||
;
|
||||
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|PIO|Z80R|EPITX|FZ80|GM|EZ512|K80W]
|
||||
@@ -367,6 +371,8 @@ SYQMODE .SET IMMMODE_MG014 ; SYQ: DRIVER MODE: SYQMODE_[NONE|SPP|MG014]
|
||||
SYQ0BASE .SET LPT0BASE ; SYQ 0: BASE I/O ADDRESS OF PPI FOR SYQ
|
||||
SYQ1BASE .SET LPT1BASE ; SYQ 1: BASE I/O ADDRESS OF PPI FOR SYQ
|
||||
;
|
||||
ESPSDENABLE .SET FALSE ; ESPSD: ENABLE S100 ESP32 SD DISK DRIVER (ESPSD.ASM)
|
||||
;
|
||||
PIO_4P .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB 4P BOARD
|
||||
PIO_ZP .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB ZILOG PERIPHERALS BOARD (PIO.ASM)
|
||||
PIO_SBC .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR 8255 CHIP
|
||||
|
||||
@@ -71,6 +71,7 @@ INTMODE .SET 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280)
|
||||
;
|
||||
RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM
|
||||
APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING)
|
||||
MEMMGR .SET MM_Z2 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512]
|
||||
MPGSEL_0 .SET $60 ; Z2 MEM MGR BANK 0 PAGE SELECT REG (WRITE ONLY)
|
||||
@@ -262,6 +263,7 @@ IDEENABLE .SET FALSE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM)
|
||||
PPIDEENABLE .SET FALSE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
|
||||
PPIDETRACE .SET 1 ; PPIDE: TRACE LEVEL (0=NO,1=ERRORS,2=ALL)
|
||||
PPIDECNT .SET 1 ; PPIDE: NUMBER OF PPI CHIPS TO DETECT (1-3), 2 DRIVES PER CHIP
|
||||
PPIDE0MODE .SET PPIDEMODE_STD ; PPIDE 0: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE0BASE .SET $60 ; PPIDE 0: PPI REGISTERS BASE ADR
|
||||
PPIDE0A8BIT .SET FALSE ; PPIDE 0A (MASTER): 8 BIT XFER
|
||||
PPIDE0B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
@@ -297,6 +299,8 @@ IMMENABLE .SET FALSE ; IMM: ENABLE IOMEGA ZIP PLUS DRIVE (IMM) DISK DRIVER (IMM
|
||||
;
|
||||
SYQENABLE .SET FALSE ; SYQ: ENABLE SYQUEST SPARQ DISK DRIVER (SYQ.ASM)
|
||||
;
|
||||
ESPSDENABLE .SET FALSE ; ESPSD: ENABLE S100 ESP32 SD DISK DRIVER (ESPSD.ASM)
|
||||
;
|
||||
PIO_4P .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB 4P BOARD
|
||||
PIO_ZP .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB ZILOG PERIPHERALS BOARD (PIO.ASM)
|
||||
PIO_SBC .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR 8255 CHIP
|
||||
|
||||
@@ -71,6 +71,7 @@ INTMODE .SET 0 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280)
|
||||
;
|
||||
RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM
|
||||
APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING)
|
||||
MEMMGR .SET MM_SBC ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512]
|
||||
MPCL_RAM .SET $78 ; SBC MEM MGR RAM PAGE SELECT REG (WRITE ONLY)
|
||||
@@ -231,6 +232,7 @@ IDEENABLE .SET FALSE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM)
|
||||
PPIDEENABLE .SET FALSE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
|
||||
PPIDETRACE .SET 1 ; PPIDE: TRACE LEVEL (0=NO,1=ERRORS,2=ALL)
|
||||
PPIDECNT .SET 1 ; PPIDE: NUMBER OF PPI CHIPS TO DETECT (1-3), 2 DRIVES PER CHIP
|
||||
PPIDE0MODE .SET PPIDEMODE_STD ; PPIDE 0: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE0BASE .SET $60 ; PPIDE 0: PPI REGISTERS BASE ADR
|
||||
PPIDE0A8BIT .SET FALSE ; PPIDE 0A (MASTER): 8 BIT XFER
|
||||
PPIDE0B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
@@ -267,6 +269,8 @@ IMMENABLE .SET FALSE ; IMM: ENABLE IOMEGA ZIP PLUS DRIVE (IMM) DISK DRIVER (IMM
|
||||
;
|
||||
SYQENABLE .SET FALSE ; SYQ: ENABLE SYQUEST SPARQ DISK DRIVER (SYQ.ASM)
|
||||
;
|
||||
ESPSDENABLE .SET FALSE ; ESPSD: ENABLE S100 ESP32 SD DISK DRIVER (ESPSD.ASM)
|
||||
;
|
||||
PIO_4P .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB 4P BOARD
|
||||
PIO_ZP .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB ZILOG PERIPHERALS BOARD (PIO.ASM)
|
||||
PIO_SBC .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR 8255 CHIP
|
||||
|
||||
@@ -71,6 +71,7 @@ INTMODE .SET 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280)
|
||||
;
|
||||
RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!)
|
||||
ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM
|
||||
APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING)
|
||||
MEMMGR .SET MM_Z2 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512]
|
||||
MPGSEL_0 .SET $78 ; Z2 MEM MGR BANK 0 PAGE SELECT REG (WRITE ONLY)
|
||||
@@ -242,6 +243,7 @@ IDEENABLE .SET FALSE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM)
|
||||
PPIDEENABLE .SET FALSE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
|
||||
PPIDETRACE .SET 1 ; PPIDE: TRACE LEVEL (0=NO,1=ERRORS,2=ALL)
|
||||
PPIDECNT .SET 1 ; PPIDE: NUMBER OF PPI CHIPS TO DETECT (1-3), 2 DRIVES PER CHIP
|
||||
PPIDE0MODE .SET PPIDEMODE_STD ; PPIDE 0: DRIVER MODE: IDEMODE_[STD|S100A|S100B]
|
||||
PPIDE0BASE .SET $60 ; PPIDE 0: PPI REGISTERS BASE ADR
|
||||
PPIDE0A8BIT .SET FALSE ; PPIDE 0A (MASTER): 8 BIT XFER
|
||||
PPIDE0B8BIT .SET FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER
|
||||
@@ -278,6 +280,8 @@ IMMENABLE .SET FALSE ; IMM: ENABLE IOMEGA ZIP PLUS DRIVE (IMM) DISK DRIVER (IMM
|
||||
;
|
||||
SYQENABLE .SET FALSE ; SYQ: ENABLE SYQUEST SPARQ DISK DRIVER (SYQ.ASM)
|
||||
;
|
||||
ESPSDENABLE .SET FALSE ; ESPSD: ENABLE S100 ESP32 SD DISK DRIVER (ESPSD.ASM)
|
||||
;
|
||||
PIO_4P .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB 4P BOARD
|
||||
PIO_ZP .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR ECB ZILOG PERIPHERALS BOARD (PIO.ASM)
|
||||
PIO_SBC .SET FALSE ; PIO: ENABLE PARALLEL PORT DRIVER FOR 8255 CHIP
|
||||
|
||||
107
Source/HBIOS/ch376-native/Makefile
Normal file
107
Source/HBIOS/ch376-native/Makefile
Normal file
@@ -0,0 +1,107 @@
|
||||
SHELL := /bin/sh
|
||||
SHELLFLAGS := -c -e -x
|
||||
.ONESHELL:
|
||||
MAKEFLAGS += --warn-undefined-variables
|
||||
MAKEFLAGS += --no-builtin-rules
|
||||
MAKEFLAGS += --always-make
|
||||
ZCCRELFLAGS := -SO3 --max-allocs-per-node600000 --allow-unsafe-read --opt-code-speed
|
||||
|
||||
SRC := ./source-doc/
|
||||
LIBS := -I./$(SRC)base-drv/
|
||||
ZCCFLAGS := +z80 -vn -startup=0 -clib=sdcc_iy -compiler=sdcc -Cs--std=c23 -Cs--Werror $(ZCCRELFLAGS) $(LIBS)
|
||||
|
||||
ZCC_PATH := $(shell command -v zcc)
|
||||
DOCKER_PATH := $(shell command -v docker)
|
||||
ZCC := $(shell command -v zcc >/dev/null 2>&1 && echo zcc || echo 'docker run -w /host/${PWD} -v /:/host/ -u $(shell id -u ${USER}):$(shell id -g ${USER}) -t z88dk/z88dk:20250224 zcc')
|
||||
|
||||
ifeq ($(ZCC_PATH),)
|
||||
ifeq ($(DOCKER_PATH),)
|
||||
.DEFAULT_GOAL := skip
|
||||
else
|
||||
$(info ZCC is set to use Docker to run zcc)
|
||||
endif
|
||||
else
|
||||
$(info ZCC is set to $(ZCC_PATH))
|
||||
endif
|
||||
|
||||
ASSDIR := ./
|
||||
|
||||
all: $(ASSDIR)base-drv.s $(ASSDIR)scsi-drv.s $(ASSDIR)ufi-drv.s $(ASSDIR)keyboard.s
|
||||
|
||||
skip:
|
||||
@echo "Unable to compile ch376 native to assembly. Install docker or z88dk."
|
||||
exit 0
|
||||
|
||||
clean:
|
||||
@rm -rf base-drv/*.s
|
||||
rm -rf base-drv/*.asm
|
||||
rm -rf scsi-drv/*.s
|
||||
rm -rf scsi-drv/*.asm
|
||||
rm -rf ufi-drv/*.s
|
||||
rm -rf ufi-drv/*.asm
|
||||
rm -rf keyboard/*.s
|
||||
rm -rf keyboard/*.asm
|
||||
rm ufi-drv.s
|
||||
rm scsi-drv.s
|
||||
rm base-drv.s
|
||||
rm keyboard.s
|
||||
|
||||
.PRECIOUS: $(ASSDIR)%.c.asm
|
||||
$(ASSDIR)%.c.s: $(ASSDIR)%.c.asm
|
||||
@mkdir -p $(dir $@)
|
||||
echo "Converting $< to $@"
|
||||
${SRC}convert-for-uz80as.sh $< $@
|
||||
|
||||
define compile
|
||||
@set -e
|
||||
mkdir -p $(dir $@)
|
||||
$(ZCC) $(ZCCFLAGS) --c-code-in-asm --assemble-only $< -o $@
|
||||
echo "Compiled $(notdir $@) from $(notdir $<)"
|
||||
endef
|
||||
|
||||
FIRMWARE_ALT = kyb-init ch376_init scsi-init ufi-init hbios-driver-storage
|
||||
|
||||
define build_subsystem =
|
||||
$$(ASSDIR)$(1).s:
|
||||
@echo "Creating $(1).s"
|
||||
echo "; Generated File -- not to be modify directly" > $$(ASSDIR)$(1).s
|
||||
for dep in $$^; do
|
||||
dep=$$$${dep#*/}
|
||||
dep=$$$${dep#*/}
|
||||
filename=$$$${dep##*/}
|
||||
basename=$$$${filename%.*.*}
|
||||
if echo "$(FIRMWARE_ALT)" | grep -w -q "$$$${basename}"; then
|
||||
if [ -n "$$$${dep%%*.asm}" ]; then
|
||||
echo '#include "'ch376-native/$(1)/$$$${dep}'"' >> $$(ASSDIR)$(1).s
|
||||
else
|
||||
echo '#include "'ch376-native/source-doc/$(1)/$$$${dep}'"' >> $$(ASSDIR)$(1).s
|
||||
fi
|
||||
else
|
||||
echo '#IF (!CHNATIVEEZ80)' >> $$(ASSDIR)$(1).s
|
||||
if [ -n "$$$${dep%%*.asm}" ]; then
|
||||
echo '#include "'ch376-native/$(1)/$$$${dep}'"' >> $$(ASSDIR)$(1).s
|
||||
else
|
||||
echo '#include "'ch376-native/source-doc/$(1)/$$$${dep}'"' >> $$(ASSDIR)$(1).s
|
||||
fi
|
||||
echo '#ENDIF' >> $$(ASSDIR)$(1).s
|
||||
fi
|
||||
done
|
||||
|
||||
$$(ASSDIR)$(1)/%.c.asm: $$(SRC)$(1)/%.c; $$(compile)
|
||||
# $$(ASSDIR)$(1)/%.asm: $$(SRC)$(1)/%.asm; echo $$@ $$<
|
||||
|
||||
$(1)_C_FILES := $$(wildcard $$(SRC)$(1)/*.c)
|
||||
$(1)_ASM_FILES := $$(wildcard $$(SRC)$(1)/*.asm)
|
||||
$(1)_C_S_FILES := $$(patsubst ./source-doc/%, ./%, $$($(1)_C_FILES:.c=.c.s))
|
||||
./$(1).s: $$($(1)_C_S_FILES) $$($(1)_ASM_FILES)
|
||||
endef
|
||||
|
||||
$(eval $(call build_subsystem,base-drv))
|
||||
$(eval $(call build_subsystem,scsi-drv))
|
||||
$(eval $(call build_subsystem,keyboard))
|
||||
$(eval $(call build_subsystem,ufi-drv))
|
||||
|
||||
.PHONY: format
|
||||
format: SHELL:=/bin/bash
|
||||
format:
|
||||
@find \( -name "*.c" -o -name "*.h" \) -exec echo "formating {}" \; -exec clang-format -i {} \;
|
||||
106
Source/HBIOS/ch376-native/base-drv.asm
Normal file
106
Source/HBIOS/ch376-native/base-drv.asm
Normal file
@@ -0,0 +1,106 @@
|
||||
|
||||
DELAY_FACTOR .EQU 640
|
||||
|
||||
CMD01_RD_USB_DATA0 .EQU $27 ; Read data block from current USB interrupt endpoint buffer or host endpoint receive buffer
|
||||
; output: length, data stream
|
||||
|
||||
CMD10_WR_HOST_DATA .EQU $2C ; Write a data block to the send buffer of the USB host endpoint
|
||||
; input: length, data stream
|
||||
|
||||
CH_CMD_RD_USB_DATA0 .EQU CMD01_RD_USB_DATA0
|
||||
CH_CMD_WR_HOST_DATA .EQU CMD10_WR_HOST_DATA
|
||||
|
||||
; HL -> timeout
|
||||
; returns
|
||||
; L -> error code
|
||||
|
||||
; ---------------------------------
|
||||
; Function ch_wait_int_and_get_status
|
||||
; ---------------------------------
|
||||
_ch_wait_and_get_status
|
||||
ld bc, DELAY_FACTOR
|
||||
|
||||
keep_waiting:
|
||||
ld a, $FF
|
||||
in a, (_CH376_COMMAND_PORT & $FF)
|
||||
rlca
|
||||
jp nc, _ch_get_status
|
||||
|
||||
dec bc
|
||||
ld a, b
|
||||
or c
|
||||
jr nz, keep_waiting
|
||||
|
||||
dec hl
|
||||
ld a, h
|
||||
or l
|
||||
jr nz, _ch_wait_and_get_status
|
||||
|
||||
call _delay
|
||||
ld a, $FF
|
||||
in a, (_CH376_COMMAND_PORT & $FF)
|
||||
bit 4, a ; _CH376_COMMAND_PORT & PARA_STATE_BUSY
|
||||
|
||||
ld l, $0C ; USB_ERR_CH376_BLOCKED;
|
||||
ret nz
|
||||
|
||||
ld l, $0D ; USB_ERR_CH376_TIMEOUT
|
||||
ret
|
||||
|
||||
; uint8_t ch_read_data(uint8_t *buffer) __sdcccall(1);
|
||||
_ch_read_data:
|
||||
push hl
|
||||
ld l, CH_CMD_RD_USB_DATA0
|
||||
call _ch_command
|
||||
pop hl
|
||||
|
||||
call _delay
|
||||
ld bc, _CH376_DATA_PORT
|
||||
in a, (c)
|
||||
|
||||
or a
|
||||
ret z
|
||||
|
||||
ld e, a
|
||||
push af
|
||||
read_block:
|
||||
call _delay
|
||||
in a, (c)
|
||||
ld (hl), a
|
||||
inc hl
|
||||
dec e
|
||||
jr nz, read_block
|
||||
|
||||
pop af
|
||||
ret
|
||||
|
||||
;const uint8_t *ch_write_data(const uint8_t *buffer, uint8_t length)
|
||||
_ch_write_data:
|
||||
ld l, CH_CMD_WR_HOST_DATA
|
||||
call _ch_command
|
||||
|
||||
ld iy, 2
|
||||
add iy, sp
|
||||
ld l, (iy+0)
|
||||
ld h, (iy+1)
|
||||
ld a, (iy+2)
|
||||
|
||||
ld bc, _CH376_DATA_PORT
|
||||
|
||||
; _CH376_DATA_PORT = length;
|
||||
call _delay
|
||||
out (c), a
|
||||
|
||||
or a
|
||||
ret z
|
||||
|
||||
ld d, a
|
||||
write_block:
|
||||
call _delay
|
||||
ld a, (hl)
|
||||
out (c), a
|
||||
inc hl
|
||||
dec d
|
||||
jr nz, write_block
|
||||
|
||||
ret
|
||||
39
Source/HBIOS/ch376-native/base-drv.s
Normal file
39
Source/HBIOS/ch376-native/base-drv.s
Normal file
@@ -0,0 +1,39 @@
|
||||
; Generated File -- not to be modify directly
|
||||
#IF (!CHNATIVEEZ80)
|
||||
#include "ch376-native/base-drv/ch376.c.s"
|
||||
#ENDIF
|
||||
#include "ch376-native/base-drv/ch376_init.c.s"
|
||||
#IF (!CHNATIVEEZ80)
|
||||
#include "ch376-native/base-drv/class_hub.c.s"
|
||||
#ENDIF
|
||||
#IF (!CHNATIVEEZ80)
|
||||
#include "ch376-native/base-drv/critical-section.c.s"
|
||||
#ENDIF
|
||||
#IF (!CHNATIVEEZ80)
|
||||
#include "ch376-native/base-drv/dev_transfers.c.s"
|
||||
#ENDIF
|
||||
#IF (!CHNATIVEEZ80)
|
||||
#include "ch376-native/base-drv/enumerate.c.s"
|
||||
#ENDIF
|
||||
#IF (!CHNATIVEEZ80)
|
||||
#include "ch376-native/base-drv/enumerate_hub.c.s"
|
||||
#ENDIF
|
||||
#IF (!CHNATIVEEZ80)
|
||||
#include "ch376-native/base-drv/enumerate_storage.c.s"
|
||||
#ENDIF
|
||||
#include "ch376-native/base-drv/hbios-driver-storage.c.s"
|
||||
#IF (!CHNATIVEEZ80)
|
||||
#include "ch376-native/base-drv/protocol.c.s"
|
||||
#ENDIF
|
||||
#IF (!CHNATIVEEZ80)
|
||||
#include "ch376-native/base-drv/transfers.c.s"
|
||||
#ENDIF
|
||||
#IF (!CHNATIVEEZ80)
|
||||
#include "ch376-native/base-drv/usb-base-drv.c.s"
|
||||
#ENDIF
|
||||
#IF (!CHNATIVEEZ80)
|
||||
#include "ch376-native/base-drv/usb_state.c.s"
|
||||
#ENDIF
|
||||
#IF (!CHNATIVEEZ80)
|
||||
#include "ch376-native/base-drv/work-area.c.s"
|
||||
#ENDIF
|
||||
1
Source/HBIOS/ch376-native/base-drv/.gitignore
vendored
Normal file
1
Source/HBIOS/ch376-native/base-drv/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.asm
|
||||
769
Source/HBIOS/ch376-native/base-drv/ch376.c.s
Normal file
769
Source/HBIOS/ch376-native/base-drv/ch376.c.s
Normal file
@@ -0,0 +1,769 @@
|
||||
;
|
||||
; Generated from source-doc/base-drv/ch376.c.asm -- not to be modify directly
|
||||
;
|
||||
;
|
||||
;--------------------------------------------------------
|
||||
; File Created by SDCC : free open source ISO C Compiler
|
||||
; Version 4.5.0 #15248 (Linux)
|
||||
;--------------------------------------------------------
|
||||
; Processed by Z88DK
|
||||
;--------------------------------------------------------
|
||||
|
||||
|
||||
;--------------------------------------------------------
|
||||
; Public variables in this module
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; Externals used
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; special function registers
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; ram data
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; ram data
|
||||
;--------------------------------------------------------
|
||||
|
||||
#IF 0
|
||||
|
||||
; .area _INITIALIZED removed by z88dk
|
||||
|
||||
|
||||
#ENDIF
|
||||
|
||||
;--------------------------------------------------------
|
||||
; absolute external ram data
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; global & static initialisations
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; Home
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; code
|
||||
;--------------------------------------------------------
|
||||
;source-doc/base-drv/ch376.c:6: void ch_command(const uint8_t command) __z88dk_fastcall {
|
||||
; ---------------------------------
|
||||
; Function ch_command
|
||||
; ---------------------------------
|
||||
_ch_command:
|
||||
;source-doc/base-drv/ch376.c:8: while ((CH376_COMMAND_PORT & PARA_STATE_BUSY) && --counter != 0)
|
||||
ld b,$ff
|
||||
l_ch_command_00102:
|
||||
ld a, +((_CH376_COMMAND_PORT) / 256)
|
||||
in a, (((_CH376_COMMAND_PORT) & $FF))
|
||||
bit 4, a
|
||||
jr Z,l_ch_command_00104
|
||||
djnz l_ch_command_00102
|
||||
l_ch_command_00104:
|
||||
;source-doc/base-drv/ch376.c:19: CH376_COMMAND_PORT = command;
|
||||
ld a, l
|
||||
ld bc,_CH376_COMMAND_PORT
|
||||
out (c), a
|
||||
;source-doc/base-drv/ch376.c:20: }
|
||||
ret
|
||||
;source-doc/base-drv/ch376.c:24: usb_error ch_long_get_status(void) { return ch_wait_and_get_status(5000); }
|
||||
; ---------------------------------
|
||||
; Function ch_long_get_status
|
||||
; ---------------------------------
|
||||
_ch_long_get_status:
|
||||
ld hl,$1388
|
||||
jp _ch_wait_and_get_status
|
||||
;source-doc/base-drv/ch376.c:26: usb_error ch_short_get_status(void) { return ch_wait_and_get_status(100); }
|
||||
; ---------------------------------
|
||||
; Function ch_short_get_status
|
||||
; ---------------------------------
|
||||
_ch_short_get_status:
|
||||
ld hl,$0064
|
||||
jp _ch_wait_and_get_status
|
||||
;source-doc/base-drv/ch376.c:28: usb_error ch_very_short_status(void) { return ch_wait_and_get_status(10); }
|
||||
; ---------------------------------
|
||||
; Function ch_very_short_status
|
||||
; ---------------------------------
|
||||
_ch_very_short_status:
|
||||
ld hl,$000a
|
||||
jp _ch_wait_and_get_status
|
||||
;source-doc/base-drv/ch376.c:30: usb_error ch_get_status(void) {
|
||||
; ---------------------------------
|
||||
; Function ch_get_status
|
||||
; ---------------------------------
|
||||
_ch_get_status:
|
||||
;source-doc/base-drv/ch376.c:31: ch_command(CH_CMD_GET_STATUS);
|
||||
ld l,$22
|
||||
call _ch_command
|
||||
;source-doc/base-drv/ch376.c:32: uint8_t ch_status = CH376_DATA_PORT;
|
||||
ld a, +((_CH376_DATA_PORT) / 256)
|
||||
in a, (((_CH376_DATA_PORT) & $FF))
|
||||
;source-doc/base-drv/ch376.c:34: if (ch_status >= USB_FILERR_MIN && ch_status <= USB_FILERR_MAX)
|
||||
cp $41
|
||||
jr C,l_ch_get_status_00102
|
||||
cp $b5
|
||||
jr NC,l_ch_get_status_00102
|
||||
;source-doc/base-drv/ch376.c:35: return ch_status;
|
||||
ld l, a
|
||||
jr l_ch_get_status_00126
|
||||
l_ch_get_status_00102:
|
||||
;source-doc/base-drv/ch376.c:37: if (ch_status == CH_CMD_RET_SUCCESS)
|
||||
cp $51
|
||||
jr NZ,l_ch_get_status_00105
|
||||
;source-doc/base-drv/ch376.c:38: return USB_ERR_OK;
|
||||
ld l,$00
|
||||
jr l_ch_get_status_00126
|
||||
l_ch_get_status_00105:
|
||||
;source-doc/base-drv/ch376.c:40: if (ch_status == CH_USB_INT_SUCCESS)
|
||||
cp $14
|
||||
jr NZ,l_ch_get_status_00107
|
||||
;source-doc/base-drv/ch376.c:41: return USB_ERR_OK;
|
||||
ld l,$00
|
||||
jr l_ch_get_status_00126
|
||||
l_ch_get_status_00107:
|
||||
;source-doc/base-drv/ch376.c:43: if (ch_status == CH_USB_INT_CONNECT)
|
||||
cp $15
|
||||
jr NZ,l_ch_get_status_00109
|
||||
;source-doc/base-drv/ch376.c:44: return USB_INT_CONNECT;
|
||||
ld l,$81
|
||||
jr l_ch_get_status_00126
|
||||
l_ch_get_status_00109:
|
||||
;source-doc/base-drv/ch376.c:46: if (ch_status == CH_USB_INT_DISK_READ)
|
||||
cp $1d
|
||||
jr NZ,l_ch_get_status_00111
|
||||
;source-doc/base-drv/ch376.c:47: return USB_ERR_DISK_READ;
|
||||
ld l,$1d
|
||||
jr l_ch_get_status_00126
|
||||
l_ch_get_status_00111:
|
||||
;source-doc/base-drv/ch376.c:49: if (ch_status == CH_USB_INT_DISK_WRITE)
|
||||
cp $1e
|
||||
jr NZ,l_ch_get_status_00113
|
||||
;source-doc/base-drv/ch376.c:50: return USB_ERR_DISK_WRITE;
|
||||
ld l,$1e
|
||||
jr l_ch_get_status_00126
|
||||
l_ch_get_status_00113:
|
||||
;source-doc/base-drv/ch376.c:52: if (ch_status == CH_USB_INT_DISCONNECT) {
|
||||
cp $16
|
||||
jr NZ,l_ch_get_status_00115
|
||||
;source-doc/base-drv/ch376.c:53: ch_cmd_set_usb_mode(5);
|
||||
ld l,$05
|
||||
call _ch_cmd_set_usb_mode
|
||||
;source-doc/base-drv/ch376.c:54: return USB_ERR_NO_DEVICE;
|
||||
ld l,$05
|
||||
jr l_ch_get_status_00126
|
||||
l_ch_get_status_00115:
|
||||
;source-doc/base-drv/ch376.c:57: if (ch_status == CH_USB_INT_BUF_OVER)
|
||||
cp $17
|
||||
jr NZ,l_ch_get_status_00117
|
||||
;source-doc/base-drv/ch376.c:58: return USB_ERR_DATA_ERROR;
|
||||
ld l,$04
|
||||
jr l_ch_get_status_00126
|
||||
l_ch_get_status_00117:
|
||||
;source-doc/base-drv/ch376.c:60: ch_status &= $2F;
|
||||
and $2f
|
||||
;source-doc/base-drv/ch376.c:62: if (ch_status == $2A)
|
||||
cp $2a
|
||||
jr NZ,l_ch_get_status_00119
|
||||
;source-doc/base-drv/ch376.c:63: return USB_ERR_NAK;
|
||||
ld l,$01
|
||||
jr l_ch_get_status_00126
|
||||
l_ch_get_status_00119:
|
||||
;source-doc/base-drv/ch376.c:65: if (ch_status == $2E)
|
||||
cp $2e
|
||||
jr NZ,l_ch_get_status_00121
|
||||
;source-doc/base-drv/ch376.c:66: return USB_ERR_STALL;
|
||||
ld l,$02
|
||||
jr l_ch_get_status_00126
|
||||
l_ch_get_status_00121:
|
||||
;source-doc/base-drv/ch376.c:68: ch_status &= $23;
|
||||
and $23
|
||||
;source-doc/base-drv/ch376.c:70: if (ch_status == $20)
|
||||
cp $20
|
||||
jr NZ,l_ch_get_status_00123
|
||||
;source-doc/base-drv/ch376.c:71: return USB_ERR_TIMEOUT;
|
||||
ld l,$03
|
||||
jr l_ch_get_status_00126
|
||||
l_ch_get_status_00123:
|
||||
;source-doc/base-drv/ch376.c:73: if (ch_status == $23)
|
||||
sub $23
|
||||
jr NZ,l_ch_get_status_00125
|
||||
;source-doc/base-drv/ch376.c:74: return USB_TOKEN_OUT_OF_SYNC;
|
||||
ld l,$07
|
||||
jr l_ch_get_status_00126
|
||||
l_ch_get_status_00125:
|
||||
;source-doc/base-drv/ch376.c:76: return USB_ERR_UNEXPECTED_STATUS_FROM_;
|
||||
ld l,$08
|
||||
l_ch_get_status_00126:
|
||||
;source-doc/base-drv/ch376.c:77: }
|
||||
ret
|
||||
;source-doc/base-drv/ch376.c:79: void ch_cmd_reset_all(void) { ch_command(CH_CMD_RESET_ALL); }
|
||||
; ---------------------------------
|
||||
; Function ch_cmd_reset_all
|
||||
; ---------------------------------
|
||||
_ch_cmd_reset_all:
|
||||
ld l,$05
|
||||
jp _ch_command
|
||||
;source-doc/base-drv/ch376.c:98: uint8_t ch_probe(void) {
|
||||
; ---------------------------------
|
||||
; Function ch_probe
|
||||
; ---------------------------------
|
||||
_ch_probe:
|
||||
push ix
|
||||
ld ix,0
|
||||
add ix,sp
|
||||
dec sp
|
||||
;source-doc/base-drv/ch376.c:100: do {
|
||||
ld (ix-1),$05
|
||||
l_ch_probe_00103:
|
||||
;source-doc/base-drv/ch376.c:83: ch_command(CH_CMD_CHECK_EXIST);
|
||||
ld l,$06
|
||||
call _ch_command
|
||||
;source-doc/base-drv/ch376.c:84: CH376_DATA_PORT = (uint8_t)~$55;
|
||||
ld a,$aa
|
||||
ld bc,_CH376_DATA_PORT
|
||||
out (c), a
|
||||
;source-doc/base-drv/ch376.c:85: delay();
|
||||
call _delay
|
||||
;source-doc/base-drv/ch376.c:86: complement = CH376_DATA_PORT;
|
||||
ld a, +((_CH376_DATA_PORT) / 256)
|
||||
in a, (((_CH376_DATA_PORT) & $FF))
|
||||
;source-doc/base-drv/ch376.c:87: return complement == $55;
|
||||
sub $55
|
||||
jr NZ,l_ch_probe_00102
|
||||
;source-doc/base-drv/ch376.c:101: if (ch_cmd_check_exist())
|
||||
;source-doc/base-drv/ch376.c:102: return true;
|
||||
ld l,$01
|
||||
jr l_ch_probe_00107
|
||||
l_ch_probe_00102:
|
||||
;source-doc/base-drv/ch376.c:104: delay_short();
|
||||
call _delay_short
|
||||
;source-doc/base-drv/ch376.c:105: } while (--i != 0);
|
||||
dec (ix-1)
|
||||
jr NZ,l_ch_probe_00103
|
||||
;source-doc/base-drv/ch376.c:107: return false;
|
||||
ld l,$00
|
||||
l_ch_probe_00107:
|
||||
;source-doc/base-drv/ch376.c:108: }
|
||||
inc sp
|
||||
pop ix
|
||||
ret
|
||||
;source-doc/base-drv/ch376.c:110: usb_error ch_cmd_set_usb_mode(const uint8_t mode) __z88dk_fastcall {
|
||||
; ---------------------------------
|
||||
; Function ch_cmd_set_usb_mode
|
||||
; ---------------------------------
|
||||
_ch_cmd_set_usb_mode:
|
||||
ld c, l
|
||||
;source-doc/base-drv/ch376.c:111: uint8_t result = 0;
|
||||
ld b,$00
|
||||
;source-doc/base-drv/ch376.c:113: CH376_COMMAND_PORT = CH_CMD_SET_USB_MODE;
|
||||
ld a,$15
|
||||
push bc
|
||||
ld bc,_CH376_COMMAND_PORT
|
||||
out (c), a
|
||||
;source-doc/base-drv/ch376.c:114: delay();
|
||||
call _delay
|
||||
pop bc
|
||||
;source-doc/base-drv/ch376.c:115: CH376_DATA_PORT = mode;
|
||||
ld a, c
|
||||
push bc
|
||||
ld bc,_CH376_DATA_PORT
|
||||
out (c), a
|
||||
;source-doc/base-drv/ch376.c:116: delay();
|
||||
call _delay
|
||||
pop bc
|
||||
;source-doc/base-drv/ch376.c:120: while (result != CH_CMD_RET_SUCCESS && result != CH_CMD_RET_ABORT && --count != 0) {
|
||||
ld c,$7f
|
||||
l_ch_cmd_set_usb_mode_00103:
|
||||
ld a, b
|
||||
sub $51
|
||||
jr NZ,l_ch_cmd_set_usb_mode_00146
|
||||
ld a,$01
|
||||
jr l_ch_cmd_set_usb_mode_00147
|
||||
l_ch_cmd_set_usb_mode_00146:
|
||||
xor a
|
||||
l_ch_cmd_set_usb_mode_00147:
|
||||
ld e,a
|
||||
bit 0,a
|
||||
jr NZ,l_ch_cmd_set_usb_mode_00105
|
||||
ld a, b
|
||||
sub $5f
|
||||
jr Z,l_ch_cmd_set_usb_mode_00105
|
||||
dec c
|
||||
jr Z,l_ch_cmd_set_usb_mode_00105
|
||||
;source-doc/base-drv/ch376.c:121: result = CH376_DATA_PORT;
|
||||
ld a, +((_CH376_DATA_PORT) / 256)
|
||||
in a, (((_CH376_DATA_PORT) & $FF))
|
||||
ld b, a
|
||||
;source-doc/base-drv/ch376.c:122: delay();
|
||||
push bc
|
||||
call _delay
|
||||
pop bc
|
||||
jr l_ch_cmd_set_usb_mode_00103
|
||||
l_ch_cmd_set_usb_mode_00105:
|
||||
;source-doc/base-drv/ch376.c:125: return (result == CH_CMD_RET_SUCCESS) ? USB_ERR_OK : USB_ERR_FAIL;
|
||||
ld a, e
|
||||
or a
|
||||
jr Z,l_ch_cmd_set_usb_mode_00108
|
||||
ld l,$00
|
||||
jr l_ch_cmd_set_usb_mode_00109
|
||||
l_ch_cmd_set_usb_mode_00108:
|
||||
ld l,$0e
|
||||
l_ch_cmd_set_usb_mode_00109:
|
||||
;source-doc/base-drv/ch376.c:126: }
|
||||
ret
|
||||
;source-doc/base-drv/ch376.c:128: uint8_t ch_cmd_get_ic_version(void) {
|
||||
; ---------------------------------
|
||||
; Function ch_cmd_get_ic_version
|
||||
; ---------------------------------
|
||||
_ch_cmd_get_ic_version:
|
||||
;source-doc/base-drv/ch376.c:129: ch_command(CH_CMD_GET_IC_VER);
|
||||
ld l,$01
|
||||
call _ch_command
|
||||
;source-doc/base-drv/ch376.c:130: return CH376_DATA_PORT & $1f;
|
||||
ld a, +((_CH376_DATA_PORT) / 256)
|
||||
in a, (((_CH376_DATA_PORT) & $FF))
|
||||
and $1f
|
||||
ld l, a
|
||||
;source-doc/base-drv/ch376.c:131: }
|
||||
ret
|
||||
;source-doc/base-drv/ch376.c:133: void ch_issue_token(const uint8_t toggle_bit, const uint8_t endpoint, const ch376_pid pid) {
|
||||
; ---------------------------------
|
||||
; Function ch_issue_token
|
||||
; ---------------------------------
|
||||
_ch_issue_token:
|
||||
push ix
|
||||
ld ix,0
|
||||
add ix,sp
|
||||
;source-doc/base-drv/ch376.c:134: ch_command(CH_CMD_ISSUE_TKN_X);
|
||||
ld l,$4e
|
||||
call _ch_command
|
||||
;source-doc/base-drv/ch376.c:135: CH376_DATA_PORT = toggle_bit;
|
||||
ld a,(ix+4)
|
||||
ld bc,_CH376_DATA_PORT
|
||||
out (c), a
|
||||
;source-doc/base-drv/ch376.c:136: CH376_DATA_PORT = endpoint << 4 | pid;
|
||||
ld a,(ix+5)
|
||||
add a, a
|
||||
add a, a
|
||||
add a, a
|
||||
add a, a
|
||||
or (ix+6)
|
||||
ld bc,_CH376_DATA_PORT
|
||||
out (c), a
|
||||
;source-doc/base-drv/ch376.c:137: }
|
||||
pop ix
|
||||
ret
|
||||
;source-doc/base-drv/ch376.c:139: void ch_issue_token_in(const endpoint_param *const endpoint) __z88dk_fastcall {
|
||||
; ---------------------------------
|
||||
; Function ch_issue_token_in
|
||||
; ---------------------------------
|
||||
_ch_issue_token_in:
|
||||
;source-doc/base-drv/ch376.c:140: ch_issue_token(endpoint->toggle ? $80 : $00, endpoint->number, CH_PID_IN);
|
||||
ld e,l
|
||||
ld d,h
|
||||
ld a, (hl)
|
||||
rrca
|
||||
and $07
|
||||
ld b, a
|
||||
ex de, hl
|
||||
ld a, (hl)
|
||||
and $01
|
||||
jr Z,l_ch_issue_token_in_00103
|
||||
ld a,$80
|
||||
jr l_ch_issue_token_in_00104
|
||||
l_ch_issue_token_in_00103:
|
||||
xor a
|
||||
l_ch_issue_token_in_00104:
|
||||
ld h,$09
|
||||
ld l,b
|
||||
push hl
|
||||
push af
|
||||
inc sp
|
||||
call _ch_issue_token
|
||||
pop af
|
||||
inc sp
|
||||
;source-doc/base-drv/ch376.c:141: }
|
||||
ret
|
||||
;source-doc/base-drv/ch376.c:143: void ch_issue_token_out(const endpoint_param *const endpoint) __z88dk_fastcall {
|
||||
; ---------------------------------
|
||||
; Function ch_issue_token_out
|
||||
; ---------------------------------
|
||||
_ch_issue_token_out:
|
||||
;source-doc/base-drv/ch376.c:144: ch_issue_token(endpoint->toggle ? $40 : $00, endpoint->number, CH_PID_OUT);
|
||||
ld e,l
|
||||
ld d,h
|
||||
ld a, (hl)
|
||||
rrca
|
||||
and $07
|
||||
ld b, a
|
||||
ex de, hl
|
||||
ld a, (hl)
|
||||
and $01
|
||||
jr Z,l_ch_issue_token_out_00103
|
||||
ld a,$40
|
||||
jr l_ch_issue_token_out_00104
|
||||
l_ch_issue_token_out_00103:
|
||||
xor a
|
||||
l_ch_issue_token_out_00104:
|
||||
ld h,$01
|
||||
ld l,b
|
||||
push hl
|
||||
push af
|
||||
inc sp
|
||||
call _ch_issue_token
|
||||
pop af
|
||||
inc sp
|
||||
;source-doc/base-drv/ch376.c:145: }
|
||||
ret
|
||||
;source-doc/base-drv/ch376.c:147: void ch_issue_token_out_ep0(void) { ch_issue_token($40, 0, CH_PID_OUT); }
|
||||
; ---------------------------------
|
||||
; Function ch_issue_token_out_ep0
|
||||
; ---------------------------------
|
||||
_ch_issue_token_out_ep0:
|
||||
ld a,$01
|
||||
push af
|
||||
inc sp
|
||||
xor a
|
||||
ld d,a
|
||||
ld e,$40
|
||||
push de
|
||||
call _ch_issue_token
|
||||
pop af
|
||||
inc sp
|
||||
ret
|
||||
;source-doc/base-drv/ch376.c:149: void ch_issue_token_in_ep0(void) { ch_issue_token($80, 0, CH_PID_IN); }
|
||||
; ---------------------------------
|
||||
; Function ch_issue_token_in_ep0
|
||||
; ---------------------------------
|
||||
_ch_issue_token_in_ep0:
|
||||
ld a,$09
|
||||
push af
|
||||
inc sp
|
||||
xor a
|
||||
ld d,a
|
||||
ld e,$80
|
||||
push de
|
||||
call _ch_issue_token
|
||||
pop af
|
||||
inc sp
|
||||
ret
|
||||
;source-doc/base-drv/ch376.c:151: void ch_issue_token_setup(void) { ch_issue_token(0, 0, CH_PID_SETUP); }
|
||||
; ---------------------------------
|
||||
; Function ch_issue_token_setup
|
||||
; ---------------------------------
|
||||
_ch_issue_token_setup:
|
||||
ld a,$0d
|
||||
push af
|
||||
inc sp
|
||||
xor a
|
||||
push af
|
||||
inc sp
|
||||
xor a
|
||||
push af
|
||||
inc sp
|
||||
call _ch_issue_token
|
||||
pop af
|
||||
inc sp
|
||||
ret
|
||||
;source-doc/base-drv/ch376.c:153: usb_error ch_data_in_transfer(uint8_t *buffer, int16_t buffer_size, endpoint_param *const endpoint) {
|
||||
; ---------------------------------
|
||||
; Function ch_data_in_transfer
|
||||
; ---------------------------------
|
||||
_ch_data_in_transfer:
|
||||
push ix
|
||||
ld ix,0
|
||||
add ix,sp
|
||||
;source-doc/base-drv/ch376.c:157: if (buffer_size == 0)
|
||||
ld a,(ix+7)
|
||||
or (ix+6)
|
||||
jr NZ,l_ch_data_in_transfer_00102
|
||||
;source-doc/base-drv/ch376.c:158: return USB_ERR_OK;
|
||||
ld l,$00
|
||||
jp l_ch_data_in_transfer_00111
|
||||
l_ch_data_in_transfer_00102:
|
||||
;source-doc/base-drv/ch376.c:160: USB_MODULE_LEDS = $01;
|
||||
ld a,$01
|
||||
ld bc,_USB_MODULE_LEDS
|
||||
out (c), a
|
||||
;source-doc/base-drv/ch376.c:161: do {
|
||||
ld c,(ix+8)
|
||||
ld b,(ix+9)
|
||||
l_ch_data_in_transfer_00107:
|
||||
;source-doc/base-drv/ch376.c:162: ch_issue_token_in(endpoint);
|
||||
ld l,c
|
||||
ld h,b
|
||||
push hl
|
||||
call _ch_issue_token_in
|
||||
;source-doc/base-drv/ch376.c:164: result = ch_long_get_status();
|
||||
call _ch_long_get_status
|
||||
ld a, l
|
||||
pop bc
|
||||
ld l, a
|
||||
;source-doc/base-drv/ch376.c:165: CHECK(result);
|
||||
or a
|
||||
jr NZ,l_ch_data_in_transfer_00110
|
||||
;source-doc/base-drv/ch376.c:167: endpoint->toggle = !endpoint->toggle;
|
||||
ld e, c
|
||||
ld d, b
|
||||
ld l, e
|
||||
ld h, d
|
||||
ld a, (hl)
|
||||
and $01
|
||||
xor $01
|
||||
and $01
|
||||
ld l, a
|
||||
ld a, (de)
|
||||
and $fe
|
||||
or l
|
||||
ld (de), a
|
||||
;source-doc/base-drv/ch376.c:169: count = ch_read_data(buffer);
|
||||
push bc
|
||||
ld l,(ix+4)
|
||||
ld h,(ix+5)
|
||||
call _ch_read_data
|
||||
ld e, a
|
||||
pop bc
|
||||
;source-doc/base-drv/ch376.c:171: if (count == 0) {
|
||||
ld a, e
|
||||
;source-doc/base-drv/ch376.c:172: USB_MODULE_LEDS = $00;
|
||||
or a
|
||||
jr NZ,l_ch_data_in_transfer_00106
|
||||
ld bc,_USB_MODULE_LEDS
|
||||
out (c), a
|
||||
;source-doc/base-drv/ch376.c:173: return USB_ERR_DATA_ERROR;
|
||||
ld l,$04
|
||||
jr l_ch_data_in_transfer_00111
|
||||
l_ch_data_in_transfer_00106:
|
||||
;source-doc/base-drv/ch376.c:176: buffer += count;
|
||||
ld a,(ix+4)
|
||||
add a, e
|
||||
ld (ix+4),a
|
||||
jr NC,l_ch_data_in_transfer_00148
|
||||
inc (ix+5)
|
||||
l_ch_data_in_transfer_00148:
|
||||
;source-doc/base-drv/ch376.c:177: buffer_size -= count;
|
||||
ld d,$00
|
||||
ld a,(ix+6)
|
||||
sub e
|
||||
ld (ix+6),a
|
||||
ld a,(ix+7)
|
||||
sbc a, d
|
||||
ld (ix+7),a
|
||||
;source-doc/base-drv/ch376.c:178: } while (buffer_size > 0);
|
||||
xor a
|
||||
cp (ix+6)
|
||||
sbc a,(ix+7)
|
||||
jp PO, l_ch_data_in_transfer_00149
|
||||
xor $80
|
||||
l_ch_data_in_transfer_00149:
|
||||
jp M, l_ch_data_in_transfer_00107
|
||||
;source-doc/base-drv/ch376.c:180: USB_MODULE_LEDS = $00;
|
||||
ld a,$00
|
||||
ld bc,_USB_MODULE_LEDS
|
||||
out (c), a
|
||||
;source-doc/base-drv/ch376.c:181: return USB_ERR_OK;
|
||||
ld l,$00
|
||||
jr l_ch_data_in_transfer_00111
|
||||
;source-doc/base-drv/ch376.c:183: done:
|
||||
l_ch_data_in_transfer_00110:
|
||||
;source-doc/base-drv/ch376.c:184: USB_MODULE_LEDS = $00;
|
||||
ld a,$00
|
||||
ld bc,_USB_MODULE_LEDS
|
||||
out (c), a
|
||||
;source-doc/base-drv/ch376.c:185: return result;
|
||||
l_ch_data_in_transfer_00111:
|
||||
;source-doc/base-drv/ch376.c:186: }
|
||||
pop ix
|
||||
ret
|
||||
;source-doc/base-drv/ch376.c:189: usb_error ch_data_in_transfer_n(uint8_t *const buffer, uint8_t *const buffer_size, endpoint_param *const endpoint) {
|
||||
; ---------------------------------
|
||||
; Function ch_data_in_transfer_n
|
||||
; ---------------------------------
|
||||
_ch_data_in_transfer_n:
|
||||
push ix
|
||||
ld ix,0
|
||||
add ix,sp
|
||||
;source-doc/base-drv/ch376.c:193: USB_MODULE_LEDS = $01;
|
||||
ld a,$01
|
||||
ld bc,_USB_MODULE_LEDS
|
||||
out (c), a
|
||||
;source-doc/base-drv/ch376.c:195: ch_issue_token_in(endpoint);
|
||||
ld l,(ix+8)
|
||||
ld h,(ix+9)
|
||||
call _ch_issue_token_in
|
||||
;source-doc/base-drv/ch376.c:197: CHECK(ch_long_get_status());
|
||||
call _ch_long_get_status
|
||||
ld a,l
|
||||
or a
|
||||
jr NZ,l_ch_data_in_transfer_n_00103
|
||||
;source-doc/base-drv/ch376.c:199: endpoint->toggle = !endpoint->toggle;
|
||||
ld l,(ix+8)
|
||||
ld h,(ix+9)
|
||||
ld a, (hl)
|
||||
and $01
|
||||
xor $01
|
||||
and $01
|
||||
ld c, a
|
||||
ld a, (hl)
|
||||
and $fe
|
||||
or c
|
||||
ld (hl), a
|
||||
;source-doc/base-drv/ch376.c:201: count = ch_read_data(buffer);
|
||||
ld l,(ix+4)
|
||||
ld h,(ix+5)
|
||||
call _ch_read_data
|
||||
;source-doc/base-drv/ch376.c:203: *buffer_size = count;
|
||||
ld c,(ix+6)
|
||||
ld b,(ix+7)
|
||||
ld (bc), a
|
||||
;source-doc/base-drv/ch376.c:205: USB_MODULE_LEDS = $00;
|
||||
ld a,$00
|
||||
ld bc,_USB_MODULE_LEDS
|
||||
out (c), a
|
||||
;source-doc/base-drv/ch376.c:207: return USB_ERR_OK;
|
||||
ld l,$00
|
||||
jr l_ch_data_in_transfer_n_00104
|
||||
;source-doc/base-drv/ch376.c:208: done:
|
||||
l_ch_data_in_transfer_n_00103:
|
||||
;source-doc/base-drv/ch376.c:209: USB_MODULE_LEDS = $00;
|
||||
ld a,$00
|
||||
ld bc,_USB_MODULE_LEDS
|
||||
out (c), a
|
||||
;source-doc/base-drv/ch376.c:210: return result;
|
||||
l_ch_data_in_transfer_n_00104:
|
||||
;source-doc/base-drv/ch376.c:211: }
|
||||
pop ix
|
||||
ret
|
||||
;source-doc/base-drv/ch376.c:213: usb_error ch_data_out_transfer(const uint8_t *buffer, int16_t buffer_length, endpoint_param *const endpoint) {
|
||||
; ---------------------------------
|
||||
; Function ch_data_out_transfer
|
||||
; ---------------------------------
|
||||
_ch_data_out_transfer:
|
||||
push ix
|
||||
ld ix,0
|
||||
add ix,sp
|
||||
dec sp
|
||||
;source-doc/base-drv/ch376.c:216: const uint8_t max_packet_size = calc_max_packet_size(endpoint->max_packet_sizex);
|
||||
ld c,(ix+8)
|
||||
ld b,(ix+9)
|
||||
ld e, c
|
||||
ld d, b
|
||||
inc de
|
||||
ld a, (de)
|
||||
ld (ix-1),a
|
||||
;source-doc/base-drv/ch376.c:218: USB_MODULE_LEDS = $02;
|
||||
ld a,$02
|
||||
push bc
|
||||
ld bc,_USB_MODULE_LEDS
|
||||
out (c), a
|
||||
pop bc
|
||||
;source-doc/base-drv/ch376.c:220: while (buffer_length > 0) {
|
||||
l_ch_data_out_transfer_00103:
|
||||
xor a
|
||||
cp (ix+6)
|
||||
sbc a,(ix+7)
|
||||
jp PO, l_ch_data_out_transfer_00139
|
||||
xor $80
|
||||
l_ch_data_out_transfer_00139:
|
||||
jp P, l_ch_data_out_transfer_00105
|
||||
;source-doc/base-drv/ch376.c:221: const uint8_t size = max_packet_size < buffer_length ? max_packet_size : buffer_length;
|
||||
ld d,(ix-1)
|
||||
ld e,$00
|
||||
ld a, d
|
||||
sub (ix+6)
|
||||
ld a, e
|
||||
sbc a,(ix+7)
|
||||
jp PO, l_ch_data_out_transfer_00140
|
||||
xor $80
|
||||
l_ch_data_out_transfer_00140:
|
||||
jp P, l_ch_data_out_transfer_00109
|
||||
jr l_ch_data_out_transfer_00110
|
||||
l_ch_data_out_transfer_00109:
|
||||
ld d,(ix+6)
|
||||
ld e,(ix+7)
|
||||
l_ch_data_out_transfer_00110:
|
||||
;source-doc/base-drv/ch376.c:222: buffer = ch_write_data(buffer, size);
|
||||
push bc
|
||||
push de
|
||||
push de
|
||||
inc sp
|
||||
ld l,(ix+4)
|
||||
ld h,(ix+5)
|
||||
push hl
|
||||
call _ch_write_data
|
||||
pop af
|
||||
inc sp
|
||||
pop de
|
||||
pop bc
|
||||
ld (ix+4),l
|
||||
ld (ix+5),h
|
||||
;source-doc/base-drv/ch376.c:223: buffer_length -= size;
|
||||
ld e,$00
|
||||
ld a,(ix+6)
|
||||
sub d
|
||||
ld (ix+6),a
|
||||
ld a,(ix+7)
|
||||
sbc a, e
|
||||
ld (ix+7),a
|
||||
;source-doc/base-drv/ch376.c:224: ch_issue_token_out(endpoint);
|
||||
ld l,c
|
||||
ld h,b
|
||||
push hl
|
||||
call _ch_issue_token_out
|
||||
;source-doc/base-drv/ch376.c:226: CHECK(ch_long_get_status());
|
||||
call _ch_long_get_status
|
||||
ld a, l
|
||||
pop bc
|
||||
ld l, a
|
||||
or a
|
||||
jr NZ,l_ch_data_out_transfer_00106
|
||||
;source-doc/base-drv/ch376.c:228: endpoint->toggle = !endpoint->toggle;
|
||||
ld e, c
|
||||
ld d, b
|
||||
ld l, e
|
||||
ld h, d
|
||||
ld a, (hl)
|
||||
and $01
|
||||
xor $01
|
||||
and $01
|
||||
ld l, a
|
||||
ld a, (de)
|
||||
and $fe
|
||||
or l
|
||||
ld (de), a
|
||||
jr l_ch_data_out_transfer_00103
|
||||
l_ch_data_out_transfer_00105:
|
||||
;source-doc/base-drv/ch376.c:231: USB_MODULE_LEDS = $00;
|
||||
ld a,$00
|
||||
ld bc,_USB_MODULE_LEDS
|
||||
out (c), a
|
||||
;source-doc/base-drv/ch376.c:232: return USB_ERR_OK;
|
||||
ld l,$00
|
||||
jr l_ch_data_out_transfer_00107
|
||||
;source-doc/base-drv/ch376.c:234: done:
|
||||
l_ch_data_out_transfer_00106:
|
||||
;source-doc/base-drv/ch376.c:235: USB_MODULE_LEDS = $00;
|
||||
ld a,$00
|
||||
ld bc,_USB_MODULE_LEDS
|
||||
out (c), a
|
||||
;source-doc/base-drv/ch376.c:236: return result;
|
||||
l_ch_data_out_transfer_00107:
|
||||
;source-doc/base-drv/ch376.c:237: }
|
||||
inc sp
|
||||
pop ix
|
||||
ret
|
||||
;source-doc/base-drv/ch376.c:239: void ch_set_usb_address(const uint8_t device_address) __z88dk_fastcall {
|
||||
; ---------------------------------
|
||||
; Function ch_set_usb_address
|
||||
; ---------------------------------
|
||||
_ch_set_usb_address:
|
||||
;source-doc/base-drv/ch376.c:240: ch_command(CH_CMD_SET_USB_ADDR);
|
||||
push hl
|
||||
ld l,$13
|
||||
call _ch_command
|
||||
pop hl
|
||||
;source-doc/base-drv/ch376.c:241: CH376_DATA_PORT = device_address;
|
||||
ld a, l
|
||||
ld bc,_CH376_DATA_PORT
|
||||
out (c), a
|
||||
;source-doc/base-drv/ch376.c:242: }
|
||||
ret
|
||||
319
Source/HBIOS/ch376-native/base-drv/ch376_init.c.s
Normal file
319
Source/HBIOS/ch376-native/base-drv/ch376_init.c.s
Normal file
@@ -0,0 +1,319 @@
|
||||
;
|
||||
; Generated from source-doc/base-drv/ch376_init.c.asm -- not to be modify directly
|
||||
;
|
||||
;
|
||||
;--------------------------------------------------------
|
||||
; File Created by SDCC : free open source ISO C Compiler
|
||||
; Version 4.5.0 #15248 (Linux)
|
||||
;--------------------------------------------------------
|
||||
; Processed by Z88DK
|
||||
;--------------------------------------------------------
|
||||
|
||||
|
||||
;--------------------------------------------------------
|
||||
; Public variables in this module
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; Externals used
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; special function registers
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; ram data
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; ram data
|
||||
;--------------------------------------------------------
|
||||
|
||||
#IF 0
|
||||
|
||||
; .area _INITIALIZED removed by z88dk
|
||||
|
||||
|
||||
#ENDIF
|
||||
|
||||
;--------------------------------------------------------
|
||||
; absolute external ram data
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; global & static initialisations
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; Home
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; code
|
||||
;--------------------------------------------------------
|
||||
;source-doc/base-drv/ch376_init.c:4: static uint16_t wait_for_state(const uint8_t loop_counter, uint8_t state, const uint8_t desired_state) __sdcccall(1) {
|
||||
; ---------------------------------
|
||||
; Function wait_for_state
|
||||
; ---------------------------------
|
||||
_wait_for_state:
|
||||
push ix
|
||||
ld ix,0
|
||||
add ix,sp
|
||||
dec sp
|
||||
ld (ix-1),a
|
||||
;source-doc/base-drv/ch376_init.c:5: uint16_t r = state;
|
||||
ld c,l
|
||||
ld e,l
|
||||
;source-doc/base-drv/ch376_init.c:7: for (uint8_t i = 0; i < loop_counter; i++) {
|
||||
ld d,$00
|
||||
ld b,d
|
||||
l_wait_for_state_00108:
|
||||
ld a, b
|
||||
sub (ix-1)
|
||||
jr NC,l_wait_for_state_00106
|
||||
;source-doc/base-drv/ch376_init.c:8: if (state == desired_state)
|
||||
ld a,(ix+4)
|
||||
sub c
|
||||
jr Z,l_wait_for_state_00106
|
||||
;source-doc/base-drv/ch376_init.c:11: if (i & 1)
|
||||
bit 0, b
|
||||
jr Z,l_wait_for_state_00104
|
||||
;source-doc/base-drv/ch376_init.c:12: print_string("\b $");
|
||||
push bc
|
||||
ld hl,ch376_init_str_0
|
||||
call _print_string
|
||||
pop bc
|
||||
jr l_wait_for_state_00105
|
||||
l_wait_for_state_00104:
|
||||
;source-doc/base-drv/ch376_init.c:14: print_string("\b*$");
|
||||
push bc
|
||||
ld hl,ch376_init_str_1
|
||||
call _print_string
|
||||
pop bc
|
||||
l_wait_for_state_00105:
|
||||
;source-doc/base-drv/ch376_init.c:16: r = usb_init(state);
|
||||
push bc
|
||||
ld l, c
|
||||
call _usb_init
|
||||
ex de, hl
|
||||
pop bc
|
||||
;source-doc/base-drv/ch376_init.c:17: state = r & 255;
|
||||
ld c, e
|
||||
;source-doc/base-drv/ch376_init.c:7: for (uint8_t i = 0; i < loop_counter; i++) {
|
||||
inc b
|
||||
jr l_wait_for_state_00108
|
||||
l_wait_for_state_00106:
|
||||
;source-doc/base-drv/ch376_init.c:20: return r;
|
||||
;source-doc/base-drv/ch376_init.c:21: }
|
||||
inc sp
|
||||
pop ix
|
||||
pop hl
|
||||
inc sp
|
||||
jp (hl)
|
||||
ch376_init_str_0:
|
||||
DEFB $08
|
||||
DEFM " $"
|
||||
DEFB $00
|
||||
ch376_init_str_1:
|
||||
DEFB $08
|
||||
DEFM "*$"
|
||||
DEFB $00
|
||||
;source-doc/base-drv/ch376_init.c:33: static void _chnative_init(bool forced) {
|
||||
; ---------------------------------
|
||||
; Function _chnative_init
|
||||
; ---------------------------------
|
||||
__chnative_init:
|
||||
push ix
|
||||
ld ix,0
|
||||
add ix,sp
|
||||
dec sp
|
||||
;source-doc/base-drv/ch376_init.c:36: const uint8_t loop_counter = forced ? 40 : 5;
|
||||
bit 0,(ix+4)
|
||||
jr Z,l__chnative_init_00113
|
||||
ld a,$28
|
||||
jr l__chnative_init_00114
|
||||
l__chnative_init_00113:
|
||||
ld a,$05
|
||||
l__chnative_init_00114:
|
||||
ld (ix-1),a
|
||||
;source-doc/base-drv/ch376_init.c:38: print_string("\r\nCH376: IO=0x$");
|
||||
ld hl,ch376_init_str_2
|
||||
call _print_string
|
||||
;source-doc/base-drv/ch376_init.c:39: print_hex((uint8_t)&CH376_DAT_PORT_ADDR);
|
||||
ld l, +((_CH376_DAT_PORT_ADDR) & $FF)
|
||||
call _print_hex
|
||||
;source-doc/base-drv/ch376_init.c:40: print_string(comma_0_x_dollar);
|
||||
ld hl,_comma_0_x_dollar
|
||||
call _print_string
|
||||
;source-doc/base-drv/ch376_init.c:41: print_hex((uint8_t)&CH376_CMD_PORT_ADDR);
|
||||
ld l, +((_CH376_CMD_PORT_ADDR) & $FF)
|
||||
call _print_hex
|
||||
;source-doc/base-drv/ch376_init.c:42: print_string(comma_0_x_dollar);
|
||||
ld hl,_comma_0_x_dollar
|
||||
call _print_string
|
||||
;source-doc/base-drv/ch376_init.c:43: print_hex((uint8_t)&USB_MOD_LEDS_ADDR);
|
||||
ld l, +((_USB_MOD_LEDS_ADDR) & $FF)
|
||||
call _print_hex
|
||||
;source-doc/base-drv/ch376_init.c:44: print_string(" *$");
|
||||
ld hl,ch376_init_str_3
|
||||
call _print_string
|
||||
;source-doc/base-drv/ch376_init.c:46: r = wait_for_state(loop_counter, state, 1);
|
||||
ld a,$01
|
||||
push af
|
||||
inc sp
|
||||
ld l,$00
|
||||
ld a,(ix-1)
|
||||
call _wait_for_state
|
||||
;source-doc/base-drv/ch376_init.c:47: state = r & 255;
|
||||
;source-doc/base-drv/ch376_init.c:49: print_string("\bPRESENT (VER $");
|
||||
push de
|
||||
ld hl,ch376_init_str_4
|
||||
call _print_string
|
||||
pop de
|
||||
;source-doc/base-drv/ch376_init.c:51: r = usb_init(state);
|
||||
ld l, e
|
||||
call _usb_init
|
||||
ex de, hl
|
||||
;source-doc/base-drv/ch376_init.c:52: state = r & 255;
|
||||
ld c, e
|
||||
;source-doc/base-drv/ch376_init.c:53: if (state != 2) {
|
||||
ld a, c
|
||||
sub $02
|
||||
jr Z,l__chnative_init_00102
|
||||
;source-doc/base-drv/ch376_init.c:54: print_string("\rCH376: $");
|
||||
ld hl,ch376_init_str_5
|
||||
call _print_string
|
||||
;source-doc/base-drv/ch376_init.c:55: print_string("VERSION FAILURE\r\n$");
|
||||
ld hl,ch376_init_str_6
|
||||
call _print_string
|
||||
;source-doc/base-drv/ch376_init.c:56: return;
|
||||
jr l__chnative_init_00111
|
||||
l__chnative_init_00102:
|
||||
;source-doc/base-drv/ch376_init.c:59: print_hex(r >> 8);
|
||||
push bc
|
||||
ld l, d
|
||||
call _print_hex
|
||||
;source-doc/base-drv/ch376_init.c:60: print_string(ch376_driver_version);
|
||||
ld hl,_ch376_driver_version
|
||||
call _print_string
|
||||
;source-doc/base-drv/ch376_init.c:62: print_string("USB: *$");
|
||||
ld hl,ch376_init_str_7
|
||||
call _print_string
|
||||
pop bc
|
||||
;source-doc/base-drv/ch376_init.c:64: r = wait_for_state(loop_counter, state, 3);
|
||||
ld a,$03
|
||||
push af
|
||||
inc sp
|
||||
ld l, c
|
||||
ld a,(ix-1)
|
||||
call _wait_for_state
|
||||
;source-doc/base-drv/ch376_init.c:65: state = r & 255;
|
||||
;source-doc/base-drv/ch376_init.c:67: if (state == 2) {
|
||||
ld a, e
|
||||
sub $02
|
||||
jr NZ,l__chnative_init_00104
|
||||
;source-doc/base-drv/ch376_init.c:68: print_string("\bDISCONNECTED$");
|
||||
ld hl,ch376_init_str_8
|
||||
call _print_string
|
||||
;source-doc/base-drv/ch376_init.c:69: return;
|
||||
jr l__chnative_init_00111
|
||||
l__chnative_init_00104:
|
||||
;source-doc/base-drv/ch376_init.c:72: print_string("\bCONNECTED$");
|
||||
push de
|
||||
ld hl,ch376_init_str_9
|
||||
call _print_string
|
||||
pop de
|
||||
;source-doc/base-drv/ch376_init.c:75: r = usb_init(state);
|
||||
ld l, e
|
||||
call _usb_init
|
||||
ex de, hl
|
||||
;source-doc/base-drv/ch376_init.c:76: state = r & 255;
|
||||
ld c, e
|
||||
;source-doc/base-drv/ch376_init.c:78: for (uint8_t i = 0; i < loop_counter; i++) {
|
||||
ld b,$00
|
||||
l__chnative_init_00109:
|
||||
ld a, b
|
||||
sub (ix-1)
|
||||
jr NC,l__chnative_init_00111
|
||||
;source-doc/base-drv/ch376_init.c:79: if (r >> 8 != 0)
|
||||
ld a,$00
|
||||
or d
|
||||
jr NZ,l__chnative_init_00111
|
||||
;source-doc/base-drv/ch376_init.c:82: print_string(".$");
|
||||
push bc
|
||||
ld hl,ch376_init_str_10
|
||||
call _print_string
|
||||
pop bc
|
||||
;source-doc/base-drv/ch376_init.c:83: r = usb_init(state);
|
||||
push bc
|
||||
ld l, c
|
||||
call _usb_init
|
||||
ex de, hl
|
||||
pop bc
|
||||
;source-doc/base-drv/ch376_init.c:84: state = r & 255;
|
||||
ld c, e
|
||||
;source-doc/base-drv/ch376_init.c:78: for (uint8_t i = 0; i < loop_counter; i++) {
|
||||
inc b
|
||||
jr l__chnative_init_00109
|
||||
l__chnative_init_00111:
|
||||
;source-doc/base-drv/ch376_init.c:86: }
|
||||
inc sp
|
||||
pop ix
|
||||
ret
|
||||
_comma_0_x_dollar:
|
||||
DEFB +$20
|
||||
DEFB +$30
|
||||
DEFB +$78
|
||||
DEFB +$24
|
||||
ch376_init_str_2:
|
||||
DEFB $0d
|
||||
DEFB $0a
|
||||
DEFM "CH376: IO=0x$"
|
||||
DEFB $00
|
||||
ch376_init_str_3:
|
||||
DEFM " *$"
|
||||
DEFB $00
|
||||
ch376_init_str_4:
|
||||
DEFB $08
|
||||
DEFM "PRESENT (VER $"
|
||||
DEFB $00
|
||||
ch376_init_str_5:
|
||||
DEFB $0d
|
||||
DEFM "CH376: $"
|
||||
DEFB $00
|
||||
ch376_init_str_6:
|
||||
DEFM "VERSION FAILURE"
|
||||
DEFB $0d
|
||||
DEFB $0a
|
||||
DEFM "$"
|
||||
DEFB $00
|
||||
ch376_init_str_7:
|
||||
DEFM "USB: *$"
|
||||
DEFB $00
|
||||
ch376_init_str_8:
|
||||
DEFB $08
|
||||
DEFM "DISCONNECTED$"
|
||||
DEFB $00
|
||||
ch376_init_str_9:
|
||||
DEFB $08
|
||||
DEFM "CONNECTED$"
|
||||
DEFB $00
|
||||
ch376_init_str_10:
|
||||
DEFM ".$"
|
||||
DEFB $00
|
||||
;source-doc/base-drv/ch376_init.c:88: void chnative_init_force(void) { _chnative_init(true); }
|
||||
; ---------------------------------
|
||||
; Function chnative_init_force
|
||||
; ---------------------------------
|
||||
_chnative_init_force:
|
||||
ld a,$01
|
||||
push af
|
||||
inc sp
|
||||
call __chnative_init
|
||||
inc sp
|
||||
ret
|
||||
;source-doc/base-drv/ch376_init.c:90: void chnative_init(void) { _chnative_init(false); }
|
||||
; ---------------------------------
|
||||
; Function chnative_init
|
||||
; ---------------------------------
|
||||
_chnative_init:
|
||||
xor a
|
||||
push af
|
||||
inc sp
|
||||
call __chnative_init
|
||||
inc sp
|
||||
ret
|
||||
85
Source/HBIOS/ch376-native/base-drv/class_hub.c.s
Normal file
85
Source/HBIOS/ch376-native/base-drv/class_hub.c.s
Normal file
@@ -0,0 +1,85 @@
|
||||
;
|
||||
; Generated from source-doc/base-drv/class_hub.c.asm -- not to be modify directly
|
||||
;
|
||||
;
|
||||
;--------------------------------------------------------
|
||||
; File Created by SDCC : free open source ISO C Compiler
|
||||
; Version 4.5.0 #15248 (Linux)
|
||||
;--------------------------------------------------------
|
||||
; Processed by Z88DK
|
||||
;--------------------------------------------------------
|
||||
|
||||
|
||||
;--------------------------------------------------------
|
||||
; Public variables in this module
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; Externals used
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; special function registers
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; ram data
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; ram data
|
||||
;--------------------------------------------------------
|
||||
|
||||
#IF 0
|
||||
|
||||
; .area _INITIALIZED removed by z88dk
|
||||
|
||||
|
||||
#ENDIF
|
||||
|
||||
;--------------------------------------------------------
|
||||
; absolute external ram data
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; global & static initialisations
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; Home
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; code
|
||||
;--------------------------------------------------------
|
||||
;source-doc/base-drv/class_hub.c:7: usb_error hub_get_descriptor(const device_config_hub *const hub_config, hub_descriptor *const hub_description) __sdcccall(1) {
|
||||
; ---------------------------------
|
||||
; Function hub_get_descriptor
|
||||
; ---------------------------------
|
||||
_hub_get_descriptor:
|
||||
;source-doc/base-drv/class_hub.c:8: return usb_control_transfer(&cmd_get_hub_descriptor, hub_description, hub_config->address, hub_config->max_packet_size);
|
||||
ld a,l
|
||||
ld c,h
|
||||
inc hl
|
||||
ld b, (hl)
|
||||
ld l, a
|
||||
ld h, c
|
||||
ld a, (hl)
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
and $0f
|
||||
ld c, a
|
||||
push bc
|
||||
push de
|
||||
ld hl,_cmd_get_hub_descriptor
|
||||
push hl
|
||||
call _usb_control_transfer
|
||||
pop af
|
||||
pop af
|
||||
pop af
|
||||
ld a, l
|
||||
;source-doc/base-drv/class_hub.c:9: }
|
||||
ret
|
||||
_cmd_get_hub_descriptor:
|
||||
DEFB +$a0
|
||||
DEFB +$06
|
||||
DEFB +$00
|
||||
DEFB +$29
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFW +$0008
|
||||
67
Source/HBIOS/ch376-native/base-drv/critical-section.c.s
Normal file
67
Source/HBIOS/ch376-native/base-drv/critical-section.c.s
Normal file
@@ -0,0 +1,67 @@
|
||||
;
|
||||
; Generated from source-doc/base-drv/critical-section.c.asm -- not to be modify directly
|
||||
;
|
||||
;
|
||||
;--------------------------------------------------------
|
||||
; File Created by SDCC : free open source ISO C Compiler
|
||||
; Version 4.5.0 #15248 (Linux)
|
||||
;--------------------------------------------------------
|
||||
; Processed by Z88DK
|
||||
;--------------------------------------------------------
|
||||
|
||||
|
||||
;--------------------------------------------------------
|
||||
; Public variables in this module
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; Externals used
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; special function registers
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; ram data
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; ram data
|
||||
;--------------------------------------------------------
|
||||
|
||||
#IF 0
|
||||
|
||||
; .area _INITIALIZED removed by z88dk
|
||||
|
||||
_in_critical_usb_section:
|
||||
DEFS 1
|
||||
|
||||
#ENDIF
|
||||
|
||||
;--------------------------------------------------------
|
||||
; absolute external ram data
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; global & static initialisations
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; Home
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; code
|
||||
;--------------------------------------------------------
|
||||
;source-doc/base-drv/critical-section.c:6: void critical_begin() { in_critical_usb_section++; }
|
||||
; ---------------------------------
|
||||
; Function critical_begin
|
||||
; ---------------------------------
|
||||
_critical_begin:
|
||||
ld hl,_in_critical_usb_section
|
||||
inc (hl)
|
||||
ret
|
||||
;source-doc/base-drv/critical-section.c:8: void critical_end() { in_critical_usb_section--; }
|
||||
; ---------------------------------
|
||||
; Function critical_end
|
||||
; ---------------------------------
|
||||
_critical_end:
|
||||
ld hl,_in_critical_usb_section
|
||||
dec (hl)
|
||||
ret
|
||||
_in_critical_usb_section:
|
||||
DEFB +$00
|
||||
449
Source/HBIOS/ch376-native/base-drv/dev_transfers.c.s
Normal file
449
Source/HBIOS/ch376-native/base-drv/dev_transfers.c.s
Normal file
@@ -0,0 +1,449 @@
|
||||
;
|
||||
; Generated from source-doc/base-drv/dev_transfers.c.asm -- not to be modify directly
|
||||
;
|
||||
;
|
||||
;--------------------------------------------------------
|
||||
; File Created by SDCC : free open source ISO C Compiler
|
||||
; Version 4.5.0 #15248 (Linux)
|
||||
;--------------------------------------------------------
|
||||
; Processed by Z88DK
|
||||
;--------------------------------------------------------
|
||||
|
||||
|
||||
;--------------------------------------------------------
|
||||
; Public variables in this module
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; Externals used
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; special function registers
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; ram data
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; ram data
|
||||
;--------------------------------------------------------
|
||||
|
||||
#IF 0
|
||||
|
||||
; .area _INITIALIZED removed by z88dk
|
||||
|
||||
|
||||
#ENDIF
|
||||
|
||||
;--------------------------------------------------------
|
||||
; absolute external ram data
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; global & static initialisations
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; Home
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; code
|
||||
;--------------------------------------------------------
|
||||
;source-doc/base-drv/dev_transfers.c:23: * See https://www.beyondlogic.org/usbnutshell/usb4.shtml for a description of the USB control transfer
|
||||
; ---------------------------------
|
||||
; Function usbdev_control_transfer
|
||||
; ---------------------------------
|
||||
_usbdev_control_transfer:
|
||||
push ix
|
||||
ld ix,0
|
||||
add ix,sp
|
||||
;source-doc/base-drv/dev_transfers.c:24: *
|
||||
ld l,(ix+4)
|
||||
ld h,(ix+5)
|
||||
ld e,l
|
||||
ld d,h
|
||||
inc hl
|
||||
ld b, (hl)
|
||||
ex de, hl
|
||||
ld a, (hl)
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
and $0f
|
||||
ld e,(ix+8)
|
||||
ld d,(ix+9)
|
||||
ld c,a
|
||||
push bc
|
||||
push de
|
||||
ld l,(ix+6)
|
||||
ld h,(ix+7)
|
||||
push hl
|
||||
call _usb_control_transfer
|
||||
pop af
|
||||
pop af
|
||||
pop af
|
||||
;source-doc/base-drv/dev_transfers.c:25: * @param device the usb device
|
||||
pop ix
|
||||
ret
|
||||
;source-doc/base-drv/dev_transfers.c:27: * @param buffer Pointer of data to send or receive into
|
||||
; ---------------------------------
|
||||
; Function usbdev_blk_out_trnsfer
|
||||
; ---------------------------------
|
||||
_usbdev_blk_out_trnsfer:
|
||||
push ix
|
||||
ld ix,0
|
||||
add ix,sp
|
||||
push af
|
||||
;source-doc/base-drv/dev_transfers.c:30: usb_error usbdev_control_transfer(device_config *const device, const setup_packet *const cmd_packet, uint8_t *const buffer) {
|
||||
ld c,(ix+4)
|
||||
ld b,(ix+5)
|
||||
ld e, c
|
||||
ld d, b
|
||||
inc de
|
||||
inc de
|
||||
inc de
|
||||
;source-doc/base-drv/dev_transfers.c:32: }
|
||||
pop hl
|
||||
ld l,c
|
||||
ld h,b
|
||||
ld a,(hl)
|
||||
push hl
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
and $0f
|
||||
push bc
|
||||
push de
|
||||
push de
|
||||
push af
|
||||
inc sp
|
||||
ld l,(ix+8)
|
||||
ld h,(ix+9)
|
||||
push hl
|
||||
ld l,(ix+6)
|
||||
ld h,(ix+7)
|
||||
push hl
|
||||
call _usb_data_out_transfer
|
||||
pop af
|
||||
pop af
|
||||
pop af
|
||||
inc sp
|
||||
pop de
|
||||
pop bc
|
||||
;source-doc/base-drv/dev_transfers.c:34: usb_error usbdev_blk_out_trnsfer(device_config *const dev, const uint8_t *const buffer, const uint16_t buffer_size) {
|
||||
ld a, l
|
||||
sub $02
|
||||
jr NZ,l_usbdev_blk_out_trnsfer_00102
|
||||
;source-doc/base-drv/dev_transfers.c:35: usb_error result;
|
||||
inc bc
|
||||
ld a, (bc)
|
||||
ld b, a
|
||||
pop hl
|
||||
ld a,(hl)
|
||||
push hl
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
and $0f
|
||||
ld c, a
|
||||
ld l, e
|
||||
ld h, d
|
||||
ld a, (hl)
|
||||
rrca
|
||||
and $07
|
||||
push de
|
||||
push bc
|
||||
inc sp
|
||||
ld h, c
|
||||
ld l,a
|
||||
push hl
|
||||
call _usbtrn_clr_ep_halt
|
||||
pop af
|
||||
inc sp
|
||||
pop de
|
||||
;source-doc/base-drv/dev_transfers.c:36:
|
||||
ex de, hl
|
||||
res 0, (hl)
|
||||
;source-doc/base-drv/dev_transfers.c:37: endpoint_param *const endpoint = &dev->endpoints[ENDPOINT_BULK_OUT];
|
||||
ld l,$02
|
||||
;source-doc/base-drv/dev_transfers.c:43: endpoint->toggle = 0;
|
||||
l_usbdev_blk_out_trnsfer_00102:
|
||||
;source-doc/base-drv/dev_transfers.c:44: return USB_ERR_STALL;
|
||||
ld sp, ix
|
||||
pop ix
|
||||
ret
|
||||
;source-doc/base-drv/dev_transfers.c:46:
|
||||
; ---------------------------------
|
||||
; Function usbdev_bulk_in_transfer
|
||||
; ---------------------------------
|
||||
_usbdev_bulk_in_transfer:
|
||||
push ix
|
||||
ld ix,0
|
||||
add ix,sp
|
||||
push af
|
||||
;source-doc/base-drv/dev_transfers.c:49: done:
|
||||
ld c,(ix+4)
|
||||
ld b,(ix+5)
|
||||
ld hl,$0006
|
||||
add hl, bc
|
||||
;source-doc/base-drv/dev_transfers.c:51: }
|
||||
pop de
|
||||
ld e,c
|
||||
ld d,b
|
||||
ex de,hl
|
||||
ld a,(hl)
|
||||
push hl
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
and $0f
|
||||
push bc
|
||||
push de
|
||||
push de
|
||||
push af
|
||||
inc sp
|
||||
ld l,(ix+8)
|
||||
ld h,(ix+9)
|
||||
push hl
|
||||
ld l,(ix+6)
|
||||
ld h,(ix+7)
|
||||
push hl
|
||||
call _usb_data_in_transfer_n
|
||||
pop af
|
||||
pop af
|
||||
pop af
|
||||
inc sp
|
||||
pop de
|
||||
pop bc
|
||||
;source-doc/base-drv/dev_transfers.c:53: usb_error usbdev_bulk_in_transfer(device_config *const dev, uint8_t *const buffer, uint8_t *const buffer_size) {
|
||||
ld a, l
|
||||
sub $02
|
||||
jr NZ,l_usbdev_bulk_in_transfer_00102
|
||||
;source-doc/base-drv/dev_transfers.c:54: usb_error result;
|
||||
inc bc
|
||||
ld a, (bc)
|
||||
ld b, a
|
||||
pop hl
|
||||
ld a,(hl)
|
||||
push hl
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
and $0f
|
||||
ld c, a
|
||||
ld l, e
|
||||
ld h, d
|
||||
ld a, (hl)
|
||||
rrca
|
||||
and $07
|
||||
push de
|
||||
push bc
|
||||
inc sp
|
||||
ld h, c
|
||||
ld l,a
|
||||
push hl
|
||||
call _usbtrn_clr_ep_halt
|
||||
pop af
|
||||
inc sp
|
||||
pop de
|
||||
;source-doc/base-drv/dev_transfers.c:55:
|
||||
ex de, hl
|
||||
res 0, (hl)
|
||||
;source-doc/base-drv/dev_transfers.c:56: endpoint_param *const endpoint = &dev->endpoints[ENDPOINT_BULK_IN];
|
||||
ld l,$02
|
||||
;source-doc/base-drv/dev_transfers.c:61: usbtrn_clr_ep_halt(endpoint->number, dev->address, dev->max_packet_size);
|
||||
l_usbdev_bulk_in_transfer_00102:
|
||||
;source-doc/base-drv/dev_transfers.c:62: endpoint->toggle = 0;
|
||||
ld sp, ix
|
||||
pop ix
|
||||
ret
|
||||
;source-doc/base-drv/dev_transfers.c:64: }
|
||||
; ---------------------------------
|
||||
; Function usbdev_dat_in_trnsfer
|
||||
; ---------------------------------
|
||||
_usbdev_dat_in_trnsfer:
|
||||
push ix
|
||||
ld ix,0
|
||||
add ix,sp
|
||||
push af
|
||||
;source-doc/base-drv/dev_transfers.c:70:
|
||||
ld c,(ix+4)
|
||||
ld b,(ix+5)
|
||||
ld e, c
|
||||
ld d, b
|
||||
inc de
|
||||
inc de
|
||||
inc de
|
||||
push de
|
||||
ld a,(ix+10)
|
||||
ld e, a
|
||||
add a, a
|
||||
add a, e
|
||||
pop de
|
||||
add a, e
|
||||
ld e, a
|
||||
ld a,$00
|
||||
adc a, d
|
||||
ld d, a
|
||||
;source-doc/base-drv/dev_transfers.c:72: uint8_t *const buffer,
|
||||
pop hl
|
||||
ld l,c
|
||||
ld h,b
|
||||
ld a,(hl)
|
||||
push hl
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
and $0f
|
||||
push bc
|
||||
push de
|
||||
push de
|
||||
push af
|
||||
inc sp
|
||||
ld l,(ix+8)
|
||||
ld h,(ix+9)
|
||||
push hl
|
||||
ld l,(ix+6)
|
||||
ld h,(ix+7)
|
||||
push hl
|
||||
call _usb_data_in_transfer
|
||||
pop af
|
||||
pop af
|
||||
pop af
|
||||
inc sp
|
||||
pop de
|
||||
pop bc
|
||||
;source-doc/base-drv/dev_transfers.c:74: const usb_endpoint_type endpoint_type) {
|
||||
ld a, l
|
||||
sub $02
|
||||
jr NZ,l_usbdev_dat_in_trnsfer_00102
|
||||
;source-doc/base-drv/dev_transfers.c:75: usb_error result;
|
||||
inc bc
|
||||
ld a, (bc)
|
||||
ld b, a
|
||||
pop hl
|
||||
ld a,(hl)
|
||||
push hl
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
and $0f
|
||||
ld c, a
|
||||
ld l, e
|
||||
ld h, d
|
||||
ld a, (hl)
|
||||
rrca
|
||||
and $07
|
||||
push de
|
||||
push bc
|
||||
inc sp
|
||||
ld h, c
|
||||
ld l,a
|
||||
push hl
|
||||
call _usbtrn_clr_ep_halt
|
||||
pop af
|
||||
inc sp
|
||||
pop de
|
||||
;source-doc/base-drv/dev_transfers.c:76:
|
||||
ex de, hl
|
||||
res 0, (hl)
|
||||
;source-doc/base-drv/dev_transfers.c:77: endpoint_param *const endpoint = &device->endpoints[endpoint_type];
|
||||
ld l,$02
|
||||
;source-doc/base-drv/dev_transfers.c:82: usbtrn_clr_ep_halt(endpoint->number, device->address, device->max_packet_size);
|
||||
l_usbdev_dat_in_trnsfer_00102:
|
||||
;source-doc/base-drv/dev_transfers.c:83: endpoint->toggle = 0;
|
||||
ld sp, ix
|
||||
pop ix
|
||||
ret
|
||||
;source-doc/base-drv/dev_transfers.c:85: }
|
||||
; ---------------------------------
|
||||
; Function usbdev_dat_in_trnsfer_0
|
||||
; ---------------------------------
|
||||
_usbdev_dat_in_trnsfer_0:
|
||||
push ix
|
||||
ld ix,0
|
||||
add ix,sp
|
||||
push af
|
||||
;source-doc/base-drv/dev_transfers.c:88: done:
|
||||
ld c,(ix+4)
|
||||
ld b,(ix+5)
|
||||
ld e, c
|
||||
ld d, b
|
||||
inc de
|
||||
inc de
|
||||
inc de
|
||||
;source-doc/base-drv/dev_transfers.c:90: }
|
||||
pop hl
|
||||
ld l,c
|
||||
ld h,b
|
||||
ld a,(hl)
|
||||
push hl
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
and $0f
|
||||
ld l,(ix+8)
|
||||
ld h,$00
|
||||
push bc
|
||||
push de
|
||||
push de
|
||||
push af
|
||||
inc sp
|
||||
push hl
|
||||
ld l,(ix+6)
|
||||
ld h,(ix+7)
|
||||
push hl
|
||||
call _usb_data_in_transfer
|
||||
pop af
|
||||
pop af
|
||||
pop af
|
||||
inc sp
|
||||
pop de
|
||||
pop bc
|
||||
;source-doc/base-drv/dev_transfers.c:92: usb_error usbdev_dat_in_trnsfer_0(device_config *const device, uint8_t *const buffer, const uint8_t buffer_size) {
|
||||
ld a, l
|
||||
sub $02
|
||||
jr NZ,l_usbdev_dat_in_trnsfer_0_00102
|
||||
;source-doc/base-drv/dev_transfers.c:93: usb_error result;
|
||||
inc bc
|
||||
ld a, (bc)
|
||||
ld b, a
|
||||
pop hl
|
||||
ld a,(hl)
|
||||
push hl
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
and $0f
|
||||
ld c, a
|
||||
ld l, e
|
||||
ld h, d
|
||||
ld a, (hl)
|
||||
rrca
|
||||
and $07
|
||||
push de
|
||||
push bc
|
||||
inc sp
|
||||
ld h, c
|
||||
ld l,a
|
||||
push hl
|
||||
call _usbtrn_clr_ep_halt
|
||||
pop af
|
||||
inc sp
|
||||
pop de
|
||||
;source-doc/base-drv/dev_transfers.c:94:
|
||||
ex de, hl
|
||||
res 0, (hl)
|
||||
;source-doc/base-drv/dev_transfers.c:95: endpoint_param *const endpoint = &device->endpoints[0];
|
||||
ld l,$02
|
||||
;source-doc/base-drv/dev_transfers.c:98:
|
||||
l_usbdev_dat_in_trnsfer_0_00102:
|
||||
;source-doc/base-drv/dev_transfers.c:99: if (result == USB_ERR_STALL) {
|
||||
ld sp, ix
|
||||
pop ix
|
||||
ret
|
||||
1096
Source/HBIOS/ch376-native/base-drv/enumerate.c.s
Normal file
1096
Source/HBIOS/ch376-native/base-drv/enumerate.c.s
Normal file
File diff suppressed because it is too large
Load Diff
457
Source/HBIOS/ch376-native/base-drv/enumerate_hub.c.s
Normal file
457
Source/HBIOS/ch376-native/base-drv/enumerate_hub.c.s
Normal file
@@ -0,0 +1,457 @@
|
||||
;
|
||||
; Generated from source-doc/base-drv/enumerate_hub.c.asm -- not to be modify directly
|
||||
;
|
||||
;
|
||||
;--------------------------------------------------------
|
||||
; File Created by SDCC : free open source ISO C Compiler
|
||||
; Version 4.5.0 #15248 (Linux)
|
||||
;--------------------------------------------------------
|
||||
; Processed by Z88DK
|
||||
;--------------------------------------------------------
|
||||
|
||||
|
||||
;--------------------------------------------------------
|
||||
; Public variables in this module
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; Externals used
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; special function registers
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; ram data
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; ram data
|
||||
;--------------------------------------------------------
|
||||
|
||||
#IF 0
|
||||
|
||||
; .area _INITIALIZED removed by z88dk
|
||||
|
||||
|
||||
#ENDIF
|
||||
|
||||
;--------------------------------------------------------
|
||||
; absolute external ram data
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; global & static initialisations
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; Home
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; code
|
||||
;--------------------------------------------------------
|
||||
;source-doc/base-drv/enumerate_hub.c:13: usb_error hub_set_feature(const device_config_hub *const hub_config, const uint8_t feature, const uint8_t index) {
|
||||
; ---------------------------------
|
||||
; Function hub_set_feature
|
||||
; ---------------------------------
|
||||
_hub_set_feature:
|
||||
push ix
|
||||
ld ix,0
|
||||
add ix,sp
|
||||
ld hl, -8
|
||||
add hl, sp
|
||||
ld sp, hl
|
||||
;source-doc/base-drv/enumerate_hub.c:15: set_feature = cmd_set_feature;
|
||||
ld hl,0
|
||||
add hl, sp
|
||||
ld e,l
|
||||
ld d,h
|
||||
push hl
|
||||
ld bc,$0008
|
||||
ld hl,_cmd_set_feature
|
||||
ldir
|
||||
pop bc
|
||||
;source-doc/base-drv/enumerate_hub.c:17: set_feature.bValue[0] = feature;
|
||||
ld a,(ix+6)
|
||||
ld (ix-6),a
|
||||
;source-doc/base-drv/enumerate_hub.c:18: set_feature.bIndex[0] = index;
|
||||
ld a,(ix+7)
|
||||
ld (ix-4),a
|
||||
;source-doc/base-drv/enumerate_hub.c:19: return usb_control_transfer(&set_feature, 0, hub_config->address, hub_config->max_packet_size);
|
||||
ld e,(ix+5)
|
||||
ld a,(ix+4)
|
||||
ld l, a
|
||||
ld h, e
|
||||
inc hl
|
||||
ld d, (hl)
|
||||
ld l, a
|
||||
ld h, e
|
||||
ld a, (hl)
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
and $0f
|
||||
ld e,a
|
||||
push de
|
||||
ld hl,$0000
|
||||
push hl
|
||||
push bc
|
||||
call _usb_control_transfer
|
||||
;source-doc/base-drv/enumerate_hub.c:20: }
|
||||
ld sp,ix
|
||||
pop ix
|
||||
ret
|
||||
_cmd_set_feature:
|
||||
DEFB +$23
|
||||
DEFB +$03
|
||||
DEFB +$08
|
||||
DEFB +$00
|
||||
DEFB +$01
|
||||
DEFB +$00
|
||||
DEFW +$0000
|
||||
_cmd_clear_feature:
|
||||
DEFB +$23
|
||||
DEFB +$01
|
||||
DEFB +$08
|
||||
DEFB +$00
|
||||
DEFB +$01
|
||||
DEFB +$00
|
||||
DEFW +$0000
|
||||
_cmd_get_status_port:
|
||||
DEFB +$a3
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$01
|
||||
DEFB +$00
|
||||
DEFW +$0004
|
||||
;source-doc/base-drv/enumerate_hub.c:22: usb_error hub_clear_feature(const device_config_hub *const hub_config, const uint8_t feature, const uint8_t index) {
|
||||
; ---------------------------------
|
||||
; Function hub_clear_feature
|
||||
; ---------------------------------
|
||||
_hub_clear_feature:
|
||||
push ix
|
||||
ld ix,0
|
||||
add ix,sp
|
||||
ld hl, -8
|
||||
add hl, sp
|
||||
ld sp, hl
|
||||
;source-doc/base-drv/enumerate_hub.c:24: clear_feature = cmd_clear_feature;
|
||||
ld hl,0
|
||||
add hl, sp
|
||||
ld e,l
|
||||
ld d,h
|
||||
push hl
|
||||
ld bc,$0008
|
||||
ld hl,_cmd_clear_feature
|
||||
ldir
|
||||
pop bc
|
||||
;source-doc/base-drv/enumerate_hub.c:26: clear_feature.bValue[0] = feature;
|
||||
ld a,(ix+6)
|
||||
ld (ix-6),a
|
||||
;source-doc/base-drv/enumerate_hub.c:27: clear_feature.bIndex[0] = index;
|
||||
ld a,(ix+7)
|
||||
ld (ix-4),a
|
||||
;source-doc/base-drv/enumerate_hub.c:28: return usb_control_transfer(&clear_feature, 0, hub_config->address, hub_config->max_packet_size);
|
||||
ld e,(ix+5)
|
||||
ld a,(ix+4)
|
||||
ld l, a
|
||||
ld h, e
|
||||
inc hl
|
||||
ld d, (hl)
|
||||
ld l, a
|
||||
ld h, e
|
||||
ld a, (hl)
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
and $0f
|
||||
ld e,a
|
||||
push de
|
||||
ld hl,$0000
|
||||
push hl
|
||||
push bc
|
||||
call _usb_control_transfer
|
||||
;source-doc/base-drv/enumerate_hub.c:29: }
|
||||
ld sp,ix
|
||||
pop ix
|
||||
ret
|
||||
;source-doc/base-drv/enumerate_hub.c:31: usb_error hub_get_status_port(const device_config_hub *const hub_config, const uint8_t index, hub_port_status *const port_status) {
|
||||
; ---------------------------------
|
||||
; Function hub_get_status_port
|
||||
; ---------------------------------
|
||||
_hub_get_status_port:
|
||||
push ix
|
||||
ld ix,0
|
||||
add ix,sp
|
||||
ld hl, -8
|
||||
add hl, sp
|
||||
ld sp, hl
|
||||
;source-doc/base-drv/enumerate_hub.c:33: get_status_port = cmd_get_status_port;
|
||||
ld hl,0
|
||||
add hl, sp
|
||||
ld e,l
|
||||
ld d,h
|
||||
push hl
|
||||
ld bc,$0008
|
||||
ld hl,_cmd_get_status_port
|
||||
ldir
|
||||
pop bc
|
||||
;source-doc/base-drv/enumerate_hub.c:35: get_status_port.bIndex[0] = index;
|
||||
ld a,(ix+6)
|
||||
ld (ix-4),a
|
||||
;source-doc/base-drv/enumerate_hub.c:36: return usb_control_transfer(&get_status_port, port_status, hub_config->address, hub_config->max_packet_size);
|
||||
ld e,(ix+5)
|
||||
ld a,(ix+4)
|
||||
ld l, a
|
||||
ld h, e
|
||||
inc hl
|
||||
ld d, (hl)
|
||||
ld l, a
|
||||
ld h, e
|
||||
ld a, (hl)
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
and $0f
|
||||
ld l,(ix+7)
|
||||
ld h,(ix+8)
|
||||
ld e,a
|
||||
push de
|
||||
push hl
|
||||
push bc
|
||||
call _usb_control_transfer
|
||||
;source-doc/base-drv/enumerate_hub.c:37: }
|
||||
ld sp,ix
|
||||
pop ix
|
||||
ret
|
||||
;source-doc/base-drv/enumerate_hub.c:39: usb_error configure_usb_hub(_working *const working) __z88dk_fastcall {
|
||||
; ---------------------------------
|
||||
; Function configure_usb_hub
|
||||
; ---------------------------------
|
||||
_configure_usb_hub:
|
||||
push ix
|
||||
ld ix,0
|
||||
add ix,sp
|
||||
ld c, l
|
||||
ld b, h
|
||||
ld hl, -14
|
||||
add hl, sp
|
||||
ld sp, hl
|
||||
;source-doc/base-drv/enumerate_hub.c:45: const device_config_hub *const hub_config = working->hub_config;
|
||||
ld (ix-2),c
|
||||
ld (ix-1),b
|
||||
ld hl,25
|
||||
add hl, bc
|
||||
ld c, (hl)
|
||||
inc hl
|
||||
ld b, (hl)
|
||||
;source-doc/base-drv/enumerate_hub.c:47: CHECK(hub_get_descriptor(hub_config, &hub_description));
|
||||
push bc
|
||||
ld hl,2
|
||||
add hl, sp
|
||||
ld e,c
|
||||
ld d,b
|
||||
ex de,hl
|
||||
call _hub_get_descriptor
|
||||
pop bc
|
||||
or a
|
||||
jp NZ, l_configure_usb_hub_00129
|
||||
;source-doc/base-drv/enumerate_hub.c:49: uint8_t i = hub_description.bNbrPorts;
|
||||
ld d,(ix-12)
|
||||
;source-doc/base-drv/enumerate_hub.c:50: do {
|
||||
l_configure_usb_hub_00126:
|
||||
;source-doc/base-drv/enumerate_hub.c:51: CHECK(hub_clear_feature(hub_config, FEAT_PORT_POWER, i));
|
||||
push bc
|
||||
push de
|
||||
ld e,$08
|
||||
push de
|
||||
push bc
|
||||
call _hub_clear_feature
|
||||
pop af
|
||||
pop af
|
||||
ld a, l
|
||||
pop de
|
||||
pop bc
|
||||
or a
|
||||
jp NZ, l_configure_usb_hub_00129
|
||||
;source-doc/base-drv/enumerate_hub.c:53: CHECK(hub_set_feature(hub_config, FEAT_PORT_POWER, i));
|
||||
push bc
|
||||
push de
|
||||
ld e,$08
|
||||
push de
|
||||
push bc
|
||||
call _hub_set_feature
|
||||
pop af
|
||||
pop af
|
||||
ld a, l
|
||||
pop de
|
||||
pop bc
|
||||
or a
|
||||
jp NZ, l_configure_usb_hub_00129
|
||||
;source-doc/base-drv/enumerate_hub.c:55: hub_clear_feature(hub_config, FEAT_PORT_RESET, i);
|
||||
push bc
|
||||
push de
|
||||
ld e,$04
|
||||
push de
|
||||
push bc
|
||||
call _hub_clear_feature
|
||||
pop af
|
||||
pop af
|
||||
pop de
|
||||
pop bc
|
||||
;source-doc/base-drv/enumerate_hub.c:57: CHECK(hub_set_feature(hub_config, FEAT_PORT_RESET, i));
|
||||
push bc
|
||||
push de
|
||||
ld e,$04
|
||||
push de
|
||||
push bc
|
||||
call _hub_set_feature
|
||||
pop af
|
||||
pop af
|
||||
ld a, l
|
||||
pop de
|
||||
pop bc
|
||||
or a
|
||||
jp NZ, l_configure_usb_hub_00129
|
||||
;source-doc/base-drv/enumerate_hub.c:59: CHECK(hub_get_status_port(hub_config, i, &port_status));
|
||||
push bc
|
||||
push de
|
||||
ld hl,12
|
||||
add hl, sp
|
||||
push hl
|
||||
push de
|
||||
inc sp
|
||||
push bc
|
||||
call _hub_get_status_port
|
||||
pop af
|
||||
pop af
|
||||
inc sp
|
||||
ld a, l
|
||||
pop de
|
||||
pop bc
|
||||
or a
|
||||
jp NZ, l_configure_usb_hub_00129
|
||||
;source-doc/base-drv/enumerate_hub.c:61: if (port_status.wPortStatus & PORT_STAT_CONNECTION) {
|
||||
ld e,(ix-6)
|
||||
bit 0, e
|
||||
jr Z,l_configure_usb_hub_00124
|
||||
;source-doc/base-drv/enumerate_hub.c:62: CHECK(hub_clear_feature(hub_config, HUB_FEATURE_PORT_CONNECTION_CHA, i));
|
||||
push bc
|
||||
push de
|
||||
ld e,$10
|
||||
push de
|
||||
push bc
|
||||
call _hub_clear_feature
|
||||
pop af
|
||||
pop af
|
||||
ld a, l
|
||||
pop de
|
||||
pop bc
|
||||
or a
|
||||
jr NZ,l_configure_usb_hub_00129
|
||||
;source-doc/base-drv/enumerate_hub.c:64: CHECK(hub_clear_feature(hub_config, FEAT_PORT_ENABLE_CHANGE, i));
|
||||
push bc
|
||||
push de
|
||||
ld e,$11
|
||||
push de
|
||||
push bc
|
||||
call _hub_clear_feature
|
||||
pop af
|
||||
pop af
|
||||
ld a, l
|
||||
pop de
|
||||
pop bc
|
||||
or a
|
||||
jr NZ,l_configure_usb_hub_00129
|
||||
;source-doc/base-drv/enumerate_hub.c:66: CHECK(hub_clear_feature(hub_config, FEAT_PORT_RESET_CHANGE, i));
|
||||
push bc
|
||||
push de
|
||||
ld e,$14
|
||||
push de
|
||||
push bc
|
||||
call _hub_clear_feature
|
||||
pop af
|
||||
pop af
|
||||
ld a, l
|
||||
pop de
|
||||
pop bc
|
||||
or a
|
||||
jr NZ,l_configure_usb_hub_00129
|
||||
;source-doc/base-drv/enumerate_hub.c:67: delay_short();
|
||||
push bc
|
||||
push de
|
||||
call _delay_short
|
||||
pop de
|
||||
pop bc
|
||||
;source-doc/base-drv/enumerate_hub.c:69: CHECK(hub_get_status_port(hub_config, i, &port_status));
|
||||
push bc
|
||||
push de
|
||||
ld hl,12
|
||||
add hl, sp
|
||||
push hl
|
||||
push de
|
||||
inc sp
|
||||
push bc
|
||||
call _hub_get_status_port
|
||||
pop af
|
||||
pop af
|
||||
inc sp
|
||||
ld a, l
|
||||
pop de
|
||||
pop bc
|
||||
or a
|
||||
jr NZ,l_configure_usb_hub_00129
|
||||
;source-doc/base-drv/enumerate_hub.c:70: delay_short();
|
||||
push bc
|
||||
push de
|
||||
call _delay_short
|
||||
pop de
|
||||
pop bc
|
||||
;source-doc/base-drv/enumerate_hub.c:72: CHECK(read_all_configs(working->state));
|
||||
ld l,(ix-2)
|
||||
ld h,(ix-1)
|
||||
ld a, (hl)
|
||||
inc hl
|
||||
ld h, (hl)
|
||||
ld l, a
|
||||
push bc
|
||||
push de
|
||||
push hl
|
||||
call _read_all_configs
|
||||
pop af
|
||||
ld a, l
|
||||
pop de
|
||||
pop bc
|
||||
or a
|
||||
jr Z,l_configure_usb_hub_00127
|
||||
jr l_configure_usb_hub_00129
|
||||
l_configure_usb_hub_00124:
|
||||
;source-doc/base-drv/enumerate_hub.c:75: CHECK(hub_clear_feature(hub_config, FEAT_PORT_POWER, i));
|
||||
push bc
|
||||
push de
|
||||
ld e,$08
|
||||
push de
|
||||
push bc
|
||||
call _hub_clear_feature
|
||||
pop af
|
||||
pop af
|
||||
ld a, l
|
||||
pop de
|
||||
pop bc
|
||||
or a
|
||||
jr NZ,l_configure_usb_hub_00129
|
||||
l_configure_usb_hub_00127:
|
||||
;source-doc/base-drv/enumerate_hub.c:77: } while (--i != 0);
|
||||
dec d
|
||||
jp NZ, l_configure_usb_hub_00126
|
||||
;source-doc/base-drv/enumerate_hub.c:79: return USB_ERR_OK;
|
||||
ld l,$00
|
||||
jr l_configure_usb_hub_00130
|
||||
;source-doc/base-drv/enumerate_hub.c:80: done:
|
||||
l_configure_usb_hub_00129:
|
||||
;source-doc/base-drv/enumerate_hub.c:81: return result;
|
||||
ld l, a
|
||||
l_configure_usb_hub_00130:
|
||||
;source-doc/base-drv/enumerate_hub.c:82: }
|
||||
ld sp, ix
|
||||
pop ix
|
||||
ret
|
||||
142
Source/HBIOS/ch376-native/base-drv/enumerate_storage.c.s
Normal file
142
Source/HBIOS/ch376-native/base-drv/enumerate_storage.c.s
Normal file
@@ -0,0 +1,142 @@
|
||||
;
|
||||
; Generated from source-doc/base-drv/enumerate_storage.c.asm -- not to be modify directly
|
||||
;
|
||||
;
|
||||
;--------------------------------------------------------
|
||||
; File Created by SDCC : free open source ISO C Compiler
|
||||
; Version 4.5.0 #15248 (Linux)
|
||||
;--------------------------------------------------------
|
||||
; Processed by Z88DK
|
||||
;--------------------------------------------------------
|
||||
|
||||
|
||||
;--------------------------------------------------------
|
||||
; Public variables in this module
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; Externals used
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; special function registers
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; ram data
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; ram data
|
||||
;--------------------------------------------------------
|
||||
|
||||
#IF 0
|
||||
|
||||
; .area _INITIALIZED removed by z88dk
|
||||
|
||||
|
||||
#ENDIF
|
||||
|
||||
;--------------------------------------------------------
|
||||
; absolute external ram data
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; global & static initialisations
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; Home
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; code
|
||||
;--------------------------------------------------------
|
||||
;source-doc/base-drv/enumerate_storage.c:5: void parse_endpoints(device_config_storage *const storage_dev, const endpoint_descriptor const *pEndpoint) {
|
||||
; ---------------------------------
|
||||
; Function parse_endpoints
|
||||
; ---------------------------------
|
||||
_parse_endpoints:
|
||||
push ix
|
||||
ld ix,0
|
||||
add ix,sp
|
||||
push af
|
||||
;source-doc/base-drv/enumerate_storage.c:7: if (!(pEndpoint->bmAttributes & $02))
|
||||
ld l,(ix+6)
|
||||
ld h,(ix+7)
|
||||
ld c,l
|
||||
ld b,h
|
||||
inc hl
|
||||
inc hl
|
||||
inc hl
|
||||
ld a, (hl)
|
||||
ld (ix-2),a
|
||||
bit 1,a
|
||||
;source-doc/base-drv/enumerate_storage.c:8: return;
|
||||
jr Z,l_parse_endpoints_00108
|
||||
;source-doc/base-drv/enumerate_storage.c:10: const uint8_t x = calc_max_packet_sizex(pEndpoint->wMaxPacketSize);
|
||||
ld hl,4
|
||||
add hl,bc
|
||||
ld a, (hl)
|
||||
ld (ix-1),a
|
||||
;source-doc/base-drv/enumerate_storage.c:11: endpoint_param *const eps = storage_dev->endpoints;
|
||||
ld e,(ix+4)
|
||||
ld d,(ix+5)
|
||||
inc de
|
||||
inc de
|
||||
inc de
|
||||
;source-doc/base-drv/enumerate_storage.c:15: if (!(pEndpoint->bEndpointAddress & $80))
|
||||
inc bc
|
||||
inc bc
|
||||
ld a, (bc)
|
||||
ld c,a
|
||||
and $80
|
||||
ld b,$00
|
||||
;source-doc/base-drv/enumerate_storage.c:14: if (pEndpoint->bmAttributes & $01) { // 3 -> Interrupt
|
||||
bit 0,(ix-2)
|
||||
jr Z,l_parse_endpoints_00106
|
||||
;source-doc/base-drv/enumerate_storage.c:15: if (!(pEndpoint->bEndpointAddress & $80))
|
||||
or b
|
||||
;source-doc/base-drv/enumerate_storage.c:16: return;
|
||||
jr Z,l_parse_endpoints_00108
|
||||
;source-doc/base-drv/enumerate_storage.c:18: ep = &eps[ENDPOINT_INTERRUPT_IN];
|
||||
ld hl,$0006
|
||||
add hl, de
|
||||
ex de, hl
|
||||
jr l_parse_endpoints_00107
|
||||
l_parse_endpoints_00106:
|
||||
;source-doc/base-drv/enumerate_storage.c:21: ep = (pEndpoint->bEndpointAddress & $80) ? &eps[ENDPOINT_BULK_IN] : &eps[ENDPOINT_BULK_OUT];
|
||||
or b
|
||||
jr Z,l_parse_endpoints_00110
|
||||
inc de
|
||||
inc de
|
||||
inc de
|
||||
l_parse_endpoints_00110:
|
||||
l_parse_endpoints_00107:
|
||||
;source-doc/base-drv/enumerate_storage.c:24: ep->number = pEndpoint->bEndpointAddress & $07;
|
||||
ld l, e
|
||||
ld h, d
|
||||
ld a, c
|
||||
and $07
|
||||
rlca
|
||||
and $0e
|
||||
ld c, a
|
||||
ld a, (hl)
|
||||
and $f1
|
||||
or c
|
||||
ld (hl), a
|
||||
;source-doc/base-drv/enumerate_storage.c:25: ep->toggle = 0;
|
||||
ld l, e
|
||||
ld h, d
|
||||
res 0, (hl)
|
||||
;source-doc/base-drv/enumerate_storage.c:26: ep->max_packet_sizex = x;
|
||||
inc de
|
||||
ld a,(ix-1)
|
||||
ld b,$00
|
||||
ld (de), a
|
||||
inc de
|
||||
ld a, b
|
||||
and $03
|
||||
ld l, a
|
||||
ld a, (de)
|
||||
and $fc
|
||||
or l
|
||||
ld (de), a
|
||||
l_parse_endpoints_00108:
|
||||
;source-doc/base-drv/enumerate_storage.c:27: }
|
||||
ld sp, ix
|
||||
pop ix
|
||||
ret
|
||||
97
Source/HBIOS/ch376-native/base-drv/hbios-driver-storage.c.s
Normal file
97
Source/HBIOS/ch376-native/base-drv/hbios-driver-storage.c.s
Normal file
@@ -0,0 +1,97 @@
|
||||
;
|
||||
; Generated from source-doc/base-drv/hbios-driver-storage.c.asm -- not to be modify directly
|
||||
;
|
||||
;
|
||||
;--------------------------------------------------------
|
||||
; File Created by SDCC : free open source ISO C Compiler
|
||||
; Version 4.5.0 #15248 (Linux)
|
||||
;--------------------------------------------------------
|
||||
; Processed by Z88DK
|
||||
;--------------------------------------------------------
|
||||
|
||||
|
||||
;--------------------------------------------------------
|
||||
; Public variables in this module
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; Externals used
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; special function registers
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; ram data
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; ram data
|
||||
;--------------------------------------------------------
|
||||
|
||||
#IF 0
|
||||
|
||||
; .area _INITIALIZED removed by z88dk
|
||||
|
||||
_hbios_usbstore_devs:
|
||||
DEFS 12
|
||||
|
||||
#ENDIF
|
||||
|
||||
;--------------------------------------------------------
|
||||
; absolute external ram data
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; global & static initialisations
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; Home
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; code
|
||||
;--------------------------------------------------------
|
||||
;source-doc/base-drv/hbios-driver-storage.c:5: uint8_t find_storage_dev(void) {
|
||||
; ---------------------------------
|
||||
; Function find_storage_dev
|
||||
; ---------------------------------
|
||||
_find_storage_dev:
|
||||
;source-doc/base-drv/hbios-driver-storage.c:6: for (uint8_t i = 0; i < MAX_NUMBER_OF_DEVICES; i++)
|
||||
ld c,$00
|
||||
ld de,_hbios_usbstore_devs+0
|
||||
ld b,c
|
||||
l_find_storage_dev_00105:
|
||||
ld a, b
|
||||
sub $06
|
||||
jr NC,l_find_storage_dev_00103
|
||||
;source-doc/base-drv/hbios-driver-storage.c:7: if (hbios_usbstore_devs[i].drive_index == 0)
|
||||
ld l, b
|
||||
ld h,$00
|
||||
add hl, hl
|
||||
add hl, de
|
||||
ld a, (hl)
|
||||
or a
|
||||
jr NZ,l_find_storage_dev_00106
|
||||
;source-doc/base-drv/hbios-driver-storage.c:8: return i;
|
||||
ld l, c
|
||||
jr l_find_storage_dev_00107
|
||||
l_find_storage_dev_00106:
|
||||
;source-doc/base-drv/hbios-driver-storage.c:6: for (uint8_t i = 0; i < MAX_NUMBER_OF_DEVICES; i++)
|
||||
inc b
|
||||
ld c, b
|
||||
jr l_find_storage_dev_00105
|
||||
l_find_storage_dev_00103:
|
||||
;source-doc/base-drv/hbios-driver-storage.c:10: return -1;
|
||||
ld l,$ff
|
||||
l_find_storage_dev_00107:
|
||||
;source-doc/base-drv/hbios-driver-storage.c:11: }
|
||||
ret
|
||||
_hbios_usbstore_devs:
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
482
Source/HBIOS/ch376-native/base-drv/protocol.c.s
Normal file
482
Source/HBIOS/ch376-native/base-drv/protocol.c.s
Normal file
@@ -0,0 +1,482 @@
|
||||
;
|
||||
; Generated from source-doc/base-drv/protocol.c.asm -- not to be modify directly
|
||||
;
|
||||
;
|
||||
;--------------------------------------------------------
|
||||
; File Created by SDCC : free open source ISO C Compiler
|
||||
; Version 4.5.0 #15248 (Linux)
|
||||
;--------------------------------------------------------
|
||||
; Processed by Z88DK
|
||||
;--------------------------------------------------------
|
||||
|
||||
|
||||
;--------------------------------------------------------
|
||||
; Public variables in this module
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; Externals used
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; special function registers
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; ram data
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; ram data
|
||||
;--------------------------------------------------------
|
||||
|
||||
#IF 0
|
||||
|
||||
; .area _INITIALIZED removed by z88dk
|
||||
|
||||
|
||||
#ENDIF
|
||||
|
||||
;--------------------------------------------------------
|
||||
; absolute external ram data
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; global & static initialisations
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; Home
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; code
|
||||
;--------------------------------------------------------
|
||||
;source-doc/base-drv/protocol.c:25: *
|
||||
; ---------------------------------
|
||||
; Function usbtrn_get_descriptor
|
||||
; ---------------------------------
|
||||
_usbtrn_get_descriptor:
|
||||
push ix
|
||||
ld ix,0
|
||||
add ix,sp
|
||||
ld hl, -8
|
||||
add hl, sp
|
||||
ld sp, hl
|
||||
;source-doc/base-drv/protocol.c:28: */
|
||||
ld hl,0
|
||||
add hl, sp
|
||||
ex de, hl
|
||||
ld bc,$0008
|
||||
ld hl,_cmd_get_dev_descriptr
|
||||
ldir
|
||||
;source-doc/base-drv/protocol.c:29: usb_error usbtrn_get_descriptor(device_descriptor *const buffer) {
|
||||
ld (ix-2),$08
|
||||
xor a
|
||||
ld (ix-1),a
|
||||
;source-doc/base-drv/protocol.c:31: setup_packet cmd;
|
||||
ld c,(ix+4)
|
||||
ld b,(ix+5)
|
||||
push bc
|
||||
push bc
|
||||
ld e,c
|
||||
ld d,b
|
||||
ld a,$08
|
||||
push af
|
||||
inc sp
|
||||
xor a
|
||||
push af
|
||||
inc sp
|
||||
push de
|
||||
ld hl,8
|
||||
add hl, sp
|
||||
push hl
|
||||
call _usb_control_transfer
|
||||
pop af
|
||||
pop af
|
||||
pop af
|
||||
ld a, l
|
||||
pop de
|
||||
pop bc
|
||||
ld l, a
|
||||
;source-doc/base-drv/protocol.c:33: cmd.wLength = 8;
|
||||
or a
|
||||
jr NZ,l_usbtrn_get_descriptor_00103
|
||||
;source-doc/base-drv/protocol.c:35: result = usb_control_transfer(&cmd, (uint8_t *)buffer, 0, 8);
|
||||
push de
|
||||
push bc
|
||||
ld hl,4
|
||||
add hl, sp
|
||||
ex de, hl
|
||||
ld bc,$0008
|
||||
ld hl,_cmd_get_dev_descriptr
|
||||
ldir
|
||||
pop bc
|
||||
pop de
|
||||
;source-doc/base-drv/protocol.c:36:
|
||||
ld (ix-2),$12
|
||||
xor a
|
||||
ld (ix-1),a
|
||||
;source-doc/base-drv/protocol.c:37: CHECK(result);
|
||||
ld hl,7
|
||||
add hl, bc
|
||||
ld a, (hl)
|
||||
push af
|
||||
inc sp
|
||||
xor a
|
||||
push af
|
||||
inc sp
|
||||
push de
|
||||
ld hl,4
|
||||
add hl, sp
|
||||
push hl
|
||||
call _usb_control_transfer
|
||||
pop af
|
||||
pop af
|
||||
pop af
|
||||
;source-doc/base-drv/protocol.c:41: result = usb_control_transfer(&cmd, (uint8_t *)buffer, 0, buffer->bMaxPacketSize0);
|
||||
l_usbtrn_get_descriptor_00103:
|
||||
;source-doc/base-drv/protocol.c:42:
|
||||
;source-doc/base-drv/protocol.c:43: RETURN_CHECK(result);
|
||||
ld sp, ix
|
||||
pop ix
|
||||
ret
|
||||
_cmd_get_dev_descriptr:
|
||||
DEFB +$80
|
||||
DEFB +$06
|
||||
DEFB +$00
|
||||
DEFB +$01
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFW +$0008
|
||||
;source-doc/base-drv/protocol.c:47: }
|
||||
; ---------------------------------
|
||||
; Function usbtrn_get_descriptor2
|
||||
; ---------------------------------
|
||||
_usbtrn_get_descriptor2:
|
||||
push ix
|
||||
ld ix,0
|
||||
add ix,sp
|
||||
ld hl, -8
|
||||
add hl, sp
|
||||
ld sp, hl
|
||||
;source-doc/base-drv/protocol.c:51: *
|
||||
ld hl,0
|
||||
add hl, sp
|
||||
ex de, hl
|
||||
ld bc,$0008
|
||||
ld hl,_cmd_get_dev_descriptr
|
||||
ldir
|
||||
;source-doc/base-drv/protocol.c:52: * @param buffer the buffer to store the device descriptor in
|
||||
ld (ix-2),$08
|
||||
xor a
|
||||
ld (ix-1),a
|
||||
;source-doc/base-drv/protocol.c:54: */
|
||||
ld c,(ix+4)
|
||||
ld b,(ix+5)
|
||||
push bc
|
||||
push bc
|
||||
ld e,c
|
||||
ld d,b
|
||||
ld h,$08
|
||||
ld l,(ix+6)
|
||||
push hl
|
||||
push de
|
||||
ld hl,8
|
||||
add hl, sp
|
||||
push hl
|
||||
call _usb_control_transfer
|
||||
pop af
|
||||
pop af
|
||||
pop af
|
||||
ld a, l
|
||||
pop de
|
||||
pop bc
|
||||
ld l, a
|
||||
;source-doc/base-drv/protocol.c:56: usb_error result;
|
||||
or a
|
||||
jr NZ,l_usbtrn_get_descriptor2_00103
|
||||
;source-doc/base-drv/protocol.c:58: setup_packet cmd;
|
||||
push de
|
||||
push bc
|
||||
ld hl,4
|
||||
add hl, sp
|
||||
ex de, hl
|
||||
ld bc,$0008
|
||||
ld hl,_cmd_get_dev_descriptr
|
||||
ldir
|
||||
pop bc
|
||||
pop de
|
||||
;source-doc/base-drv/protocol.c:59: cmd = cmd_get_dev_descriptr;
|
||||
ld (ix-2),$12
|
||||
xor a
|
||||
ld (ix-1),a
|
||||
;source-doc/base-drv/protocol.c:60: cmd.wLength = 8;
|
||||
ld hl,7
|
||||
add hl, bc
|
||||
ld h,(hl)
|
||||
ld l,(ix+6)
|
||||
push hl
|
||||
push de
|
||||
ld hl,4
|
||||
add hl, sp
|
||||
push hl
|
||||
call _usb_control_transfer
|
||||
pop af
|
||||
pop af
|
||||
pop af
|
||||
;source-doc/base-drv/protocol.c:61:
|
||||
l_usbtrn_get_descriptor2_00103:
|
||||
;source-doc/base-drv/protocol.c:62: result = usb_control_transfer(&cmd, (uint8_t *)buffer, device_address, 8);
|
||||
;source-doc/base-drv/protocol.c:63:
|
||||
ld sp, ix
|
||||
pop ix
|
||||
ret
|
||||
;source-doc/base-drv/protocol.c:69: done:
|
||||
; ---------------------------------
|
||||
; Function usbtrn_set_address
|
||||
; ---------------------------------
|
||||
_usbtrn_set_address:
|
||||
push ix
|
||||
ld ix,0
|
||||
add ix,sp
|
||||
push af
|
||||
push af
|
||||
push af
|
||||
push af
|
||||
ld c, l
|
||||
;source-doc/base-drv/protocol.c:71: }
|
||||
push bc
|
||||
ld hl,2
|
||||
add hl, sp
|
||||
ex de, hl
|
||||
ld bc,$0008
|
||||
ld hl,_cmd_set_device_address
|
||||
ldir
|
||||
pop bc
|
||||
;source-doc/base-drv/protocol.c:72:
|
||||
ld (ix-6),c
|
||||
;source-doc/base-drv/protocol.c:74:
|
||||
xor a
|
||||
push af
|
||||
inc sp
|
||||
xor a
|
||||
push af
|
||||
inc sp
|
||||
ld hl,$0000
|
||||
push hl
|
||||
ld hl,4
|
||||
add hl, sp
|
||||
push hl
|
||||
call _usb_control_transfer
|
||||
;source-doc/base-drv/protocol.c:75: /**
|
||||
ld sp,ix
|
||||
pop ix
|
||||
ret
|
||||
_cmd_set_device_address:
|
||||
DEFB +$00
|
||||
DEFB +$05
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFW +$0000
|
||||
;source-doc/base-drv/protocol.c:81: usb_error usbtrn_set_address(const uint8_t device_address) __z88dk_fastcall {
|
||||
; ---------------------------------
|
||||
; Function usbtrn_set_config
|
||||
; ---------------------------------
|
||||
_usbtrn_set_config:
|
||||
push ix
|
||||
ld ix,0
|
||||
add ix,sp
|
||||
ld hl, -8
|
||||
add hl, sp
|
||||
ld sp, hl
|
||||
;source-doc/base-drv/protocol.c:83: cmd = cmd_set_device_address;
|
||||
ld hl,0
|
||||
add hl, sp
|
||||
ld e,l
|
||||
ld d,h
|
||||
push hl
|
||||
ld bc,$0008
|
||||
ld hl,_cmd_set_configuration
|
||||
ldir
|
||||
pop bc
|
||||
;source-doc/base-drv/protocol.c:84: cmd.bValue[0] = device_address;
|
||||
ld a,(ix+6)
|
||||
ld (ix-6),a
|
||||
;source-doc/base-drv/protocol.c:86: return usb_control_transfer(&cmd, 0, 0, 0);
|
||||
ld h,(ix+5)
|
||||
ld l,(ix+4)
|
||||
push hl
|
||||
ld hl,$0000
|
||||
push hl
|
||||
push bc
|
||||
call _usb_control_transfer
|
||||
;source-doc/base-drv/protocol.c:87: }
|
||||
ld sp,ix
|
||||
pop ix
|
||||
ret
|
||||
_cmd_set_configuration:
|
||||
DEFB +$00
|
||||
DEFB +$09
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFW +$0000
|
||||
;source-doc/base-drv/protocol.c:93: *
|
||||
; ---------------------------------
|
||||
; Function usbtrn_get_config_desc
|
||||
; ---------------------------------
|
||||
_usbtrn_get_config_desc:
|
||||
push ix
|
||||
ld ix,0
|
||||
add ix,sp
|
||||
ld hl, -8
|
||||
add hl, sp
|
||||
ld sp, hl
|
||||
;source-doc/base-drv/protocol.c:99: cmd = cmd_set_configuration;
|
||||
ld hl,0
|
||||
add hl, sp
|
||||
ld e,l
|
||||
ld d,h
|
||||
push hl
|
||||
ld bc,$0008
|
||||
ld hl,_cmd_get_config_desc
|
||||
ldir
|
||||
pop bc
|
||||
;source-doc/base-drv/protocol.c:100: cmd.bValue[0] = configuration;
|
||||
ld a,(ix+6)
|
||||
ld (ix-6),a
|
||||
;source-doc/base-drv/protocol.c:101:
|
||||
ld hl,$0006
|
||||
add hl, bc
|
||||
ld e,(ix+7)
|
||||
xor a
|
||||
ld (hl), e
|
||||
inc hl
|
||||
ld (hl), a
|
||||
;source-doc/base-drv/protocol.c:103: }
|
||||
ld e,(ix+4)
|
||||
ld d,(ix+5)
|
||||
ld h,(ix+9)
|
||||
ld l,(ix+8)
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
call _usb_control_transfer
|
||||
;source-doc/base-drv/protocol.c:104:
|
||||
ld sp,ix
|
||||
pop ix
|
||||
ret
|
||||
_cmd_get_config_desc:
|
||||
DEFB +$80
|
||||
DEFB +$06
|
||||
DEFB +$00
|
||||
DEFB +$02
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFW +$0000
|
||||
;source-doc/base-drv/protocol.c:106:
|
||||
; ---------------------------------
|
||||
; Function usbtrn_gfull_cfg_desc
|
||||
; ---------------------------------
|
||||
_usbtrn_gfull_cfg_desc:
|
||||
push ix
|
||||
ld ix,0
|
||||
add ix,sp
|
||||
;source-doc/base-drv/protocol.c:114: * @param max_packet_size the max packet size for control transfers (endpoint 0)
|
||||
ld c,(ix+8)
|
||||
ld b,(ix+9)
|
||||
push bc
|
||||
ld a,(ix+6)
|
||||
push af
|
||||
inc sp
|
||||
ld d,(ix+5)
|
||||
ld e,$09
|
||||
push de
|
||||
ld a,(ix+4)
|
||||
push af
|
||||
inc sp
|
||||
push bc
|
||||
call _usbtrn_get_config_desc
|
||||
pop af
|
||||
pop af
|
||||
pop af
|
||||
pop bc
|
||||
ld a, l
|
||||
or a
|
||||
jr NZ,l_usbtrn_gfull_cfg_desc_00107
|
||||
;source-doc/base-drv/protocol.c:116: */
|
||||
ld l,(ix+8)
|
||||
ld h,(ix+9)
|
||||
inc hl
|
||||
inc hl
|
||||
ld d, (hl)
|
||||
;source-doc/base-drv/protocol.c:117: usb_error usbtrn_get_config_desc(config_descriptor *const buffer,
|
||||
ld a,(ix+7)
|
||||
sub d
|
||||
jr NC,l_usbtrn_gfull_cfg_desc_00104
|
||||
;source-doc/base-drv/protocol.c:118: const uint8_t config_index,
|
||||
ld d,(ix+7)
|
||||
l_usbtrn_gfull_cfg_desc_00104:
|
||||
;source-doc/base-drv/protocol.c:120: const uint8_t device_address,
|
||||
ld h,(ix+6)
|
||||
ld l,(ix+5)
|
||||
push hl
|
||||
ld e,(ix+4)
|
||||
push de
|
||||
push bc
|
||||
call _usbtrn_get_config_desc
|
||||
pop af
|
||||
pop af
|
||||
pop af
|
||||
ld a, l
|
||||
;source-doc/base-drv/protocol.c:122: setup_packet cmd;
|
||||
or a
|
||||
jr NZ,l_usbtrn_gfull_cfg_desc_00107
|
||||
ld l,a
|
||||
;source-doc/base-drv/protocol.c:123: cmd = cmd_get_config_desc;
|
||||
;source-doc/base-drv/protocol.c:124: cmd.bValue[0] = config_index;
|
||||
l_usbtrn_gfull_cfg_desc_00107:
|
||||
;source-doc/base-drv/protocol.c:125: cmd.wLength = (uint16_t)buffer_size;
|
||||
pop ix
|
||||
ret
|
||||
;source-doc/base-drv/protocol.c:129:
|
||||
; ---------------------------------
|
||||
; Function usbtrn_clr_ep_halt
|
||||
; ---------------------------------
|
||||
_usbtrn_clr_ep_halt:
|
||||
push ix
|
||||
ld ix,0
|
||||
add ix,sp
|
||||
ld hl, -8
|
||||
add hl, sp
|
||||
ld sp, hl
|
||||
;source-doc/base-drv/protocol.c:131: const uint8_t device_address,
|
||||
ld hl,0
|
||||
add hl, sp
|
||||
ld e,l
|
||||
ld d,h
|
||||
push hl
|
||||
ld bc,$0008
|
||||
ld hl,_usb_cmd_clr_ep_halt
|
||||
ldir
|
||||
pop bc
|
||||
;source-doc/base-drv/protocol.c:132: const uint8_t max_packet_size,
|
||||
ld a,(ix+4)
|
||||
ld (ix-4),a
|
||||
;source-doc/base-drv/protocol.c:134: uint8_t *const buffer) {
|
||||
ld h,(ix+6)
|
||||
ld l,(ix+5)
|
||||
push hl
|
||||
ld hl,$0000
|
||||
push hl
|
||||
push bc
|
||||
call _usb_control_transfer
|
||||
;source-doc/base-drv/protocol.c:135: usb_error result;
|
||||
ld sp,ix
|
||||
pop ix
|
||||
ret
|
||||
_usb_cmd_clr_ep_halt:
|
||||
DEFB +$02
|
||||
DEFB +$01
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$ff
|
||||
DEFB +$00
|
||||
DEFW +$0000
|
||||
311
Source/HBIOS/ch376-native/base-drv/transfers.c.s
Normal file
311
Source/HBIOS/ch376-native/base-drv/transfers.c.s
Normal file
@@ -0,0 +1,311 @@
|
||||
;
|
||||
; Generated from source-doc/base-drv/transfers.c.asm -- not to be modify directly
|
||||
;
|
||||
;
|
||||
;--------------------------------------------------------
|
||||
; File Created by SDCC : free open source ISO C Compiler
|
||||
; Version 4.5.0 #15248 (Linux)
|
||||
;--------------------------------------------------------
|
||||
; Processed by Z88DK
|
||||
;--------------------------------------------------------
|
||||
|
||||
|
||||
;--------------------------------------------------------
|
||||
; Public variables in this module
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; Externals used
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; special function registers
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; ram data
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; ram data
|
||||
;--------------------------------------------------------
|
||||
|
||||
#IF 0
|
||||
|
||||
; .area _INITIALIZED removed by z88dk
|
||||
|
||||
|
||||
#ENDIF
|
||||
|
||||
;--------------------------------------------------------
|
||||
; absolute external ram data
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; global & static initialisations
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; Home
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; code
|
||||
;--------------------------------------------------------
|
||||
;source-doc/base-drv/transfers.c:23: * See https://www.beyondlogic.org/usbnutshell/usb4.shtml for a description of the USB control transfer
|
||||
; ---------------------------------
|
||||
; Function usb_control_transfer
|
||||
; ---------------------------------
|
||||
_usb_control_transfer:
|
||||
push ix
|
||||
ld ix,0
|
||||
add ix,sp
|
||||
push af
|
||||
push af
|
||||
;source-doc/base-drv/transfers.c:28: * @param max_packet_size Maximum packet size for endpoint
|
||||
ld hl,0
|
||||
add hl, sp
|
||||
set 0, (hl)
|
||||
ld hl,0
|
||||
add hl, sp
|
||||
ld a, (hl)
|
||||
and $f1
|
||||
ld (hl), a
|
||||
ld c,(ix+9)
|
||||
ld b,$00
|
||||
ld hl,1
|
||||
add hl, sp
|
||||
ld (hl), c
|
||||
inc hl
|
||||
ld a, b
|
||||
and $03
|
||||
ld e, a
|
||||
ld a, (hl)
|
||||
and $fc
|
||||
or e
|
||||
ld (hl), a
|
||||
;source-doc/base-drv/transfers.c:30: */
|
||||
ld c,(ix+4)
|
||||
ld b,(ix+5)
|
||||
ld a, (bc)
|
||||
and $80
|
||||
;source-doc/base-drv/transfers.c:32: void *const buffer,
|
||||
ld (ix-1),a
|
||||
or a
|
||||
jr Z,l_usb_control_transfer_00102
|
||||
ld a,(ix+7)
|
||||
or (ix+6)
|
||||
jr NZ,l_usb_control_transfer_00102
|
||||
;source-doc/base-drv/transfers.c:33: const uint8_t device_address,
|
||||
ld l,$0f
|
||||
jp l_usb_control_transfer_00114
|
||||
l_usb_control_transfer_00102:
|
||||
;source-doc/base-drv/transfers.c:35: usb_error result;
|
||||
push bc
|
||||
call _critical_begin
|
||||
;source-doc/base-drv/transfers.c:37:
|
||||
ld l,(ix+8)
|
||||
call _ch_set_usb_address
|
||||
pop bc
|
||||
;source-doc/base-drv/transfers.c:39:
|
||||
ld e,(ix+4)
|
||||
ld d,(ix+5)
|
||||
push bc
|
||||
ld a,$08
|
||||
push af
|
||||
inc sp
|
||||
push de
|
||||
call _ch_write_data
|
||||
pop af
|
||||
inc sp
|
||||
;source-doc/base-drv/transfers.c:40: if (transferIn && buffer == 0)
|
||||
call _ch_issue_token_setup
|
||||
;source-doc/base-drv/transfers.c:41: return USB_ERR_OTHER;
|
||||
call _ch_short_get_status
|
||||
pop bc
|
||||
;source-doc/base-drv/transfers.c:42:
|
||||
ld a, l
|
||||
or a
|
||||
jr NZ,l_usb_control_transfer_00113
|
||||
;source-doc/base-drv/transfers.c:44:
|
||||
ld hl,6
|
||||
add hl, bc
|
||||
ld c, (hl)
|
||||
inc hl
|
||||
;source-doc/base-drv/transfers.c:47: ch_write_data((const uint8_t *)cmd_packet, sizeof(setup_packet));
|
||||
ld a,(hl)
|
||||
ld b,a
|
||||
or c
|
||||
jr Z,l_usb_control_transfer_00116
|
||||
ld hl,0
|
||||
add hl, sp
|
||||
ld e,(ix+6)
|
||||
ld d,(ix+7)
|
||||
ld a,(ix-1)
|
||||
or a
|
||||
jr Z,l_usb_control_transfer_00118
|
||||
push hl
|
||||
push bc
|
||||
push de
|
||||
call _ch_data_in_transfer
|
||||
pop af
|
||||
pop af
|
||||
pop af
|
||||
jr l_usb_control_transfer_00119
|
||||
l_usb_control_transfer_00118:
|
||||
push hl
|
||||
push bc
|
||||
push de
|
||||
call _ch_data_out_transfer
|
||||
pop af
|
||||
pop af
|
||||
pop af
|
||||
l_usb_control_transfer_00119:
|
||||
jr l_usb_control_transfer_00117
|
||||
l_usb_control_transfer_00116:
|
||||
;source-doc/base-drv/transfers.c:48: ch_issue_token_setup();
|
||||
ld l,$00
|
||||
l_usb_control_transfer_00117:
|
||||
;source-doc/base-drv/transfers.c:50: CHECK(result);
|
||||
ld a, l
|
||||
or a
|
||||
jr NZ,l_usb_control_transfer_00113
|
||||
;source-doc/base-drv/transfers.c:52: const uint16_t length = cmd_packet->wLength;
|
||||
ld a,(ix-1)
|
||||
or a
|
||||
jr Z,l_usb_control_transfer_00112
|
||||
;source-doc/base-drv/transfers.c:53:
|
||||
ld l,$2c
|
||||
call _ch_command
|
||||
;source-doc/base-drv/transfers.c:54: result = length != 0
|
||||
ld a,$00
|
||||
ld bc,_CH376_DATA_PORT
|
||||
out (c), a
|
||||
;source-doc/base-drv/transfers.c:55: ? (transferIn ? ch_data_in_transfer(buffer, length, &endpoint) : ch_data_out_transfer(buffer, length, &endpoint))
|
||||
call _ch_issue_token_out_ep0
|
||||
;source-doc/base-drv/transfers.c:56: : USB_ERR_OK;
|
||||
call _ch_long_get_status
|
||||
;source-doc/base-drv/transfers.c:58: CHECK(result)
|
||||
ld a,l
|
||||
or a
|
||||
jr Z,l_usb_control_transfer_00108
|
||||
sub $02
|
||||
jr NZ,l_usb_control_transfer_00113
|
||||
l_usb_control_transfer_00108:
|
||||
;source-doc/base-drv/transfers.c:59:
|
||||
ld l,$00
|
||||
;source-doc/base-drv/transfers.c:60: if (transferIn) {
|
||||
jr l_usb_control_transfer_00113
|
||||
;source-doc/base-drv/transfers.c:63: ch_issue_token_out_ep0();
|
||||
l_usb_control_transfer_00112:
|
||||
;source-doc/base-drv/transfers.c:66: if (result == USB_ERR_OK || result == USB_ERR_STALL) {
|
||||
call _ch_issue_token_in_ep0
|
||||
;source-doc/base-drv/transfers.c:67: result = USB_ERR_OK;
|
||||
call _ch_long_get_status
|
||||
;source-doc/base-drv/transfers.c:71: RETURN_CHECK(result);
|
||||
l_usb_control_transfer_00113:
|
||||
;source-doc/base-drv/transfers.c:72: }
|
||||
push hl
|
||||
call _critical_end
|
||||
pop hl
|
||||
;source-doc/base-drv/transfers.c:73:
|
||||
l_usb_control_transfer_00114:
|
||||
;source-doc/base-drv/transfers.c:74: ch_issue_token_in_ep0();
|
||||
ld sp, ix
|
||||
pop ix
|
||||
ret
|
||||
;source-doc/base-drv/transfers.c:79: done:
|
||||
; ---------------------------------
|
||||
; Function usb_data_in_transfer
|
||||
; ---------------------------------
|
||||
_usb_data_in_transfer:
|
||||
push ix
|
||||
ld ix,0
|
||||
add ix,sp
|
||||
;source-doc/base-drv/transfers.c:81: return result;
|
||||
call _critical_begin
|
||||
;source-doc/base-drv/transfers.c:83:
|
||||
ld l,(ix+8)
|
||||
call _ch_set_usb_address
|
||||
;source-doc/base-drv/transfers.c:85: * @brief Perform a USB data in on the specified endpoint
|
||||
ld l,(ix+9)
|
||||
ld h,(ix+10)
|
||||
push hl
|
||||
ld l,(ix+6)
|
||||
ld h,(ix+7)
|
||||
push hl
|
||||
ld l,(ix+4)
|
||||
ld h,(ix+5)
|
||||
push hl
|
||||
call _ch_data_in_transfer
|
||||
pop af
|
||||
pop af
|
||||
;source-doc/base-drv/transfers.c:87: * @param buffer the buffer to receive the data
|
||||
ex (sp),hl
|
||||
call _critical_end
|
||||
pop hl
|
||||
;source-doc/base-drv/transfers.c:89: * @param device_address the usb address of the device
|
||||
;source-doc/base-drv/transfers.c:90: * @param endpoint the usb endpoint to receive from (toggle of endpoint is updated)
|
||||
pop ix
|
||||
ret
|
||||
;source-doc/base-drv/transfers.c:95: usb_error result;
|
||||
; ---------------------------------
|
||||
; Function usb_data_in_transfer_n
|
||||
; ---------------------------------
|
||||
_usb_data_in_transfer_n:
|
||||
push ix
|
||||
ld ix,0
|
||||
add ix,sp
|
||||
;source-doc/base-drv/transfers.c:98: ch_set_usb_address(device_address);
|
||||
call _critical_begin
|
||||
;source-doc/base-drv/transfers.c:100: result = ch_data_in_transfer(buffer, buffer_size, endpoint);
|
||||
ld l,(ix+8)
|
||||
call _ch_set_usb_address
|
||||
;source-doc/base-drv/transfers.c:102: critical_end();
|
||||
ld l,(ix+9)
|
||||
ld h,(ix+10)
|
||||
push hl
|
||||
ld l,(ix+6)
|
||||
ld h,(ix+7)
|
||||
push hl
|
||||
ld l,(ix+4)
|
||||
ld h,(ix+5)
|
||||
push hl
|
||||
call _ch_data_in_transfer_n
|
||||
pop af
|
||||
pop af
|
||||
;source-doc/base-drv/transfers.c:104: return result;
|
||||
ex (sp),hl
|
||||
call _critical_end
|
||||
pop hl
|
||||
;source-doc/base-drv/transfers.c:106:
|
||||
;source-doc/base-drv/transfers.c:107: /**
|
||||
pop ix
|
||||
ret
|
||||
;source-doc/base-drv/transfers.c:112: * @param device_address the usb address of the device
|
||||
; ---------------------------------
|
||||
; Function usb_data_out_transfer
|
||||
; ---------------------------------
|
||||
_usb_data_out_transfer:
|
||||
push ix
|
||||
ld ix,0
|
||||
add ix,sp
|
||||
;source-doc/base-drv/transfers.c:114: * @return usb_error USB_ERR_OK if all good, otherwise specific error code
|
||||
call _critical_begin
|
||||
;source-doc/base-drv/transfers.c:116: usb_error
|
||||
ld l,(ix+8)
|
||||
call _ch_set_usb_address
|
||||
;source-doc/base-drv/transfers.c:118: usb_error result;
|
||||
ld l,(ix+9)
|
||||
ld h,(ix+10)
|
||||
push hl
|
||||
ld l,(ix+6)
|
||||
ld h,(ix+7)
|
||||
push hl
|
||||
ld l,(ix+4)
|
||||
ld h,(ix+5)
|
||||
push hl
|
||||
call _ch_data_out_transfer
|
||||
pop af
|
||||
pop af
|
||||
;source-doc/base-drv/transfers.c:120: critical_begin();
|
||||
ex (sp),hl
|
||||
call _critical_end
|
||||
pop hl
|
||||
;source-doc/base-drv/transfers.c:122: ch_set_usb_address(device_address);
|
||||
;source-doc/base-drv/transfers.c:123:
|
||||
pop ix
|
||||
ret
|
||||
224
Source/HBIOS/ch376-native/base-drv/usb-base-drv.c.s
Normal file
224
Source/HBIOS/ch376-native/base-drv/usb-base-drv.c.s
Normal file
@@ -0,0 +1,224 @@
|
||||
;
|
||||
; Generated from source-doc/base-drv/usb-base-drv.c.asm -- not to be modify directly
|
||||
;
|
||||
;
|
||||
;--------------------------------------------------------
|
||||
; File Created by SDCC : free open source ISO C Compiler
|
||||
; Version 4.5.0 #15248 (Linux)
|
||||
;--------------------------------------------------------
|
||||
; Processed by Z88DK
|
||||
;--------------------------------------------------------
|
||||
|
||||
|
||||
;--------------------------------------------------------
|
||||
; Public variables in this module
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; Externals used
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; special function registers
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; ram data
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; ram data
|
||||
;--------------------------------------------------------
|
||||
|
||||
#IF 0
|
||||
|
||||
; .area _INITIALIZED removed by z88dk
|
||||
|
||||
|
||||
#ENDIF
|
||||
|
||||
;--------------------------------------------------------
|
||||
; absolute external ram data
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; global & static initialisations
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; Home
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; code
|
||||
;--------------------------------------------------------
|
||||
;source-doc/base-drv/usb-base-drv.c:7: static usb_error usb_host_bus_reset(void) {
|
||||
; ---------------------------------
|
||||
; Function usb_host_bus_reset
|
||||
; ---------------------------------
|
||||
_usb_host_bus_reset:
|
||||
;source-doc/base-drv/usb-base-drv.c:8: ch_cmd_set_usb_mode(CH_MODE_HOST);
|
||||
ld l,$06
|
||||
call _ch_cmd_set_usb_mode
|
||||
;source-doc/base-drv/usb-base-drv.c:9: delay_20ms();
|
||||
call _delay_20ms
|
||||
;source-doc/base-drv/usb-base-drv.c:11: ch_cmd_set_usb_mode(CH_MODE_HOST_RESET);
|
||||
ld l,$07
|
||||
call _ch_cmd_set_usb_mode
|
||||
;source-doc/base-drv/usb-base-drv.c:12: delay_20ms();
|
||||
call _delay_20ms
|
||||
;source-doc/base-drv/usb-base-drv.c:14: ch_cmd_set_usb_mode(CH_MODE_HOST);
|
||||
ld l,$06
|
||||
call _ch_cmd_set_usb_mode
|
||||
;source-doc/base-drv/usb-base-drv.c:15: delay_20ms();
|
||||
call _delay_20ms
|
||||
;source-doc/base-drv/ch376.h:108: #define TRACE_USB_ERROR(result)
|
||||
ld l,$0b
|
||||
call _ch_command
|
||||
;source-doc/base-drv/ch376.h:109:
|
||||
ld a,$25
|
||||
ld bc,_CH376_DATA_PORT
|
||||
out (c), a
|
||||
;source-doc/base-drv/ch376.h:110: #endif
|
||||
ld a,$df
|
||||
ld bc,_CH376_DATA_PORT
|
||||
out (c), a
|
||||
;source-doc/base-drv/usb-base-drv.c:19: return USB_ERR_OK;
|
||||
ld l,$00
|
||||
;source-doc/base-drv/usb-base-drv.c:20: }
|
||||
ret
|
||||
;source-doc/base-drv/usb-base-drv.c:24: uint16_t usb_init(uint8_t state) __z88dk_fastcall {
|
||||
; ---------------------------------
|
||||
; Function usb_init
|
||||
; ---------------------------------
|
||||
_usb_init:
|
||||
;source-doc/base-drv/usb-base-drv.c:27: USB_MODULE_LEDS = $03;
|
||||
ld a,$03
|
||||
ld bc,_USB_MODULE_LEDS
|
||||
out (c), a
|
||||
;source-doc/base-drv/usb-base-drv.c:29: if (state == 0) {
|
||||
ld a, l
|
||||
or a
|
||||
jr NZ,l_usb_init_00104
|
||||
;source-doc/base-drv/usb-base-drv.c:30: ch_cmd_reset_all();
|
||||
call _ch_cmd_reset_all
|
||||
;source-doc/base-drv/usb-base-drv.c:31: delay_short();
|
||||
call _delay_short
|
||||
;source-doc/base-drv/usb-base-drv.c:33: if (!ch_probe()) {
|
||||
call _ch_probe
|
||||
ld a, l
|
||||
;source-doc/base-drv/usb-base-drv.c:34: USB_MODULE_LEDS = $00;
|
||||
or a
|
||||
jr NZ,l_usb_init_00102
|
||||
ld bc,_USB_MODULE_LEDS
|
||||
out (c), a
|
||||
;source-doc/base-drv/usb-base-drv.c:35: return $FF00;
|
||||
ld hl,$ff00
|
||||
jp l_usb_init_00113
|
||||
l_usb_init_00102:
|
||||
;source-doc/base-drv/usb-base-drv.c:37: USB_MODULE_LEDS = $00;
|
||||
ld a,$00
|
||||
ld bc,_USB_MODULE_LEDS
|
||||
out (c), a
|
||||
;source-doc/base-drv/usb-base-drv.c:38: return 1;
|
||||
ld hl,$0001
|
||||
jr l_usb_init_00113
|
||||
l_usb_init_00104:
|
||||
;source-doc/base-drv/usb-base-drv.c:41: if (state == 1) {
|
||||
ld a, l
|
||||
dec a
|
||||
jr NZ,l_usb_init_00106
|
||||
;source-doc/base-drv/usb-base-drv.c:42: r = ch_cmd_get_ic_version();
|
||||
call _ch_cmd_get_ic_version
|
||||
;source-doc/base-drv/usb-base-drv.c:44: USB_MODULE_LEDS = $00;
|
||||
ld a,$00
|
||||
ld bc,_USB_MODULE_LEDS
|
||||
out (c), a
|
||||
;source-doc/base-drv/usb-base-drv.c:45: return (uint16_t)r << 8 | 2;
|
||||
xor a
|
||||
ld h, l
|
||||
ld l,$02
|
||||
jr l_usb_init_00113
|
||||
l_usb_init_00106:
|
||||
;source-doc/base-drv/usb-base-drv.c:48: if (state == 2) {
|
||||
ld a, l
|
||||
sub $02
|
||||
jr NZ,l_usb_init_00159
|
||||
ld a,$01
|
||||
jr l_usb_init_00160
|
||||
l_usb_init_00159:
|
||||
xor a
|
||||
l_usb_init_00160:
|
||||
ld c,a
|
||||
or a
|
||||
jr Z,l_usb_init_00110
|
||||
;source-doc/base-drv/usb-base-drv.c:49: usb_host_bus_reset();
|
||||
call _usb_host_bus_reset
|
||||
;source-doc/base-drv/usb-base-drv.c:51: r = ch_very_short_status();
|
||||
call _ch_very_short_status
|
||||
ld a, l
|
||||
;source-doc/base-drv/usb-base-drv.c:53: if (r != USB_INT_CONNECT) {
|
||||
sub $81
|
||||
jr Z,l_usb_init_00108
|
||||
;source-doc/base-drv/usb-base-drv.c:54: USB_MODULE_LEDS = $00;
|
||||
ld a,$00
|
||||
ld bc,_USB_MODULE_LEDS
|
||||
out (c), a
|
||||
;source-doc/base-drv/usb-base-drv.c:55: return 2;
|
||||
ld hl,$0002
|
||||
jr l_usb_init_00113
|
||||
l_usb_init_00108:
|
||||
;source-doc/base-drv/usb-base-drv.c:58: return 3;
|
||||
ld hl,$0003
|
||||
jr l_usb_init_00113
|
||||
l_usb_init_00110:
|
||||
;source-doc/base-drv/usb-base-drv.c:61: memset(get_usb_work_area(), 0, sizeof(_usb_state));
|
||||
ld b,$32
|
||||
ld hl,_x
|
||||
jr l_usb_init_00163
|
||||
l_usb_init_00162:
|
||||
ld (hl),$00
|
||||
inc hl
|
||||
l_usb_init_00163:
|
||||
ld (hl),$00
|
||||
inc hl
|
||||
djnz l_usb_init_00162
|
||||
;source-doc/base-drv/usb-base-drv.c:62: if (state != 2) {
|
||||
bit 0, c
|
||||
jr NZ,l_usb_init_00112
|
||||
;source-doc/base-drv/usb-base-drv.c:63: usb_host_bus_reset();
|
||||
call _usb_host_bus_reset
|
||||
;source-doc/base-drv/usb-base-drv.c:64: delay_medium();
|
||||
call _delay_medium
|
||||
l_usb_init_00112:
|
||||
;source-doc/base-drv/usb-base-drv.c:66: enumerate_all_devices();
|
||||
call _enumerate_all_devices
|
||||
;source-doc/base-drv/usb-base-drv.c:67: USB_MODULE_LEDS = $00;
|
||||
ld a,$00
|
||||
ld bc,_USB_MODULE_LEDS
|
||||
out (c), a
|
||||
;source-doc/base-drv/usb-base-drv.c:68: return (uint16_t)count_of_devices() << 8 | 4;
|
||||
call _count_of_devices
|
||||
ld h, a
|
||||
xor a
|
||||
ld l,$04
|
||||
l_usb_init_00113:
|
||||
;source-doc/base-drv/usb-base-drv.c:69: }
|
||||
ret
|
||||
;source-doc/base-drv/usb-base-drv.c:71: usb_error usb_scsi_seek(const uint16_t dev_index, const uint32_t lba) {
|
||||
; ---------------------------------
|
||||
; Function usb_scsi_seek
|
||||
; ---------------------------------
|
||||
_usb_scsi_seek:
|
||||
push ix
|
||||
ld ix,0
|
||||
add ix,sp
|
||||
;source-doc/base-drv/usb-base-drv.c:72: device_config_storage *const dev = (device_config_storage *)get_usb_device_config(dev_index);
|
||||
ld a,(ix+4)
|
||||
call _get_usb_device_config
|
||||
;source-doc/base-drv/usb-base-drv.c:74: dev->current_lba = lba;
|
||||
ld hl,$000c
|
||||
add hl, de
|
||||
ex de, hl
|
||||
ld hl,6
|
||||
add hl, sp
|
||||
ld bc,$0004
|
||||
ldir
|
||||
;source-doc/base-drv/usb-base-drv.c:75: return USB_ERR_OK;
|
||||
ld l,$00
|
||||
;source-doc/base-drv/usb-base-drv.c:76: }
|
||||
pop ix
|
||||
ret
|
||||
258
Source/HBIOS/ch376-native/base-drv/usb_state.c.s
Normal file
258
Source/HBIOS/ch376-native/base-drv/usb_state.c.s
Normal file
@@ -0,0 +1,258 @@
|
||||
;
|
||||
; Generated from source-doc/base-drv/usb_state.c.asm -- not to be modify directly
|
||||
;
|
||||
;
|
||||
;--------------------------------------------------------
|
||||
; File Created by SDCC : free open source ISO C Compiler
|
||||
; Version 4.5.0 #15248 (Linux)
|
||||
;--------------------------------------------------------
|
||||
; Processed by Z88DK
|
||||
;--------------------------------------------------------
|
||||
|
||||
|
||||
;--------------------------------------------------------
|
||||
; Public variables in this module
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; Externals used
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; special function registers
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; ram data
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; ram data
|
||||
;--------------------------------------------------------
|
||||
|
||||
#IF 0
|
||||
|
||||
; .area _INITIALIZED removed by z88dk
|
||||
|
||||
|
||||
#ENDIF
|
||||
|
||||
;--------------------------------------------------------
|
||||
; absolute external ram data
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; global & static initialisations
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; Home
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; code
|
||||
;--------------------------------------------------------
|
||||
;source-doc/base-drv/usb_state.c:17: uint8_t count_of_devices(void) __sdcccall(1) {
|
||||
; ---------------------------------
|
||||
; Function count_of_devices
|
||||
; ---------------------------------
|
||||
_count_of_devices:
|
||||
;source-doc/base-drv/usb_state.c:18: _usb_state *const p = get_usb_work_area();
|
||||
;source-doc/base-drv/usb_state.c:22: const device_config *p_config = first_device_config(p);
|
||||
ld hl,_x
|
||||
call _first_device_config
|
||||
;source-doc/base-drv/usb_state.c:23: while (p_config) {
|
||||
ld c,$00
|
||||
l_count_of_devices_00104:
|
||||
ld a, d
|
||||
or e
|
||||
jr Z,l_count_of_devices_00106
|
||||
;source-doc/base-drv/usb_state.c:24: const uint8_t type = p_config->type;
|
||||
ld l, e
|
||||
ld h, d
|
||||
ld a, (hl)
|
||||
and $0f
|
||||
;source-doc/base-drv/usb_state.c:26: if (type != USB_IS_HUB && type)
|
||||
cp $0f
|
||||
jr Z,l_count_of_devices_00102
|
||||
or a
|
||||
jr Z,l_count_of_devices_00102
|
||||
;source-doc/base-drv/usb_state.c:27: count++;
|
||||
inc c
|
||||
l_count_of_devices_00102:
|
||||
;source-doc/base-drv/usb_state.c:30: p_config = next_device_config(p, p_config);
|
||||
push bc
|
||||
ld hl,_x
|
||||
call _next_device_config
|
||||
pop bc
|
||||
jr l_count_of_devices_00104
|
||||
l_count_of_devices_00106:
|
||||
;source-doc/base-drv/usb_state.c:33: return count;
|
||||
ld a, c
|
||||
;source-doc/base-drv/usb_state.c:34: }
|
||||
ret
|
||||
_device_config_sizes:
|
||||
DEFB +$00
|
||||
DEFB +$10
|
||||
DEFB +$10
|
||||
DEFB +$0c
|
||||
DEFB +$06
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
;source-doc/base-drv/usb_state.c:37: device_config *find_first_free(void) {
|
||||
; ---------------------------------
|
||||
; Function find_first_free
|
||||
; ---------------------------------
|
||||
_find_first_free:
|
||||
;source-doc/base-drv/usb_state.c:38: _usb_state *const boot_state = get_usb_work_area();
|
||||
;source-doc/base-drv/usb_state.c:41: device_config *p = first_device_config(boot_state);
|
||||
ld hl,_x
|
||||
call _first_device_config
|
||||
;source-doc/base-drv/usb_state.c:42: while (p) {
|
||||
l_find_first_free_00103:
|
||||
ld a, d
|
||||
or e
|
||||
jr Z,l_find_first_free_00105
|
||||
;source-doc/base-drv/usb_state.c:43: if (p->type == 0)
|
||||
ld l, e
|
||||
ld h, d
|
||||
ld a, (hl)
|
||||
and $0f
|
||||
jr NZ,l_find_first_free_00102
|
||||
;source-doc/base-drv/usb_state.c:44: return p;
|
||||
ex de, hl
|
||||
jr l_find_first_free_00106
|
||||
l_find_first_free_00102:
|
||||
;source-doc/base-drv/usb_state.c:46: p = next_device_config(boot_state, p);
|
||||
ld hl,_x
|
||||
call _next_device_config
|
||||
jr l_find_first_free_00103
|
||||
l_find_first_free_00105:
|
||||
;source-doc/base-drv/usb_state.c:49: return NULL;
|
||||
ld hl,$0000
|
||||
l_find_first_free_00106:
|
||||
;source-doc/base-drv/usb_state.c:50: }
|
||||
ret
|
||||
;source-doc/base-drv/usb_state.c:52: device_config *first_device_config(const _usb_state *const p) __sdcccall(1) { return (device_config *)&p->device_configs[0]; }
|
||||
; ---------------------------------
|
||||
; Function first_device_config
|
||||
; ---------------------------------
|
||||
_first_device_config:
|
||||
ex de, hl
|
||||
inc de
|
||||
inc de
|
||||
ret
|
||||
;source-doc/base-drv/usb_state.c:54: device_config *next_device_config(const _usb_state *const usb_state, const device_config *const p) __sdcccall(1) {
|
||||
; ---------------------------------
|
||||
; Function next_device_config
|
||||
; ---------------------------------
|
||||
_next_device_config:
|
||||
ld c, l
|
||||
ld b, h
|
||||
;source-doc/base-drv/usb_state.c:55: if (p->type == 0)
|
||||
ld l, e
|
||||
ld h, d
|
||||
ld a, (hl)
|
||||
and $0f
|
||||
jr NZ,l_next_device_config_00102
|
||||
;source-doc/base-drv/usb_state.c:56: return NULL;
|
||||
ld de,$0000
|
||||
jr l_next_device_config_00105
|
||||
l_next_device_config_00102:
|
||||
;source-doc/base-drv/usb_state.c:58: const uint8_t size = device_config_sizes[p->type];
|
||||
ld l, e
|
||||
ld h, d
|
||||
ld a, (hl)
|
||||
and $0f
|
||||
add a, +((_device_config_sizes) & $FF)
|
||||
ld l, a
|
||||
ld a,$00
|
||||
adc a, +((_device_config_sizes) / 256)
|
||||
ld h, a
|
||||
ld a, (hl)
|
||||
;source-doc/base-drv/usb_state.c:65: const uint8_t *_p = (uint8_t *)p;
|
||||
;source-doc/base-drv/usb_state.c:66: device_config *const result = (device_config *)(_p + size);
|
||||
add a, e
|
||||
ld e, a
|
||||
ld a,$00
|
||||
adc a, d
|
||||
ld d, a
|
||||
;source-doc/base-drv/usb_state.c:68: if (result >= (device_config *)&usb_state->device_configs_end)
|
||||
ld hl,$0062
|
||||
add hl, bc
|
||||
ld a, e
|
||||
sub l
|
||||
ld a, d
|
||||
sbc a, h
|
||||
ret C
|
||||
;source-doc/base-drv/usb_state.c:69: return NULL;
|
||||
ld de,$0000
|
||||
;source-doc/base-drv/usb_state.c:71: return result;
|
||||
l_next_device_config_00105:
|
||||
;source-doc/base-drv/usb_state.c:72: }
|
||||
ret
|
||||
;source-doc/base-drv/usb_state.c:74: device_config *get_usb_device_config(const uint8_t device_index) __sdcccall(1) {
|
||||
; ---------------------------------
|
||||
; Function get_usb_device_config
|
||||
; ---------------------------------
|
||||
_get_usb_device_config:
|
||||
ld c, a
|
||||
;source-doc/base-drv/usb_state.c:75: const _usb_state *const usb_state = get_usb_work_area();
|
||||
;source-doc/base-drv/usb_state.c:79: for (device_config *p = first_device_config(usb_state); p; p = next_device_config(usb_state, p)) {
|
||||
push bc
|
||||
ld hl,_x
|
||||
call _first_device_config
|
||||
pop bc
|
||||
ld b,$01
|
||||
l_get_usb_device_config_00107:
|
||||
ld a, d
|
||||
or e
|
||||
jr Z,l_get_usb_device_config_00105
|
||||
;source-doc/base-drv/usb_state.c:80: if (p->type != USB_NOT_SUPPORTED) {
|
||||
ld l, e
|
||||
ld h, d
|
||||
ld a, (hl)
|
||||
and $0f
|
||||
jr Z,l_get_usb_device_config_00108
|
||||
;source-doc/base-drv/usb_state.c:81: if (counter == device_index)
|
||||
ld a, c
|
||||
sub b
|
||||
;source-doc/base-drv/usb_state.c:82: return p;
|
||||
jr Z,l_get_usb_device_config_00109
|
||||
;source-doc/base-drv/usb_state.c:83: counter++;
|
||||
inc b
|
||||
l_get_usb_device_config_00108:
|
||||
;source-doc/base-drv/usb_state.c:79: for (device_config *p = first_device_config(usb_state); p; p = next_device_config(usb_state, p)) {
|
||||
push bc
|
||||
ld hl,_x
|
||||
call _next_device_config
|
||||
pop bc
|
||||
jr l_get_usb_device_config_00107
|
||||
l_get_usb_device_config_00105:
|
||||
;source-doc/base-drv/usb_state.c:87: return NULL; // is not a usb device
|
||||
ld de,$0000
|
||||
l_get_usb_device_config_00109:
|
||||
;source-doc/base-drv/usb_state.c:88: }
|
||||
ret
|
||||
;source-doc/base-drv/usb_state.c:90: usb_device_type usb_get_device_type(const uint16_t dev_index) {
|
||||
; ---------------------------------
|
||||
; Function usb_get_device_type
|
||||
; ---------------------------------
|
||||
_usb_get_device_type:
|
||||
push ix
|
||||
ld ix,0
|
||||
add ix,sp
|
||||
;source-doc/base-drv/usb_state.c:91: const device_config *dev = get_usb_device_config(dev_index);
|
||||
ld a,(ix+4)
|
||||
call _get_usb_device_config
|
||||
ld l, e
|
||||
;source-doc/base-drv/usb_state.c:93: if (dev == NULL)
|
||||
ld a,d
|
||||
ld h,a
|
||||
or e
|
||||
jr NZ,l_usb_get_device_type_00102
|
||||
;source-doc/base-drv/usb_state.c:94: return -1;
|
||||
ld l,$ff
|
||||
jr l_usb_get_device_type_00103
|
||||
l_usb_get_device_type_00102:
|
||||
;source-doc/base-drv/usb_state.c:96: return dev->type;
|
||||
ld a, (hl)
|
||||
and $0f
|
||||
ld l, a
|
||||
l_usb_get_device_type_00103:
|
||||
;source-doc/base-drv/usb_state.c:97: }
|
||||
pop ix
|
||||
ret
|
||||
149
Source/HBIOS/ch376-native/base-drv/work-area.c.s
Normal file
149
Source/HBIOS/ch376-native/base-drv/work-area.c.s
Normal file
@@ -0,0 +1,149 @@
|
||||
;
|
||||
; Generated from source-doc/base-drv/work-area.c.asm -- not to be modify directly
|
||||
;
|
||||
;
|
||||
;--------------------------------------------------------
|
||||
; File Created by SDCC : free open source ISO C Compiler
|
||||
; Version 4.5.0 #15248 (Linux)
|
||||
;--------------------------------------------------------
|
||||
; Processed by Z88DK
|
||||
;--------------------------------------------------------
|
||||
|
||||
|
||||
;--------------------------------------------------------
|
||||
; Public variables in this module
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; Externals used
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; special function registers
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; ram data
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; ram data
|
||||
;--------------------------------------------------------
|
||||
|
||||
#IF 0
|
||||
|
||||
; .area _INITIALIZED removed by z88dk
|
||||
|
||||
_x:
|
||||
DEFS 99
|
||||
|
||||
#ENDIF
|
||||
|
||||
;--------------------------------------------------------
|
||||
; absolute external ram data
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; global & static initialisations
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; Home
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; code
|
||||
;--------------------------------------------------------
|
||||
_x:
|
||||
DEFB $00
|
||||
DEFB +$00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB +$00
|
||||
133
Source/HBIOS/ch376-native/cruntime.asm
Normal file
133
Source/HBIOS/ch376-native/cruntime.asm
Normal file
@@ -0,0 +1,133 @@
|
||||
|
||||
_memset_callee:
|
||||
pop af ; return address
|
||||
pop bc ; address to be set
|
||||
pop de ; value to be set
|
||||
pop hl ; number of bytes to set
|
||||
push af ; restore return address
|
||||
|
||||
ld a, b
|
||||
or c
|
||||
ret z
|
||||
|
||||
ld a, e
|
||||
push hl
|
||||
pop de
|
||||
ret z
|
||||
|
||||
ld (hl), a
|
||||
inc de
|
||||
dec bc
|
||||
ld a, b
|
||||
or c
|
||||
ret z
|
||||
|
||||
push hl
|
||||
ldir
|
||||
pop hl
|
||||
ret
|
||||
|
||||
_memcpy_callee:
|
||||
|
||||
pop af
|
||||
pop bc
|
||||
pop hl
|
||||
pop de
|
||||
push af
|
||||
|
||||
|
||||
; enter : bc = size_t n
|
||||
; hl = void *s2 = src
|
||||
; de = void *s1 = dst
|
||||
;
|
||||
; exit : hl = void *s1 = dst
|
||||
; de = ptr in s1 to one byte past last byte copied
|
||||
; bc = 0
|
||||
; carry reset
|
||||
;
|
||||
; uses : af, bc, de, hl
|
||||
|
||||
ld a, b
|
||||
or c
|
||||
jr z, zero_n
|
||||
|
||||
asm0_memcpy:
|
||||
push de
|
||||
ldir
|
||||
pop hl
|
||||
or a
|
||||
ret
|
||||
|
||||
zero_n:
|
||||
push de
|
||||
pop hl
|
||||
ret
|
||||
|
||||
.if 0
|
||||
; required if --optimise-for-size is targetted
|
||||
; but there appears to be a regression that stop the driver from working
|
||||
; if optimised for size is selected
|
||||
___sdcc_enter_ix:
|
||||
ex (sp), ix
|
||||
push ix
|
||||
ld ix, 2
|
||||
add ix, sp
|
||||
ret
|
||||
|
||||
____sdcc_lib_setmem_hl:
|
||||
l_setmem_hl:
|
||||
ret
|
||||
|
||||
____sdcc_load_debc_mhl:
|
||||
ld c, (hl)
|
||||
inc hl
|
||||
ld b, (hl)
|
||||
inc hl
|
||||
ld e, (hl)
|
||||
inc hl
|
||||
ld d, (hl)
|
||||
ret
|
||||
|
||||
____sdcc_4_push_hlix:
|
||||
pop af
|
||||
push af
|
||||
push af
|
||||
push af
|
||||
|
||||
push de
|
||||
|
||||
push ix
|
||||
pop de
|
||||
|
||||
add hl, de
|
||||
|
||||
ex de, hl
|
||||
|
||||
ld hl, 2+2
|
||||
add hl, sp
|
||||
|
||||
ex de, hl
|
||||
|
||||
ldi
|
||||
ldi
|
||||
ldi
|
||||
ld a, (hl)
|
||||
ld (de), a
|
||||
|
||||
inc bc
|
||||
inc bc
|
||||
inc bc
|
||||
|
||||
pop de
|
||||
ret
|
||||
|
||||
____sdcc_store_debc_mhl:
|
||||
ld (hl), c
|
||||
inc hl
|
||||
ld (hl), b
|
||||
inc hl
|
||||
ld (hl), e
|
||||
inc hl
|
||||
ld (hl), d
|
||||
ret
|
||||
.endif
|
||||
143
Source/HBIOS/ch376-native/ez80-firmware.asm
Normal file
143
Source/HBIOS/ch376-native/ez80-firmware.asm
Normal file
@@ -0,0 +1,143 @@
|
||||
; delegate usb function to firmware of ez80 module
|
||||
|
||||
; extern uint16_t usb_init(uint8_t state) __z88dk_fastcall;
|
||||
_usb_init:
|
||||
EZ80_EX_USB_INIT
|
||||
RET
|
||||
|
||||
; usb_error usb_scsi_seek(const uint16_t dev_index, const uint32_t lba)
|
||||
_usb_scsi_seek:
|
||||
; iy+2 : dev_index
|
||||
; iy+4:5:6:7 : lba
|
||||
LD IY, 0
|
||||
ADD IY, SP
|
||||
EZ80_EXTN_IY_TO_MB_IY
|
||||
|
||||
LD C, (IY+2)
|
||||
LD_DE_IY_P_.L(4) ; LD.L DE, (IY+4)
|
||||
LD L, (IY+7)
|
||||
EZ80_EX_USB_STORAGE_SEEK
|
||||
LD L, A
|
||||
RET
|
||||
|
||||
; usb_error usb_scsi_init(const uint16_t dev_index)
|
||||
_usb_scsi_init:
|
||||
LD IY, 0
|
||||
ADD IY, SP
|
||||
|
||||
LD C, (IY+2)
|
||||
EZ80_EX_USB_SCSI_INIT
|
||||
LD L, A
|
||||
RET
|
||||
|
||||
; usb_error usb_scsi_read(const uint16_t dev_index, uint8_t *const buffer);
|
||||
_usb_scsi_read:
|
||||
LD IY, 0
|
||||
ADD IY, SP
|
||||
|
||||
LD C, (IY+2)
|
||||
LD E, (IY+4)
|
||||
LD D, (IY+5)
|
||||
EZ80_EXTN_DE_TO_MB_DE
|
||||
EZ80_EX_USB_SCSI_READ
|
||||
LD L, A
|
||||
RET
|
||||
|
||||
; usb_error usb_scsi_write(const uint16_t dev_index, uint8_t *const buffer)
|
||||
_usb_scsi_write:
|
||||
LD IY, 0
|
||||
ADD IY, SP
|
||||
|
||||
LD C, (IY+2)
|
||||
LD E, (IY+4)
|
||||
LD D, (IY+5)
|
||||
EZ80_EXTN_DE_TO_MB_DE
|
||||
EZ80_EX_USB_SCSI_WRITE
|
||||
LD L, A
|
||||
RET
|
||||
|
||||
; usb_error usb_scsi_read_capacity(const uint16_t dev_index, scsi_read_capacity_result *cap_result)
|
||||
_usb_scsi_read_capacity:
|
||||
LD IY, 0
|
||||
ADD IY, SP
|
||||
|
||||
LD C, (IY+2)
|
||||
LD E, (IY+4)
|
||||
LD D, (IY+5)
|
||||
EZ80_EXTN_DE_TO_MB_DE
|
||||
EZ80_EX_USB_SCSI_READ_CAP
|
||||
LD L, A
|
||||
RET
|
||||
|
||||
; extern uint8_t usb_ufi_read(const uint16_t dev_index, uint8_t *const buffer)
|
||||
_usb_ufi_read:
|
||||
LD IY, 0
|
||||
ADD IY, SP
|
||||
|
||||
LD C, (IY+2)
|
||||
LD E, (IY+4)
|
||||
LD D, (IY+5)
|
||||
EZ80_EXTN_DE_TO_MB_DE
|
||||
EZ80_EX_USB_UFI_READ
|
||||
LD L, A
|
||||
RET
|
||||
|
||||
;extern usb_error usb_ufi_write(const uint16_t dev_index, uint8_t *const buffer);
|
||||
_usb_ufi_write:
|
||||
LD IY, 0
|
||||
ADD IY, SP
|
||||
|
||||
LD C, (IY+2)
|
||||
LD E, (IY+4)
|
||||
LD D, (IY+5)
|
||||
EZ80_EXTN_DE_TO_MB_DE
|
||||
EZ80_EX_USB_UFI_WRITE
|
||||
LD L, A
|
||||
RET
|
||||
|
||||
; extern uint32_t usb_ufi_get_cap(const uint16_t dev_index)
|
||||
_usb_ufi_get_cap:
|
||||
LD IY, 0
|
||||
ADD IY, SP
|
||||
|
||||
LD C, (IY+2)
|
||||
EZ80_EXTN_DE_TO_MB_DE
|
||||
EZ80_EX_USB_UFI_GET_CAP ;
|
||||
|
||||
LD D, E ; convert E:uHL to DE:HL
|
||||
EZ80_CPY_UHL_TO_EHL
|
||||
RET
|
||||
|
||||
; extern void usb_kyb_init(const uint8_t dev_index) __sdcccall(1);
|
||||
_usb_kyb_init:
|
||||
LD C, A
|
||||
EZ80_EX_USB_KYB_INIT
|
||||
RET
|
||||
|
||||
; extern uint8_t usb_kyb_flush() __sdcccall(1);
|
||||
_usb_kyb_flush:
|
||||
EZ80_EX_USB_KYB_FLUSH
|
||||
RET
|
||||
|
||||
; extern uint8_t usb_kyb_status() __sdcccall(1);
|
||||
_usb_kyb_status:
|
||||
EZ80_EX_USB_KYB_STATUS
|
||||
RET
|
||||
|
||||
; extern uint16_t usb_kyb_read();
|
||||
; H = 0/1 set if char, L=>code
|
||||
_usb_kyb_read:
|
||||
EZ80_EX_USB_KYB_READ
|
||||
LD H, A
|
||||
RET
|
||||
|
||||
|
||||
;usb_device_type usb_get_device_type(const uint16_t dev_index)
|
||||
_usb_get_device_type:
|
||||
LD IY, 0
|
||||
ADD IY, SP
|
||||
|
||||
LD C, (IY+2)
|
||||
EZ80_EX_USB_GET_DEV_TYPE
|
||||
LD L, A
|
||||
RET
|
||||
11
Source/HBIOS/ch376-native/keyboard.s
Normal file
11
Source/HBIOS/ch376-native/keyboard.s
Normal file
@@ -0,0 +1,11 @@
|
||||
; Generated File -- not to be modify directly
|
||||
#IF (!CHNATIVEEZ80)
|
||||
#include "ch376-native/keyboard/class_hid.c.s"
|
||||
#ENDIF
|
||||
#IF (!CHNATIVEEZ80)
|
||||
#include "ch376-native/keyboard/class_hid_keyboard.c.s"
|
||||
#ENDIF
|
||||
#IF (!CHNATIVEEZ80)
|
||||
#include "ch376-native/keyboard/kyb_driver.c.s"
|
||||
#ENDIF
|
||||
#include "ch376-native/keyboard/kyb-init.c.s"
|
||||
1
Source/HBIOS/ch376-native/keyboard/.gitignore
vendored
Normal file
1
Source/HBIOS/ch376-native/keyboard/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.asm
|
||||
169
Source/HBIOS/ch376-native/keyboard/class_hid.c.s
Normal file
169
Source/HBIOS/ch376-native/keyboard/class_hid.c.s
Normal file
@@ -0,0 +1,169 @@
|
||||
;
|
||||
; Generated from source-doc/keyboard/class_hid.c.asm -- not to be modify directly
|
||||
;
|
||||
;
|
||||
;--------------------------------------------------------
|
||||
; File Created by SDCC : free open source ISO C Compiler
|
||||
; Version 4.5.0 #15248 (Linux)
|
||||
;--------------------------------------------------------
|
||||
; Processed by Z88DK
|
||||
;--------------------------------------------------------
|
||||
|
||||
|
||||
;--------------------------------------------------------
|
||||
; Public variables in this module
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; Externals used
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; special function registers
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; ram data
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; ram data
|
||||
;--------------------------------------------------------
|
||||
|
||||
#IF 0
|
||||
|
||||
; .area _INITIALIZED removed by z88dk
|
||||
|
||||
|
||||
#ENDIF
|
||||
|
||||
;--------------------------------------------------------
|
||||
; absolute external ram data
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; global & static initialisations
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; Home
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; code
|
||||
;--------------------------------------------------------
|
||||
;source-doc/keyboard/class_hid.c:6: usb_error hid_set_protocol(const device_config_keyboard *const dev, const uint8_t protocol) __sdcccall(1) {
|
||||
; ---------------------------------
|
||||
; Function hid_set_protocol
|
||||
; ---------------------------------
|
||||
_hid_set_protocol:
|
||||
push ix
|
||||
ld ix,0
|
||||
add ix,sp
|
||||
push af
|
||||
push af
|
||||
push af
|
||||
push af
|
||||
;source-doc/keyboard/class_hid.c:8: cmd = cmd_hid_set;
|
||||
push hl
|
||||
ex de,hl
|
||||
ld hl,2
|
||||
add hl, sp
|
||||
ex de, hl
|
||||
ld bc,$0008
|
||||
ld hl,_cmd_hid_set
|
||||
ldir
|
||||
pop de
|
||||
;source-doc/keyboard/class_hid.c:10: cmd.bRequest = HID_SET_PROTOCOL;
|
||||
ld (ix-7),$0b
|
||||
;source-doc/keyboard/class_hid.c:11: cmd.bValue[0] = protocol;
|
||||
ld a,(ix+4)
|
||||
ld (ix-6),a
|
||||
;source-doc/keyboard/class_hid.c:13: return usb_control_transfer(&cmd, NULL, dev->address, dev->max_packet_size);
|
||||
ld l, e
|
||||
ld h, d
|
||||
inc hl
|
||||
ld b, (hl)
|
||||
ex de, hl
|
||||
ld a, (hl)
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
and $0f
|
||||
ld c,a
|
||||
push bc
|
||||
ld hl,$0000
|
||||
push hl
|
||||
ld hl,4
|
||||
add hl, sp
|
||||
push hl
|
||||
call _usb_control_transfer
|
||||
pop af
|
||||
pop af
|
||||
pop af
|
||||
ld a, l
|
||||
;source-doc/keyboard/class_hid.c:14: }
|
||||
ld sp, ix
|
||||
pop ix
|
||||
pop hl
|
||||
inc sp
|
||||
jp (hl)
|
||||
_cmd_hid_set:
|
||||
DEFB +$21
|
||||
DEFB +$0b
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFW +$0000
|
||||
;source-doc/keyboard/class_hid.c:16: usb_error hid_set_idle(const device_config_keyboard *const dev, const uint8_t duration) __sdcccall(1) {
|
||||
; ---------------------------------
|
||||
; Function hid_set_idle
|
||||
; ---------------------------------
|
||||
_hid_set_idle:
|
||||
push ix
|
||||
ld ix,0
|
||||
add ix,sp
|
||||
push af
|
||||
push af
|
||||
push af
|
||||
push af
|
||||
;source-doc/keyboard/class_hid.c:18: cmd = cmd_hid_set;
|
||||
push hl
|
||||
ex de,hl
|
||||
ld hl,2
|
||||
add hl, sp
|
||||
ex de, hl
|
||||
ld bc,$0008
|
||||
ld hl,_cmd_hid_set
|
||||
ldir
|
||||
pop de
|
||||
;source-doc/keyboard/class_hid.c:20: cmd.bRequest = HID_SET_IDLE;
|
||||
ld (ix-7),$0a
|
||||
;source-doc/keyboard/class_hid.c:21: cmd.bValue[0] = duration;
|
||||
ld a,(ix+4)
|
||||
ld (ix-6),a
|
||||
;source-doc/keyboard/class_hid.c:23: return usb_control_transfer(&cmd, NULL, dev->address, dev->max_packet_size);
|
||||
ld l, e
|
||||
ld h, d
|
||||
inc hl
|
||||
ld b, (hl)
|
||||
ex de, hl
|
||||
ld a, (hl)
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
and $0f
|
||||
ld c,a
|
||||
push bc
|
||||
ld hl,$0000
|
||||
push hl
|
||||
ld hl,4
|
||||
add hl, sp
|
||||
push hl
|
||||
call _usb_control_transfer
|
||||
pop af
|
||||
pop af
|
||||
pop af
|
||||
ld a, l
|
||||
;source-doc/keyboard/class_hid.c:24: }
|
||||
ld sp, ix
|
||||
pop ix
|
||||
pop hl
|
||||
inc sp
|
||||
jp (hl)
|
||||
440
Source/HBIOS/ch376-native/keyboard/class_hid_keyboard.c.s
Normal file
440
Source/HBIOS/ch376-native/keyboard/class_hid_keyboard.c.s
Normal file
@@ -0,0 +1,440 @@
|
||||
;
|
||||
; Generated from source-doc/keyboard/class_hid_keyboard.c.asm -- not to be modify directly
|
||||
;
|
||||
;
|
||||
;--------------------------------------------------------
|
||||
; File Created by SDCC : free open source ISO C Compiler
|
||||
; Version 4.5.0 #15248 (Linux)
|
||||
;--------------------------------------------------------
|
||||
; Processed by Z88DK
|
||||
;--------------------------------------------------------
|
||||
|
||||
|
||||
;--------------------------------------------------------
|
||||
; Public variables in this module
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; Externals used
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; special function registers
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; ram data
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; ram data
|
||||
;--------------------------------------------------------
|
||||
|
||||
#IF 0
|
||||
|
||||
; .area _INITIALIZED removed by z88dk
|
||||
|
||||
_scancodes_shift_table:
|
||||
DEFS 128
|
||||
_scancodes_table:
|
||||
DEFS 128
|
||||
|
||||
#ENDIF
|
||||
|
||||
;--------------------------------------------------------
|
||||
; absolute external ram data
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; global & static initialisations
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; Home
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; code
|
||||
;--------------------------------------------------------
|
||||
;source-doc/keyboard/class_hid_keyboard.c:334: };
|
||||
; ---------------------------------
|
||||
; Function char_with_caps_lock
|
||||
; ---------------------------------
|
||||
_char_with_caps_lock:
|
||||
;source-doc/keyboard/class_hid_keyboard.c:335:
|
||||
bit 0, l
|
||||
;source-doc/keyboard/class_hid_keyboard.c:336: static char char_with_caps_lock(const char c, const bool caps_lock_engaged) __sdcccall(1) {
|
||||
jr Z,l_char_with_caps_lock_00109
|
||||
;source-doc/keyboard/class_hid_keyboard.c:338: return c;
|
||||
cp $41
|
||||
jr C,l_char_with_caps_lock_00104
|
||||
cp $5b
|
||||
jr NC,l_char_with_caps_lock_00104
|
||||
;source-doc/keyboard/class_hid_keyboard.c:339:
|
||||
add a,$20
|
||||
jr l_char_with_caps_lock_00109
|
||||
l_char_with_caps_lock_00104:
|
||||
;source-doc/keyboard/class_hid_keyboard.c:341: return c - 'A' + 'a';
|
||||
cp $61
|
||||
ret C
|
||||
cp $7b
|
||||
ret NC
|
||||
;source-doc/keyboard/class_hid_keyboard.c:342:
|
||||
add a,$e0
|
||||
;source-doc/keyboard/class_hid_keyboard.c:344: return c - 'a' + 'A';
|
||||
l_char_with_caps_lock_00109:
|
||||
;source-doc/keyboard/class_hid_keyboard.c:345:
|
||||
ret
|
||||
;source-doc/keyboard/class_hid_keyboard.c:347: }
|
||||
; ---------------------------------
|
||||
; Function scancode_to_char
|
||||
; ---------------------------------
|
||||
_scancode_to_char:
|
||||
push ix
|
||||
ld ix,0
|
||||
add ix,sp
|
||||
;source-doc/keyboard/class_hid_keyboard.c:348:
|
||||
ld c,a
|
||||
ld e,l
|
||||
and $11
|
||||
jr Z,l_scancode_to_char_00118
|
||||
;source-doc/keyboard/class_hid_keyboard.c:349: char scancode_to_char(const uint8_t modifier_keys, const uint8_t code, const bool caps_lock_engaged) __sdcccall(1) {
|
||||
ld a, e
|
||||
sub $04
|
||||
jr C,l_scancode_to_char_00102
|
||||
ld a,$1d
|
||||
sub e
|
||||
jr C,l_scancode_to_char_00102
|
||||
;source-doc/keyboard/class_hid_keyboard.c:350: if ((modifier_keys & (KEY_MOD_LCTRL | KEY_MOD_RCTRL))) {
|
||||
ld a, e
|
||||
add a,$fd
|
||||
jr l_scancode_to_char_00121
|
||||
l_scancode_to_char_00102:
|
||||
;source-doc/keyboard/class_hid_keyboard.c:352: return code - 3;
|
||||
ld a,e
|
||||
cp $1f
|
||||
jr Z,l_scancode_to_char_00104
|
||||
sub $2c
|
||||
jr NZ,l_scancode_to_char_00105
|
||||
l_scancode_to_char_00104:
|
||||
;source-doc/keyboard/class_hid_keyboard.c:353:
|
||||
xor a
|
||||
jr l_scancode_to_char_00121
|
||||
l_scancode_to_char_00105:
|
||||
;source-doc/keyboard/class_hid_keyboard.c:355: return 0;
|
||||
ld a, e
|
||||
sub $2f
|
||||
jr NZ,l_scancode_to_char_00108
|
||||
;source-doc/keyboard/class_hid_keyboard.c:356:
|
||||
ld a,$1b
|
||||
jr l_scancode_to_char_00121
|
||||
l_scancode_to_char_00108:
|
||||
;source-doc/keyboard/class_hid_keyboard.c:358: return 27;
|
||||
ld a, e
|
||||
sub $31
|
||||
jr NZ,l_scancode_to_char_00110
|
||||
;source-doc/keyboard/class_hid_keyboard.c:359:
|
||||
ld a,$1c
|
||||
jr l_scancode_to_char_00121
|
||||
l_scancode_to_char_00110:
|
||||
;source-doc/keyboard/class_hid_keyboard.c:361: return 28;
|
||||
ld a, e
|
||||
sub $30
|
||||
jr NZ,l_scancode_to_char_00112
|
||||
;source-doc/keyboard/class_hid_keyboard.c:362:
|
||||
ld a,$1d
|
||||
jr l_scancode_to_char_00121
|
||||
l_scancode_to_char_00112:
|
||||
;source-doc/keyboard/class_hid_keyboard.c:364: return 29;
|
||||
ld a, e
|
||||
sub $23
|
||||
jr NZ,l_scancode_to_char_00114
|
||||
;source-doc/keyboard/class_hid_keyboard.c:365:
|
||||
ld a,$1e
|
||||
jr l_scancode_to_char_00121
|
||||
l_scancode_to_char_00114:
|
||||
;source-doc/keyboard/class_hid_keyboard.c:367: return 30;
|
||||
ld a, e
|
||||
sub $2d
|
||||
jr NZ,l_scancode_to_char_00118
|
||||
;source-doc/keyboard/class_hid_keyboard.c:368:
|
||||
ld a,$1f
|
||||
jr l_scancode_to_char_00121
|
||||
l_scancode_to_char_00118:
|
||||
;source-doc/keyboard/class_hid_keyboard.c:371: }
|
||||
ld a, c
|
||||
and $22
|
||||
jr Z,l_scancode_to_char_00120
|
||||
;source-doc/keyboard/class_hid_keyboard.c:372:
|
||||
ld d,$00
|
||||
ld hl,_scancodes_shift_table
|
||||
add hl, de
|
||||
ld a, (hl)
|
||||
ld l,(ix+4)
|
||||
call _char_with_caps_lock
|
||||
jr l_scancode_to_char_00121
|
||||
l_scancode_to_char_00120:
|
||||
;source-doc/keyboard/class_hid_keyboard.c:374: return char_with_caps_lock(scancodes_shift_table[code], caps_lock_engaged);
|
||||
ld d,$00
|
||||
ld hl,_scancodes_table
|
||||
add hl, de
|
||||
ld a, (hl)
|
||||
ld l,(ix+4)
|
||||
call _char_with_caps_lock
|
||||
l_scancode_to_char_00121:
|
||||
;source-doc/keyboard/class_hid_keyboard.c:375:
|
||||
pop ix
|
||||
pop hl
|
||||
inc sp
|
||||
jp (hl)
|
||||
_scancodes_shift_table:
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$41
|
||||
DEFB +$42
|
||||
DEFB +$43
|
||||
DEFB +$44
|
||||
DEFB +$45
|
||||
DEFB +$46
|
||||
DEFB +$47
|
||||
DEFB +$48
|
||||
DEFB +$49
|
||||
DEFB +$4a
|
||||
DEFB +$4b
|
||||
DEFB +$4c
|
||||
DEFB +$4d
|
||||
DEFB +$4e
|
||||
DEFB +$4f
|
||||
DEFB +$50
|
||||
DEFB +$51
|
||||
DEFB +$52
|
||||
DEFB +$53
|
||||
DEFB +$54
|
||||
DEFB +$55
|
||||
DEFB +$56
|
||||
DEFB +$57
|
||||
DEFB +$58
|
||||
DEFB +$59
|
||||
DEFB +$5a
|
||||
DEFB +$21
|
||||
DEFB +$40
|
||||
DEFB +$23
|
||||
DEFB +$24
|
||||
DEFB +$25
|
||||
DEFB +$5e
|
||||
DEFB +$26
|
||||
DEFB +$2a
|
||||
DEFB +$28
|
||||
DEFB +$29
|
||||
DEFB +$0d
|
||||
DEFB +$1b
|
||||
DEFB +$08
|
||||
DEFB +$09
|
||||
DEFB +$20
|
||||
DEFB +$5f
|
||||
DEFB +$2b
|
||||
DEFB +$7b
|
||||
DEFB +$7d
|
||||
DEFB +$7c
|
||||
DEFB +$7e
|
||||
DEFB +$3a
|
||||
DEFB +$22
|
||||
DEFB +$7e
|
||||
DEFB +$3c
|
||||
DEFB +$3e
|
||||
DEFB +$3f
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$2f
|
||||
DEFB +$2a
|
||||
DEFB +$2d
|
||||
DEFB +$2b
|
||||
DEFB +$0d
|
||||
DEFB +$31
|
||||
DEFB +$32
|
||||
DEFB +$33
|
||||
DEFB +$34
|
||||
DEFB +$35
|
||||
DEFB +$36
|
||||
DEFB +$37
|
||||
DEFB +$38
|
||||
DEFB +$39
|
||||
DEFB +$30
|
||||
DEFB +$2e
|
||||
DEFB +$5c
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$3d
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
_scancodes_table:
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$61
|
||||
DEFB +$62
|
||||
DEFB +$63
|
||||
DEFB +$64
|
||||
DEFB +$65
|
||||
DEFB +$66
|
||||
DEFB +$67
|
||||
DEFB +$68
|
||||
DEFB +$69
|
||||
DEFB +$6a
|
||||
DEFB +$6b
|
||||
DEFB +$6c
|
||||
DEFB +$6d
|
||||
DEFB +$6e
|
||||
DEFB +$6f
|
||||
DEFB +$70
|
||||
DEFB +$71
|
||||
DEFB +$72
|
||||
DEFB +$73
|
||||
DEFB +$74
|
||||
DEFB +$75
|
||||
DEFB +$76
|
||||
DEFB +$77
|
||||
DEFB +$78
|
||||
DEFB +$79
|
||||
DEFB +$7a
|
||||
DEFB +$31
|
||||
DEFB +$32
|
||||
DEFB +$33
|
||||
DEFB +$34
|
||||
DEFB +$35
|
||||
DEFB +$36
|
||||
DEFB +$37
|
||||
DEFB +$38
|
||||
DEFB +$39
|
||||
DEFB +$30
|
||||
DEFB +$0d
|
||||
DEFB +$1b
|
||||
DEFB +$08
|
||||
DEFB +$09
|
||||
DEFB +$20
|
||||
DEFB +$2d
|
||||
DEFB +$3d
|
||||
DEFB +$5b
|
||||
DEFB +$5d
|
||||
DEFB +$5c
|
||||
DEFB +$23
|
||||
DEFB +$3b
|
||||
DEFB +$27
|
||||
DEFB +$60
|
||||
DEFB +$2c
|
||||
DEFB +$2e
|
||||
DEFB +$2f
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$2f
|
||||
DEFB +$2a
|
||||
DEFB +$2d
|
||||
DEFB +$2b
|
||||
DEFB +$0d
|
||||
DEFB +$31
|
||||
DEFB +$32
|
||||
DEFB +$33
|
||||
DEFB +$34
|
||||
DEFB +$35
|
||||
DEFB +$36
|
||||
DEFB +$37
|
||||
DEFB +$38
|
||||
DEFB +$39
|
||||
DEFB +$30
|
||||
DEFB +$2e
|
||||
DEFB +$5c
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$3d
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
122
Source/HBIOS/ch376-native/keyboard/kyb-init.c.s
Normal file
122
Source/HBIOS/ch376-native/keyboard/kyb-init.c.s
Normal file
@@ -0,0 +1,122 @@
|
||||
;
|
||||
; Generated from source-doc/keyboard/kyb-init.c.asm -- not to be modify directly
|
||||
;
|
||||
;
|
||||
;--------------------------------------------------------
|
||||
; File Created by SDCC : free open source ISO C Compiler
|
||||
; Version 4.5.0 #15248 (Linux)
|
||||
;--------------------------------------------------------
|
||||
; Processed by Z88DK
|
||||
;--------------------------------------------------------
|
||||
|
||||
|
||||
;--------------------------------------------------------
|
||||
; Public variables in this module
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; Externals used
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; special function registers
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; ram data
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; ram data
|
||||
;--------------------------------------------------------
|
||||
|
||||
#IF 0
|
||||
|
||||
; .area _INITIALIZED removed by z88dk
|
||||
|
||||
|
||||
#ENDIF
|
||||
|
||||
;--------------------------------------------------------
|
||||
; absolute external ram data
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; global & static initialisations
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; Home
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; code
|
||||
;--------------------------------------------------------
|
||||
;source-doc/keyboard/kyb-init.c:6: uint8_t keyboard_init(void) __sdcccall(1) {
|
||||
; ---------------------------------
|
||||
; Function keyboard_init
|
||||
; ---------------------------------
|
||||
_keyboard_init:
|
||||
push ix
|
||||
ld ix,0
|
||||
add ix,sp
|
||||
dec sp
|
||||
;source-doc/keyboard/kyb-init.c:7: uint8_t index = 1;
|
||||
;source-doc/keyboard/kyb-init.c:9: do {
|
||||
ld c,$01
|
||||
ld (ix-1),c
|
||||
l_keyboard_init_00103:
|
||||
;source-doc/keyboard/kyb-init.c:10: usb_device_type t = usb_get_device_type(index);
|
||||
ld e, c
|
||||
ld d,$00
|
||||
push bc
|
||||
push de
|
||||
push de
|
||||
call _usb_get_device_type
|
||||
pop af
|
||||
ld a, l
|
||||
pop de
|
||||
pop bc
|
||||
;source-doc/keyboard/kyb-init.c:12: if (t == USB_IS_KEYBOARD) {
|
||||
sub $04
|
||||
jr NZ,l_keyboard_init_00104
|
||||
;source-doc/keyboard/kyb-init.c:13: print_string("\r\nUSB: KEYBOARD @ $");
|
||||
push de
|
||||
ld hl,kyb_init_str_0
|
||||
call _print_string
|
||||
pop de
|
||||
;source-doc/keyboard/kyb-init.c:14: print_uint16(index);
|
||||
ex de, hl
|
||||
call _print_uint16
|
||||
;source-doc/keyboard/kyb-init.c:15: print_string(" $");
|
||||
ld hl,kyb_init_str_1
|
||||
call _print_string
|
||||
;source-doc/keyboard/kyb-init.c:17: usb_kyb_init(index);
|
||||
ld a,(ix-1)
|
||||
call _usb_kyb_init
|
||||
;source-doc/keyboard/kyb-init.c:18: return 1;
|
||||
ld a,$01
|
||||
jr l_keyboard_init_00106
|
||||
l_keyboard_init_00104:
|
||||
;source-doc/keyboard/kyb-init.c:20: } while (++index != MAX_NUMBER_OF_DEVICES + 1);
|
||||
inc c
|
||||
ld (ix-1),c
|
||||
ld a, c
|
||||
sub $07
|
||||
jr NZ,l_keyboard_init_00103
|
||||
;source-doc/keyboard/kyb-init.c:22: print_string("\r\nUSB: KEYBOARD: NOT FOUND$");
|
||||
ld hl,kyb_init_str_2
|
||||
call _print_string
|
||||
;source-doc/keyboard/kyb-init.c:24: return 0;
|
||||
xor a
|
||||
l_keyboard_init_00106:
|
||||
;source-doc/keyboard/kyb-init.c:25: }
|
||||
inc sp
|
||||
pop ix
|
||||
ret
|
||||
kyb_init_str_0:
|
||||
DEFB $0d
|
||||
DEFB $0a
|
||||
DEFM "USB: KEYBOARD @ $"
|
||||
DEFB $00
|
||||
kyb_init_str_1:
|
||||
DEFM " $"
|
||||
DEFB $00
|
||||
kyb_init_str_2:
|
||||
DEFB $0d
|
||||
DEFB $0a
|
||||
DEFM "USB: KEYBOARD: NOT FOUND$"
|
||||
DEFB $00
|
||||
406
Source/HBIOS/ch376-native/keyboard/kyb_driver.c.s
Normal file
406
Source/HBIOS/ch376-native/keyboard/kyb_driver.c.s
Normal file
@@ -0,0 +1,406 @@
|
||||
;
|
||||
; Generated from source-doc/keyboard/kyb_driver.c.asm -- not to be modify directly
|
||||
;
|
||||
;
|
||||
;--------------------------------------------------------
|
||||
; File Created by SDCC : free open source ISO C Compiler
|
||||
; Version 4.5.0 #15248 (Linux)
|
||||
;--------------------------------------------------------
|
||||
; Processed by Z88DK
|
||||
;--------------------------------------------------------
|
||||
|
||||
|
||||
;--------------------------------------------------------
|
||||
; Public variables in this module
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; Externals used
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; special function registers
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; ram data
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; ram data
|
||||
;--------------------------------------------------------
|
||||
|
||||
#IF 0
|
||||
|
||||
; .area _INITIALIZED removed by z88dk
|
||||
|
||||
_caps_lock_engaged:
|
||||
DEFS 1
|
||||
_keyboard_config:
|
||||
DEFS 2
|
||||
_buffer:
|
||||
DEFS 8
|
||||
_write_index:
|
||||
DEFS 1
|
||||
_read_index:
|
||||
DEFS 1
|
||||
_report:
|
||||
DEFS 8
|
||||
_previous:
|
||||
DEFS 8
|
||||
|
||||
#ENDIF
|
||||
|
||||
;--------------------------------------------------------
|
||||
; absolute external ram data
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; global & static initialisations
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; Home
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; code
|
||||
;--------------------------------------------------------
|
||||
;source-doc/keyboard/kyb_driver.c:23: #define EI __asm__("EI")
|
||||
; ---------------------------------
|
||||
; Function report_diff
|
||||
; ---------------------------------
|
||||
_report_diff:
|
||||
;source-doc/keyboard/kyb_driver.c:24:
|
||||
ld de,_report+0
|
||||
;source-doc/keyboard/kyb_driver.c:25: static uint8_t report_diff() __sdcccall(1) {
|
||||
;source-doc/keyboard/kyb_driver.c:28:
|
||||
ld b,$08
|
||||
ld hl,_previous
|
||||
l_report_diff_00103:
|
||||
;source-doc/keyboard/kyb_driver.c:29: uint8_t i = sizeof(report);
|
||||
ld a, (de)
|
||||
inc de
|
||||
ld c, (hl)
|
||||
inc hl
|
||||
sub c
|
||||
jr Z,l_report_diff_00104
|
||||
;source-doc/keyboard/kyb_driver.c:30: do {
|
||||
ld a,$01
|
||||
jr l_report_diff_00106
|
||||
l_report_diff_00104:
|
||||
;source-doc/keyboard/kyb_driver.c:31: if (*a++ != *b++)
|
||||
djnz l_report_diff_00103
|
||||
;source-doc/keyboard/kyb_driver.c:33: } while (--i != 0);
|
||||
xor a
|
||||
l_report_diff_00106:
|
||||
;source-doc/keyboard/kyb_driver.c:34:
|
||||
ret
|
||||
;source-doc/keyboard/kyb_driver.c:36: }
|
||||
; ---------------------------------
|
||||
; Function keyboard_buf_put
|
||||
; ---------------------------------
|
||||
_keyboard_buf_put:
|
||||
ld c, a
|
||||
;source-doc/keyboard/kyb_driver.c:37:
|
||||
ld b,$00
|
||||
ld hl,+(_report + 2)
|
||||
add hl, bc
|
||||
;source-doc/keyboard/kyb_driver.c:38: static void keyboard_buf_put(const uint8_t indx) __sdcccall(1) {
|
||||
ld a,(hl)
|
||||
ld e,a
|
||||
sub $80
|
||||
jr NC,l_keyboard_buf_put_00112
|
||||
ld a, e
|
||||
or a
|
||||
;source-doc/keyboard/kyb_driver.c:39: const uint8_t key_code = report.keyCode[indx];
|
||||
jr Z,l_keyboard_buf_put_00112
|
||||
;source-doc/keyboard/kyb_driver.c:42:
|
||||
ld b,$00
|
||||
ld hl,+(_previous + 2)
|
||||
add hl, bc
|
||||
ld a, (hl)
|
||||
sub e
|
||||
;source-doc/keyboard/kyb_driver.c:43: // if already reported, just skip it
|
||||
jr Z,l_keyboard_buf_put_00112
|
||||
;source-doc/keyboard/kyb_driver.c:45: return;
|
||||
ld a, e
|
||||
sub $39
|
||||
jr NZ,l_keyboard_buf_put_00107
|
||||
;source-doc/keyboard/kyb_driver.c:46:
|
||||
ld hl,_caps_lock_engaged
|
||||
ld a, (hl)
|
||||
xor $01
|
||||
ld (hl), a
|
||||
;source-doc/keyboard/kyb_driver.c:47: if (key_code == KEY_CODE_CAPS_LOCK) {
|
||||
jr l_keyboard_buf_put_00112
|
||||
l_keyboard_buf_put_00107:
|
||||
;source-doc/keyboard/kyb_driver.c:50: }
|
||||
ld a,(_report)
|
||||
ld hl,_caps_lock_engaged
|
||||
ld h, (hl)
|
||||
push hl
|
||||
inc sp
|
||||
ld l, e
|
||||
call _scancode_to_char
|
||||
ld b, a
|
||||
;source-doc/keyboard/kyb_driver.c:52: const unsigned char c = scancode_to_char(report.bModifierKeys, key_code, caps_lock_engaged);
|
||||
or a
|
||||
;source-doc/keyboard/kyb_driver.c:53:
|
||||
ret Z
|
||||
;source-doc/keyboard/kyb_driver.c:55: return;
|
||||
ld a, (_write_index)
|
||||
inc a
|
||||
and $07
|
||||
ld c, a
|
||||
;source-doc/keyboard/kyb_driver.c:56:
|
||||
ld hl,_read_index
|
||||
ld a, (hl)
|
||||
sub c
|
||||
ret Z
|
||||
;source-doc/keyboard/kyb_driver.c:57: uint8_t next_write_index = (write_index + 1) & KEYBOARD_BUFFER_SIZE_MASK;
|
||||
ld hl,(_write_index)
|
||||
ld h,$00
|
||||
ld de,_buffer
|
||||
add hl,de
|
||||
ld a,b
|
||||
ld (hl),a
|
||||
ld hl,_write_index
|
||||
;source-doc/keyboard/kyb_driver.c:58: if (next_write_index != read_index) { // Check if buffer is not full
|
||||
ld (hl), c
|
||||
l_keyboard_buf_put_00112:
|
||||
;source-doc/keyboard/kyb_driver.c:60: write_index = next_write_index;
|
||||
ret
|
||||
;source-doc/keyboard/kyb_driver.c:62: }
|
||||
; ---------------------------------
|
||||
; Function usb_kyb_status
|
||||
; ---------------------------------
|
||||
_usb_kyb_status:
|
||||
;source-doc/keyboard/kyb_driver.c:63:
|
||||
DI
|
||||
;source-doc/keyboard/kyb_driver.c:67: uint8_t size;
|
||||
ld a,(_write_index)
|
||||
ld hl,_read_index
|
||||
sub (hl)
|
||||
jr C,l_usb_kyb_status_00102
|
||||
;source-doc/keyboard/kyb_driver.c:68:
|
||||
ld a,(_write_index)
|
||||
ld hl,_read_index
|
||||
sub (hl)
|
||||
jr l_usb_kyb_status_00103
|
||||
l_usb_kyb_status_00102:
|
||||
;source-doc/keyboard/kyb_driver.c:70: size = write_index - read_index;
|
||||
ld hl, (_read_index)
|
||||
ld a,$08
|
||||
sub l
|
||||
ld hl, (_write_index)
|
||||
add a, l
|
||||
l_usb_kyb_status_00103:
|
||||
;source-doc/keyboard/kyb_driver.c:72: size = KEYBOARD_BUFFER_SIZE - read_index + write_index;
|
||||
EI
|
||||
;source-doc/keyboard/kyb_driver.c:73:
|
||||
;source-doc/keyboard/kyb_driver.c:74: EI;
|
||||
ret
|
||||
;source-doc/keyboard/kyb_driver.c:76: }
|
||||
; ---------------------------------
|
||||
; Function usb_kyb_read
|
||||
; ---------------------------------
|
||||
_usb_kyb_read:
|
||||
;source-doc/keyboard/kyb_driver.c:77:
|
||||
ld a,(_write_index)
|
||||
ld hl,_read_index
|
||||
sub (hl)
|
||||
jr NZ,l_usb_kyb_read_00102
|
||||
;source-doc/keyboard/kyb_driver.c:78: uint16_t usb_kyb_read() {
|
||||
ld hl,$ff00
|
||||
jr l_usb_kyb_read_00103
|
||||
l_usb_kyb_read_00102:
|
||||
;source-doc/keyboard/kyb_driver.c:80: return $FF00; // H = -1, L = 0
|
||||
DI
|
||||
;source-doc/keyboard/kyb_driver.c:81:
|
||||
ld hl,(_read_index)
|
||||
ld h,$00
|
||||
ld bc,_buffer
|
||||
add hl,bc
|
||||
ld a,(hl)
|
||||
ld c,l
|
||||
ld b,h
|
||||
ld hl,_read_index
|
||||
ld l, a
|
||||
;source-doc/keyboard/kyb_driver.c:82: DI;
|
||||
ld a, (_read_index)
|
||||
inc a
|
||||
and $07
|
||||
ld (_read_index), a
|
||||
;source-doc/keyboard/kyb_driver.c:83: const uint8_t c = buffer[read_index];
|
||||
EI
|
||||
;source-doc/keyboard/kyb_driver.c:86:
|
||||
ld h,$00
|
||||
l_usb_kyb_read_00103:
|
||||
;source-doc/keyboard/kyb_driver.c:87: /* H = 0, L = ascii char */
|
||||
ret
|
||||
;source-doc/keyboard/kyb_driver.c:89: }
|
||||
; ---------------------------------
|
||||
; Function usb_kyb_flush
|
||||
; ---------------------------------
|
||||
_usb_kyb_flush:
|
||||
;source-doc/keyboard/kyb_driver.c:90:
|
||||
DI
|
||||
;source-doc/keyboard/kyb_driver.c:91: uint8_t usb_kyb_flush() __sdcccall(1) {
|
||||
xor a
|
||||
ld (_read_index),a
|
||||
ld (_write_index),a
|
||||
;source-doc/keyboard/kyb_driver.c:94:
|
||||
ld de,_previous+0
|
||||
;source-doc/keyboard/kyb_driver.c:95: uint8_t i = sizeof(previous);
|
||||
;source-doc/keyboard/kyb_driver.c:96: uint8_t *a = (uint8_t *)previous;
|
||||
ld b,$08
|
||||
ld hl,_report
|
||||
l_usb_kyb_flush_00101:
|
||||
;source-doc/keyboard/kyb_driver.c:97: uint8_t *b = (uint8_t *)report;
|
||||
xor a
|
||||
ld (de), a
|
||||
inc de
|
||||
;source-doc/keyboard/kyb_driver.c:98: do {
|
||||
ld (hl),$00
|
||||
inc hl
|
||||
;source-doc/keyboard/kyb_driver.c:99: *a++ = 0;
|
||||
djnz l_usb_kyb_flush_00101
|
||||
;source-doc/keyboard/kyb_driver.c:101: } while (--i != 0);
|
||||
EI
|
||||
;source-doc/keyboard/kyb_driver.c:103: EI;
|
||||
xor a
|
||||
;source-doc/keyboard/kyb_driver.c:104:
|
||||
ret
|
||||
;source-doc/keyboard/kyb_driver.c:106: }
|
||||
; ---------------------------------
|
||||
; Function usb_kyb_tick
|
||||
; ---------------------------------
|
||||
_usb_kyb_tick:
|
||||
;source-doc/keyboard/kyb_driver.c:109: usb_error result;
|
||||
ld hl,_in_critical_usb_section
|
||||
ld a, (hl)
|
||||
or a
|
||||
;source-doc/keyboard/kyb_driver.c:110:
|
||||
jr NZ,l_usb_kyb_tick_00112
|
||||
;././source-doc/base-drv//ch376.h:108: #define TRACE_USB_ERROR(result)
|
||||
ld l,$0b
|
||||
call _ch_command
|
||||
;././source-doc/base-drv//ch376.h:109:
|
||||
ld a,$25
|
||||
ld bc,_CH376_DATA_PORT
|
||||
out (c), a
|
||||
;././source-doc/base-drv//ch376.h:110: #endif
|
||||
ld a,$1f
|
||||
ld bc,_CH376_DATA_PORT
|
||||
out (c), a
|
||||
;source-doc/keyboard/kyb_driver.c:113:
|
||||
ld bc,_report+0
|
||||
ld hl, (_keyboard_config)
|
||||
ld a,$08
|
||||
push af
|
||||
inc sp
|
||||
push bc
|
||||
push hl
|
||||
call _usbdev_dat_in_trnsfer_0
|
||||
pop af
|
||||
pop af
|
||||
inc sp
|
||||
;././source-doc/base-drv//ch376.h:108: #define TRACE_USB_ERROR(result)
|
||||
push hl
|
||||
ld l,$0b
|
||||
call _ch_command
|
||||
pop hl
|
||||
;././source-doc/base-drv//ch376.h:109:
|
||||
ld a,$25
|
||||
ld bc,_CH376_DATA_PORT
|
||||
out (c), a
|
||||
;././source-doc/base-drv//ch376.h:110: #endif
|
||||
ld a,$df
|
||||
ld bc,_CH376_DATA_PORT
|
||||
out (c), a
|
||||
;source-doc/keyboard/kyb_driver.c:115: result = usbdev_dat_in_trnsfer_0((device_config *)keyboard_config, (uint8_t *)&report, 8);
|
||||
ld a, l
|
||||
or a
|
||||
jr NZ,l_usb_kyb_tick_00112
|
||||
;source-doc/keyboard/kyb_driver.c:116: ch_configure_nak_retry_3s();
|
||||
call _report_diff
|
||||
or a
|
||||
jr Z,l_usb_kyb_tick_00112
|
||||
;source-doc/keyboard/kyb_driver.c:118: if (report_diff()) {
|
||||
ld b,$06
|
||||
l_usb_kyb_tick_00103:
|
||||
;source-doc/keyboard/kyb_driver.c:119: uint8_t i = 6;
|
||||
ld a, b
|
||||
dec a
|
||||
push bc
|
||||
call _keyboard_buf_put
|
||||
pop bc
|
||||
;source-doc/keyboard/kyb_driver.c:120: do {
|
||||
djnz l_usb_kyb_tick_00103
|
||||
;source-doc/keyboard/kyb_driver.c:121: keyboard_buf_put(i - 1);
|
||||
ld de,_previous
|
||||
ld bc,$0008
|
||||
ld hl,_report
|
||||
ldir
|
||||
l_usb_kyb_tick_00112:
|
||||
;source-doc/keyboard/kyb_driver.c:124: }
|
||||
ret
|
||||
;source-doc/keyboard/kyb_driver.c:126: }
|
||||
; ---------------------------------
|
||||
; Function usb_kyb_init
|
||||
; ---------------------------------
|
||||
_usb_kyb_init:
|
||||
;source-doc/keyboard/kyb_driver.c:127:
|
||||
call _get_usb_device_config
|
||||
ex de, hl
|
||||
ld (_keyboard_config), hl
|
||||
;source-doc/keyboard/kyb_driver.c:129: keyboard_config = (device_config_keyboard *)get_usb_device_config(dev_index);
|
||||
ld hl,_keyboard_config + 1
|
||||
ld a, (hl)
|
||||
dec hl
|
||||
or (hl)
|
||||
;source-doc/keyboard/kyb_driver.c:130:
|
||||
ret Z
|
||||
;source-doc/keyboard/kyb_driver.c:132: return;
|
||||
ld a,$01
|
||||
push af
|
||||
inc sp
|
||||
ld hl, (_keyboard_config)
|
||||
call _hid_set_protocol
|
||||
;source-doc/keyboard/kyb_driver.c:133:
|
||||
ld a,$80
|
||||
push af
|
||||
inc sp
|
||||
ld hl, (_keyboard_config)
|
||||
call _hid_set_idle
|
||||
;source-doc/keyboard/kyb_driver.c:134: hid_set_protocol(keyboard_config, 1);
|
||||
ret
|
||||
_caps_lock_engaged:
|
||||
DEFB +$01
|
||||
_keyboard_config:
|
||||
DEFW +$0000
|
||||
_buffer:
|
||||
DEFB +$00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
_write_index:
|
||||
DEFB +$00
|
||||
_read_index:
|
||||
DEFB +$00
|
||||
_report:
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
_previous:
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
39
Source/HBIOS/ch376-native/print.asm
Normal file
39
Source/HBIOS/ch376-native/print.asm
Normal file
@@ -0,0 +1,39 @@
|
||||
|
||||
; HL = unsigned 16 bit number to write out
|
||||
; call CHPUT to write a single ascii character (in A)
|
||||
_print_uint16:
|
||||
ld a, h
|
||||
or l
|
||||
jr z, print_zero
|
||||
ld e, 0
|
||||
ld bc, -10000
|
||||
call num1
|
||||
ld bc, -1000
|
||||
call num1
|
||||
ld bc, -100
|
||||
call num1
|
||||
ld c, -10
|
||||
call num1
|
||||
ld c, b
|
||||
|
||||
num1: ld a, '0'-1
|
||||
num2: inc a
|
||||
add hl, bc
|
||||
jr c, num2
|
||||
sbc hl, bc
|
||||
|
||||
cp '0'
|
||||
jr nz, num3
|
||||
|
||||
ld a, e
|
||||
cp 1
|
||||
ret nz
|
||||
ld a, '0'
|
||||
|
||||
num3:
|
||||
ld e, 1
|
||||
jp COUT
|
||||
|
||||
print_zero
|
||||
ld a, '0'
|
||||
jp COUT
|
||||
125
Source/HBIOS/ch376-native/readme.md
Normal file
125
Source/HBIOS/ch376-native/readme.md
Normal file
@@ -0,0 +1,125 @@
|
||||
# Native CH376 Driver
|
||||
|
||||
The native CH376 HBIOS driver is written in c, using z88dk's zcc compiler.
|
||||
|
||||
The build process, is a 3 stage process.
|
||||
|
||||
1. Compile all the C code to assembly files (.asm)
|
||||
2. Translate the produced .asm files syntax to compile with the RomWBW assembler (.s)
|
||||
3. Assemble the driver .s files as per the standard HBIOS build process
|
||||
|
||||
The original C code and produced/translated .s files are all committed units in the repo. But it is
|
||||
expected, that only the c files are to be modified/updated.
|
||||
|
||||
The .s files are checked in, so builders do not require the C compiler tool chain (z88dk) to be installed.
|
||||
|
||||
The c compiling/translating process is only supported on linux, as the script to translate the .asm files
|
||||
to .s files is a linux bash script. (Although the script can be easily run within Windows's Sub-system for linux)
|
||||
|
||||
## Compiling the C code
|
||||
|
||||
> Requires linux with docker installed.
|
||||
|
||||
> The C code only needs to be recompiled if and when you change any of the `.c` source files.
|
||||
|
||||
To compile the `.c` code to generate updated `.s` files:
|
||||
|
||||
Within the `Source/HBIOS/ch376-native` directory:
|
||||
|
||||
```
|
||||
make
|
||||
```
|
||||
|
||||
The make script will search for z88dk's `zcc` compiler, if not found, will attempt to use a docker wrapper.
|
||||
It will not work if z88dk or docker is not installed.
|
||||
|
||||
## USB Native Driver systems
|
||||
|
||||
The default builds of RomWBW do not enable the CH376 native usb drivers. These drivers take a reasonable chunk of ROM space. As such you
|
||||
will need to build a new HBIOS image customised for your platform. Please familiarise yourself with the HBIOS/RomWBW build and configuration process.
|
||||
|
||||
The usb driver is divided into a few sub-system, which can be individually enabled within the standard HBIOS config files.
|
||||
|
||||
For activating the full native USB support, the non native CH365 drivers need to be disabled and the relevant `CHNATIVE` drivers enabled
|
||||
|
||||
Example:
|
||||
|
||||
```
|
||||
CHENABLE .SET FALSE ; CH: ENABLE CH375/376 USB SUPPORT
|
||||
CH0USBENABLE .SET FALSE ; CH375: ENABLE CH375 USB DRIVER
|
||||
CH1USBENABLE .SET FALSE ; CH376: ENABLE CH376 USB DRIVER
|
||||
CHNATIVEENABLE .SET TRUE ; CH376: ENABLE CH376 NATIVE USB DRIVER
|
||||
CHSCSIENABLE .SET TRUE ; CH376: ENABLE CH376 NATIVE MASS STORAGE DEVICES (REQUIRES CHNATIVEENABLE)
|
||||
CHUFIENABLE .SET TRUE ; CH376: ENABLE CH376 NATIVE UFI FLOPPY DISK DEVICES (REQUIRES CHNATIVEENABLE)
|
||||
CHNATIVEEZ80 .SET FALSE ; CH376: DELEGATE USB DRIVERS TO EZ80'S FIRMWARE
|
||||
CHNATIVEFORCE .SET TRUE ; CH376: DISABLE AUTO-DETECTION OF MODULE - ASSUME ITS INSTALLED
|
||||
```
|
||||
|
||||
As the USB driver is a fairly large, you may need to disable other HBIOS drivers in your configuration. As such, it is
|
||||
recommend to only enable drivers for your platform's hardware configuration - for example, enable only the serial driver
|
||||
required for your system.
|
||||
|
||||
```
|
||||
DUARTENABLE .SET FALSE ; DUART: ENABLE 2681/2692 SERIAL DRIVER (DUART.ASM)
|
||||
UARTENABLE .SET FALSE ; 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)
|
||||
```
|
||||
|
||||
You may also need to disable other storage drivers:
|
||||
|
||||
```
|
||||
FDENABLE .SET FALSE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM)
|
||||
IDEENABLE .SET FALSE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM)
|
||||
PPIDEENABLE .SET FALSE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
|
||||
```
|
||||
|
||||
### base-drv `CHNATIVEENABLE`
|
||||
|
||||
The `base-drv` system contains the core code to discover, enumerate, and communicate with USB devices.
|
||||
|
||||
It also includes the driver code to enumerate and operating USB devices through a USB hub.
|
||||
|
||||
### scsi-drv `CHSCSIENABLE`
|
||||
|
||||
The `scsi-drv` system can be enabled with the HBIOS config `CHSCSIENABLE`
|
||||
|
||||
When activated, access to most USB mass storage devices (thumb drives, magnetic usb drives) is enabled.
|
||||
|
||||
### ufi-drv `CHUFIENABLE`
|
||||
|
||||
The `ufi-drv` system can be enabled with the HBIOS config `CHUFIENABLE`
|
||||
|
||||
When activated, access to 3.5" Floppy USB devices will be enabled.
|
||||
|
||||
### keyboard `TMSMODE_MSXUKY`
|
||||
|
||||
The `keyboard` system can be enabled with the inferred config entry `USBKYBENABLE`
|
||||
|
||||
This config item is not to be directly set, but is activated via the TMS keyboard driver
|
||||
|
||||
Example configuration, combined with the TMS VDP module driver.
|
||||
|
||||
```
|
||||
TMSENABLE .SET TRUE ; TMS: ENABLE TMS9918 VIDEO/KBD DRIVER (TMS.ASM)
|
||||
TMSMODE .SET TMSMODE_MSXUKY ; TMS: DRIVER MODE: TMSMODE_[SCG|N8|MSX|MSXKBD|MSXMKY|MBC|COLECO|DUO|NABU|MSXUKY]
|
||||
TMS80COLS .SET FALSE ; TMS: ENABLE 80 COLUMN SCREEN, REQUIRES V9958
|
||||
TMSTIMENABLE .SET TRUE ; TMS: ENABLE TIMER INTERRUPTS (REQUIRES IM1)
|
||||
```
|
||||
|
||||
When activated, usb keyboards can be used as input devices.
|
||||
|
||||
### Force activation `CHNATIVEFORCE`
|
||||
|
||||
The CH376 module, during a cold power on boot, can take many seconds before it will
|
||||
respond to the CPU. As such, the CPU may fail to detect the presence of the module.
|
||||
|
||||
A manual reset (without power cycling) generally enables detection. The config entry
|
||||
`CHNATIVEFORCE` can be enabled to force the CPU to always wait for the module to come online.
|
||||
|
||||
|
||||
### eZ80 support `CHNATIVEEZ80`
|
||||
|
||||
If you have the eZ80 CPU installed with onboard USB firmware support, you
|
||||
can gain performance by delegating HBIOS to the firmware implementation. To enable
|
||||
delegation, enable the config entry `CHNATIVEEZ80`
|
||||
8
Source/HBIOS/ch376-native/scsi-drv.s
Normal file
8
Source/HBIOS/ch376-native/scsi-drv.s
Normal file
@@ -0,0 +1,8 @@
|
||||
; Generated File -- not to be modify directly
|
||||
#IF (!CHNATIVEEZ80)
|
||||
#include "ch376-native/scsi-drv/class_scsi.c.s"
|
||||
#ENDIF
|
||||
#IF (!CHNATIVEEZ80)
|
||||
#include "ch376-native/scsi-drv/scsi_driver.c.s"
|
||||
#ENDIF
|
||||
#include "ch376-native/scsi-drv/scsi-init.c.s"
|
||||
1
Source/HBIOS/ch376-native/scsi-drv/.gitignore
vendored
Normal file
1
Source/HBIOS/ch376-native/scsi-drv/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.asm
|
||||
446
Source/HBIOS/ch376-native/scsi-drv/class_scsi.c.s
Normal file
446
Source/HBIOS/ch376-native/scsi-drv/class_scsi.c.s
Normal file
@@ -0,0 +1,446 @@
|
||||
;
|
||||
; Generated from source-doc/scsi-drv/class_scsi.c.asm -- not to be modify directly
|
||||
;
|
||||
;
|
||||
;--------------------------------------------------------
|
||||
; File Created by SDCC : free open source ISO C Compiler
|
||||
; Version 4.5.0 #15248 (Linux)
|
||||
;--------------------------------------------------------
|
||||
; Processed by Z88DK
|
||||
;--------------------------------------------------------
|
||||
|
||||
|
||||
;--------------------------------------------------------
|
||||
; Public variables in this module
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; Externals used
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; special function registers
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; ram data
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; ram data
|
||||
;--------------------------------------------------------
|
||||
|
||||
#IF 0
|
||||
|
||||
; .area _INITIALIZED removed by z88dk
|
||||
|
||||
_scsi_cmd_blk_wrap:
|
||||
DEFS 15
|
||||
_next_tag:
|
||||
DEFS 2
|
||||
|
||||
#ENDIF
|
||||
|
||||
;--------------------------------------------------------
|
||||
; absolute external ram data
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; global & static initialisations
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; Home
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; code
|
||||
;--------------------------------------------------------
|
||||
;source-doc/scsi-drv/class_scsi.c:11: usb_error do_scsi_cmd(device_config_storage *const dev,
|
||||
; ---------------------------------
|
||||
; Function do_scsi_cmd
|
||||
; ---------------------------------
|
||||
_do_scsi_cmd:
|
||||
push ix
|
||||
ld ix,0
|
||||
add ix,sp
|
||||
ld hl, -21
|
||||
add hl, sp
|
||||
ld sp, hl
|
||||
;source-doc/scsi-drv/class_scsi.c:17: _scsi_command_status_wrapper csw = {{{0}}};
|
||||
ld a,$00
|
||||
ld (ix-21),a
|
||||
ld (ix-20),a
|
||||
ld (ix-19),a
|
||||
ld (ix-18),a
|
||||
xor a
|
||||
ld (ix-17),a
|
||||
ld (ix-16),a
|
||||
xor a
|
||||
ld (ix-15),a
|
||||
ld (ix-14),a
|
||||
ld a,$00
|
||||
ld (ix-13),a
|
||||
ld (ix-12),a
|
||||
ld (ix-11),a
|
||||
ld (ix-10),a
|
||||
ld (ix-9),$00
|
||||
;source-doc/scsi-drv/class_scsi.c:19: cbw->dCBWTag[0] = next_tag++;
|
||||
ld c,(ix+6)
|
||||
ld b,(ix+7)
|
||||
ld hl,$0004
|
||||
add hl, bc
|
||||
ld (ix-8),l
|
||||
ld (ix-7),h
|
||||
ld a, (_next_tag)
|
||||
ld e, a
|
||||
ld hl,_next_tag + 1
|
||||
ld d, (hl)
|
||||
ld hl, (_next_tag)
|
||||
inc hl
|
||||
ld (_next_tag), hl
|
||||
ld l,(ix-8)
|
||||
ld h,(ix-7)
|
||||
ld (hl), e
|
||||
inc hl
|
||||
ld (hl), d
|
||||
;source-doc/scsi-drv/class_scsi.c:21: if (!send)
|
||||
bit 0,(ix+10)
|
||||
jr NZ,l_do_scsi_cmd_00102
|
||||
;source-doc/scsi-drv/class_scsi.c:22: cbw->bmCBWFlags = $80;
|
||||
ld hl,$000c
|
||||
add hl, bc
|
||||
ld (hl),$80
|
||||
l_do_scsi_cmd_00102:
|
||||
;source-doc/scsi-drv/class_scsi.c:24: critical_begin();
|
||||
push bc
|
||||
call _critical_begin
|
||||
pop bc
|
||||
;source-doc/scsi-drv/class_scsi.c:27: &dev->endpoints[ENDPOINT_BULK_OUT]));
|
||||
ld a,(ix+4)
|
||||
ld (ix-6),a
|
||||
ld e, a
|
||||
ld a,(ix+5)
|
||||
ld (ix-5),a
|
||||
ld d,a
|
||||
inc de
|
||||
inc de
|
||||
inc de
|
||||
ld a,(ix-6)
|
||||
ld (ix-4),a
|
||||
ld l, a
|
||||
ld a,(ix-5)
|
||||
ld (ix-3),a
|
||||
ld h,a
|
||||
ld a, (hl)
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
and $0f
|
||||
ld l,(ix+6)
|
||||
ld h,(ix+7)
|
||||
push bc
|
||||
push de
|
||||
push de
|
||||
push af
|
||||
inc sp
|
||||
push hl
|
||||
ld hl,$001f
|
||||
ex (sp), hl
|
||||
push hl
|
||||
call _usb_data_out_transfer
|
||||
pop af
|
||||
pop af
|
||||
pop af
|
||||
inc sp
|
||||
pop de
|
||||
pop bc
|
||||
ld a, l
|
||||
or a
|
||||
jp NZ, l_do_scsi_cmd_00120
|
||||
;source-doc/scsi-drv/class_scsi.c:29: if (cbw->dCBWDataTransferLength != 0) {
|
||||
ld hl,8
|
||||
add hl, bc
|
||||
ld c, (hl)
|
||||
inc hl
|
||||
ld b, (hl)
|
||||
inc hl
|
||||
inc hl
|
||||
ld a, (hl)
|
||||
dec hl
|
||||
ld l, (hl)
|
||||
or l
|
||||
or b
|
||||
or c
|
||||
jr Z,l_do_scsi_cmd_00113
|
||||
;source-doc/scsi-drv/class_scsi.c:32: &dev->endpoints[ENDPOINT_BULK_IN]));
|
||||
ld (ix-2),c
|
||||
ld (ix-1),b
|
||||
ld c,(ix+8)
|
||||
ld b,(ix+9)
|
||||
;source-doc/scsi-drv/class_scsi.c:30: if (!send) {
|
||||
bit 0,(ix+10)
|
||||
jr NZ,l_do_scsi_cmd_00110
|
||||
;source-doc/scsi-drv/class_scsi.c:32: &dev->endpoints[ENDPOINT_BULK_IN]));
|
||||
ld a,(ix-6)
|
||||
add a,$06
|
||||
ld e, a
|
||||
ld a,(ix-5)
|
||||
adc a,$00
|
||||
ld d, a
|
||||
ld l,(ix-4)
|
||||
ld h,(ix-3)
|
||||
ld a, (hl)
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
and $0f
|
||||
push de
|
||||
push af
|
||||
inc sp
|
||||
ld l,(ix-2)
|
||||
ld h,(ix-1)
|
||||
push hl
|
||||
push bc
|
||||
call _usb_data_in_transfer
|
||||
pop af
|
||||
pop af
|
||||
pop af
|
||||
inc sp
|
||||
ld a, l
|
||||
or a
|
||||
jr Z,l_do_scsi_cmd_00113
|
||||
jr l_do_scsi_cmd_00120
|
||||
l_do_scsi_cmd_00110:
|
||||
;source-doc/scsi-drv/class_scsi.c:36: &dev->endpoints[ENDPOINT_BULK_OUT]));
|
||||
ld l,(ix-4)
|
||||
ld h,(ix-3)
|
||||
ld a, (hl)
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
and $0f
|
||||
push de
|
||||
push af
|
||||
inc sp
|
||||
ld l,(ix-2)
|
||||
ld h,(ix-1)
|
||||
push hl
|
||||
push bc
|
||||
call _usb_data_out_transfer
|
||||
pop af
|
||||
pop af
|
||||
pop af
|
||||
inc sp
|
||||
ld a, l
|
||||
or a
|
||||
jr NZ,l_do_scsi_cmd_00120
|
||||
l_do_scsi_cmd_00113:
|
||||
;source-doc/scsi-drv/class_scsi.c:41: usb_data_in_transfer((uint8_t *)&csw, sizeof(_scsi_command_status_wrapper), dev->address, &dev->endpoints[ENDPOINT_BULK_IN]));
|
||||
ld a,(ix-6)
|
||||
add a,$06
|
||||
ld c, a
|
||||
ld a,(ix-5)
|
||||
adc a,$00
|
||||
ld b, a
|
||||
ld l,(ix-4)
|
||||
ld h,(ix-3)
|
||||
ld a, (hl)
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
and $0f
|
||||
ld d, a
|
||||
push bc
|
||||
push de
|
||||
inc sp
|
||||
ld hl,$000d
|
||||
push hl
|
||||
ld hl,5
|
||||
add hl, sp
|
||||
push hl
|
||||
call _usb_data_in_transfer
|
||||
pop af
|
||||
pop af
|
||||
pop af
|
||||
inc sp
|
||||
ld a, l
|
||||
or a
|
||||
jr NZ,l_do_scsi_cmd_00120
|
||||
;source-doc/scsi-drv/class_scsi.c:43: if (csw.bCSWStatus != 0 || csw.dCSWTag[0] != cbw->dCBWTag[0])
|
||||
ld a,(ix-9)
|
||||
or a
|
||||
jr NZ,l_do_scsi_cmd_00116
|
||||
ld c,(ix-17)
|
||||
ld b,(ix-16)
|
||||
ld l,(ix-8)
|
||||
ld h,(ix-7)
|
||||
ld a, (hl)
|
||||
inc hl
|
||||
ld h, (hl)
|
||||
ld l, a
|
||||
xor a
|
||||
sbc hl,bc
|
||||
jr Z,l_do_scsi_cmd_00117
|
||||
l_do_scsi_cmd_00116:
|
||||
;source-doc/scsi-drv/class_scsi.c:44: result = USB_ERR_FAIL;
|
||||
ld l,$0e
|
||||
jr l_do_scsi_cmd_00120
|
||||
l_do_scsi_cmd_00117:
|
||||
;source-doc/scsi-drv/class_scsi.c:46: result = USB_ERR_OK;
|
||||
ld l,$00
|
||||
;source-doc/scsi-drv/class_scsi.c:48: done:
|
||||
l_do_scsi_cmd_00120:
|
||||
;source-doc/scsi-drv/class_scsi.c:49: critical_end();
|
||||
push hl
|
||||
call _critical_end
|
||||
pop hl
|
||||
;source-doc/scsi-drv/class_scsi.c:50: return result;
|
||||
;source-doc/scsi-drv/class_scsi.c:51: }
|
||||
ld sp, ix
|
||||
pop ix
|
||||
ret
|
||||
;source-doc/scsi-drv/class_scsi.c:53: usb_error scsi_test(device_config_storage *const dev) {
|
||||
; ---------------------------------
|
||||
; Function scsi_test
|
||||
; ---------------------------------
|
||||
_scsi_test:
|
||||
push ix
|
||||
ld ix,0
|
||||
add ix,sp
|
||||
ld hl, -27
|
||||
add hl, sp
|
||||
ld sp, hl
|
||||
;source-doc/scsi-drv/class_scsi.c:55: cbw_scsi.cbw = scsi_cmd_blk_wrap;
|
||||
ld hl,0
|
||||
add hl, sp
|
||||
ld e,l
|
||||
ld d,h
|
||||
push hl
|
||||
ld bc,$000f
|
||||
ld hl,_scsi_cmd_blk_wrap
|
||||
ldir
|
||||
;source-doc/scsi-drv/class_scsi.c:56: memset(&cbw_scsi.test, 0, sizeof(_scsi_packet_test));
|
||||
ld hl,17
|
||||
add hl, sp
|
||||
ld b,$06
|
||||
l_scsi_test_00103:
|
||||
xor a
|
||||
ld (hl), a
|
||||
inc hl
|
||||
ld (hl), a
|
||||
inc hl
|
||||
djnz l_scsi_test_00103
|
||||
pop bc
|
||||
;source-doc/scsi-drv/class_scsi.c:58: cbw_scsi.cbw.bCBWLUN = 0;
|
||||
ld (ix-14),$00
|
||||
;source-doc/scsi-drv/class_scsi.c:59: cbw_scsi.cbw.bCBWCBLength = sizeof(_scsi_packet_test);
|
||||
ld (ix-13),$0c
|
||||
;source-doc/scsi-drv/class_scsi.c:60: cbw_scsi.cbw.dCBWDataTransferLength = 0;
|
||||
ld hl,$0008
|
||||
add hl, bc
|
||||
xor a
|
||||
ld (hl), a
|
||||
inc hl
|
||||
ld (hl), a
|
||||
inc hl
|
||||
ld (hl), a
|
||||
inc hl
|
||||
ld (hl), a
|
||||
;source-doc/scsi-drv/class_scsi.c:62: return do_scsi_cmd(dev, &cbw_scsi.cbw, 0, false);
|
||||
xor a
|
||||
push af
|
||||
inc sp
|
||||
ld hl,$0000
|
||||
push hl
|
||||
push bc
|
||||
ld l,(ix+4)
|
||||
ld h,(ix+5)
|
||||
push hl
|
||||
call _do_scsi_cmd
|
||||
;source-doc/scsi-drv/class_scsi.c:63: }
|
||||
ld sp,ix
|
||||
pop ix
|
||||
ret
|
||||
;source-doc/scsi-drv/class_scsi.c:67: usb_error scsi_request_sense(device_config_storage *const dev, scsi_sense_result *const sens_result) {
|
||||
; ---------------------------------
|
||||
; Function scsi_request_sense
|
||||
; ---------------------------------
|
||||
_scsi_request_sense:
|
||||
push ix
|
||||
ld ix,0
|
||||
add ix,sp
|
||||
ld hl, -27
|
||||
add hl, sp
|
||||
ld sp, hl
|
||||
;source-doc/scsi-drv/class_scsi.c:69: cbw_scsi.cbw = scsi_cmd_blk_wrap;
|
||||
ld hl,0
|
||||
add hl, sp
|
||||
ld e,l
|
||||
ld d,h
|
||||
push hl
|
||||
ld bc,$000f
|
||||
ld hl,_scsi_cmd_blk_wrap
|
||||
ldir
|
||||
;source-doc/scsi-drv/class_scsi.c:70: cbw_scsi.request_sense = scsi_pckt_req_sense;
|
||||
ld hl,17
|
||||
add hl, sp
|
||||
ex de, hl
|
||||
ld bc,$000c
|
||||
ld hl,_scsi_pckt_req_sense
|
||||
ldir
|
||||
pop bc
|
||||
;source-doc/scsi-drv/class_scsi.c:72: cbw_scsi.cbw.bCBWLUN = 0;
|
||||
ld (ix-14),$00
|
||||
;source-doc/scsi-drv/class_scsi.c:73: cbw_scsi.cbw.bCBWCBLength = sizeof(_scsi_packet_request_sense);
|
||||
ld (ix-13),$0c
|
||||
;source-doc/scsi-drv/class_scsi.c:74: cbw_scsi.cbw.dCBWDataTransferLength = sizeof(scsi_sense_result);
|
||||
ld hl,$0008
|
||||
add hl, bc
|
||||
ld (hl),$12
|
||||
inc hl
|
||||
xor a
|
||||
ld (hl), a
|
||||
inc hl
|
||||
ld (hl), a
|
||||
inc hl
|
||||
ld (hl), a
|
||||
;source-doc/scsi-drv/class_scsi.c:76: return do_scsi_cmd(dev, &cbw_scsi.cbw, sens_result, false);
|
||||
ld e,(ix+6)
|
||||
ld d,(ix+7)
|
||||
xor a
|
||||
push af
|
||||
inc sp
|
||||
push de
|
||||
push bc
|
||||
ld l,(ix+4)
|
||||
ld h,(ix+5)
|
||||
push hl
|
||||
call _do_scsi_cmd
|
||||
;source-doc/scsi-drv/class_scsi.c:77: }
|
||||
ld sp,ix
|
||||
pop ix
|
||||
ret
|
||||
_scsi_pckt_req_sense:
|
||||
DEFB +$03
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$12
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
_scsi_cmd_blk_wrap:
|
||||
DEFB +$55
|
||||
DEFB +$53
|
||||
DEFB +$42
|
||||
DEFB +$43
|
||||
DEFW +$0000
|
||||
DEFW +$0000
|
||||
DEFB +$00,$00, +$00, +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
_next_tag:
|
||||
DEFW +$0000
|
||||
148
Source/HBIOS/ch376-native/scsi-drv/scsi-init.c.s
Normal file
148
Source/HBIOS/ch376-native/scsi-drv/scsi-init.c.s
Normal file
@@ -0,0 +1,148 @@
|
||||
;
|
||||
; Generated from source-doc/scsi-drv/scsi-init.c.asm -- not to be modify directly
|
||||
;
|
||||
;
|
||||
;--------------------------------------------------------
|
||||
; File Created by SDCC : free open source ISO C Compiler
|
||||
; Version 4.5.0 #15248 (Linux)
|
||||
;--------------------------------------------------------
|
||||
; Processed by Z88DK
|
||||
;--------------------------------------------------------
|
||||
|
||||
|
||||
;--------------------------------------------------------
|
||||
; Public variables in this module
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; Externals used
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; special function registers
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; ram data
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; ram data
|
||||
;--------------------------------------------------------
|
||||
|
||||
#IF 0
|
||||
|
||||
; .area _INITIALIZED removed by z88dk
|
||||
|
||||
|
||||
#ENDIF
|
||||
|
||||
;--------------------------------------------------------
|
||||
; absolute external ram data
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; global & static initialisations
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; Home
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; code
|
||||
;--------------------------------------------------------
|
||||
;source-doc/scsi-drv/scsi-init.c:9: void chscsi_init(void) {
|
||||
; ---------------------------------
|
||||
; Function chscsi_init
|
||||
; ---------------------------------
|
||||
_chscsi_init:
|
||||
push ix
|
||||
ld ix,0
|
||||
add ix,sp
|
||||
push af
|
||||
dec sp
|
||||
;source-doc/scsi-drv/scsi-init.c:11: do {
|
||||
ld (ix-1),$01
|
||||
l_chscsi_init_00103:
|
||||
;source-doc/scsi-drv/scsi-init.c:12: usb_device_type t = usb_get_device_type(index);
|
||||
ld a,(ix-1)
|
||||
ld (ix-3),a
|
||||
ld (ix-2),$00
|
||||
pop hl
|
||||
push hl
|
||||
push hl
|
||||
call _usb_get_device_type
|
||||
pop af
|
||||
ld a, l
|
||||
;source-doc/scsi-drv/scsi-init.c:14: if (t == USB_IS_MASS_STORAGE) {
|
||||
sub $02
|
||||
jr NZ,l_chscsi_init_00104
|
||||
;source-doc/scsi-drv/scsi-init.c:15: const uint8_t dev_index = find_storage_dev(); // index == -1 (no more left) should never happen
|
||||
call _find_storage_dev
|
||||
;source-doc/scsi-drv/scsi-init.c:17: hbios_usbstore_devs[dev_index].drive_index = dev_index + 1;
|
||||
ld a, l
|
||||
ld c,$00
|
||||
add a, a
|
||||
rl c
|
||||
add a, +((_hbios_usbstore_devs) & $FF)
|
||||
ld e, a
|
||||
ld a, c
|
||||
adc a, +((_hbios_usbstore_devs) / 256)
|
||||
ld d, a
|
||||
ld c, e
|
||||
ld b, d
|
||||
ld a, l
|
||||
inc a
|
||||
ld (bc), a
|
||||
;source-doc/scsi-drv/scsi-init.c:18: hbios_usbstore_devs[dev_index].usb_device = index;
|
||||
ld c, e
|
||||
ld b, d
|
||||
inc bc
|
||||
ld a,(ix-1)
|
||||
ld (bc), a
|
||||
;source-doc/scsi-drv/scsi-init.c:20: print_string("\r\nUSB: MASS STORAGE @ $");
|
||||
push hl
|
||||
push de
|
||||
ld hl,scsi_init_str_0
|
||||
call _print_string
|
||||
;source-doc/scsi-drv/scsi-init.c:21: print_uint16(index);
|
||||
ld l,(ix-3)
|
||||
ld h,$00
|
||||
call _print_uint16
|
||||
;source-doc/scsi-drv/scsi-init.c:22: print_string(":$");
|
||||
ld hl,scsi_init_str_1
|
||||
call _print_string
|
||||
pop de
|
||||
pop hl
|
||||
;source-doc/scsi-drv/scsi-init.c:23: print_uint16(dev_index);
|
||||
ld h,$00
|
||||
push de
|
||||
call _print_uint16
|
||||
;source-doc/scsi-drv/scsi-init.c:24: print_string(" $");
|
||||
ld hl,scsi_init_str_2
|
||||
call _print_string
|
||||
;source-doc/scsi-drv/scsi-init.c:25: usb_scsi_init(index);
|
||||
ld l,(ix-3)
|
||||
ld h,$00
|
||||
push hl
|
||||
call _usb_scsi_init
|
||||
pop af
|
||||
pop de
|
||||
;source-doc/scsi-drv/scsi-init.c:26: dio_add_entry(ch_scsi_fntbl, &hbios_usbstore_devs[dev_index]);
|
||||
ld hl,_ch_scsi_fntbl
|
||||
call _dio_add_entry
|
||||
l_chscsi_init_00104:
|
||||
;source-doc/scsi-drv/scsi-init.c:29: } while (++index != MAX_NUMBER_OF_DEVICES + 1);
|
||||
inc (ix-1)
|
||||
ld a,(ix-1)
|
||||
sub $07
|
||||
jr NZ,l_chscsi_init_00103
|
||||
;source-doc/scsi-drv/scsi-init.c:30: }
|
||||
ld sp, ix
|
||||
pop ix
|
||||
ret
|
||||
scsi_init_str_0:
|
||||
DEFB $0d
|
||||
DEFB $0a
|
||||
DEFM "USB: MASS STORAGE @ $"
|
||||
DEFB $00
|
||||
scsi_init_str_1:
|
||||
DEFM ":$"
|
||||
DEFB $00
|
||||
scsi_init_str_2:
|
||||
DEFM " $"
|
||||
DEFB $00
|
||||
470
Source/HBIOS/ch376-native/scsi-drv/scsi_driver.c.s
Normal file
470
Source/HBIOS/ch376-native/scsi-drv/scsi_driver.c.s
Normal file
@@ -0,0 +1,470 @@
|
||||
;
|
||||
; Generated from source-doc/scsi-drv/scsi_driver.c.asm -- not to be modify directly
|
||||
;
|
||||
;
|
||||
;--------------------------------------------------------
|
||||
; File Created by SDCC : free open source ISO C Compiler
|
||||
; Version 4.5.0 #15248 (Linux)
|
||||
;--------------------------------------------------------
|
||||
; Processed by Z88DK
|
||||
;--------------------------------------------------------
|
||||
|
||||
|
||||
;--------------------------------------------------------
|
||||
; Public variables in this module
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; Externals used
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; special function registers
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; ram data
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; ram data
|
||||
;--------------------------------------------------------
|
||||
|
||||
#IF 0
|
||||
|
||||
; .area _INITIALIZED removed by z88dk
|
||||
|
||||
_scsi_pkt_read_cap:
|
||||
DEFS 12
|
||||
_cbw:
|
||||
DEFS 27
|
||||
|
||||
#ENDIF
|
||||
|
||||
;--------------------------------------------------------
|
||||
; absolute external ram data
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; global & static initialisations
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; Home
|
||||
;--------------------------------------------------------
|
||||
;--------------------------------------------------------
|
||||
; code
|
||||
;--------------------------------------------------------
|
||||
;source-doc/scsi-drv/scsi_driver.c:8: usb_error usb_scsi_init(const uint16_t dev_index) {
|
||||
; ---------------------------------
|
||||
; Function usb_scsi_init
|
||||
; ---------------------------------
|
||||
_usb_scsi_init:
|
||||
push ix
|
||||
ld ix,0
|
||||
add ix,sp
|
||||
ld hl, -18
|
||||
add hl, sp
|
||||
ld sp, hl
|
||||
;source-doc/scsi-drv/scsi_driver.c:11: device_config_storage *const dev = (device_config_storage *)get_usb_device_config(dev_index);
|
||||
ld a,(ix+4)
|
||||
call _get_usb_device_config
|
||||
;source-doc/scsi-drv/scsi_driver.c:16: critical_begin();
|
||||
push de
|
||||
call _critical_begin
|
||||
pop de
|
||||
;source-doc/scsi-drv/scsi_driver.c:17: while ((result = scsi_test(dev)) && --counter > 0)
|
||||
ld c,$03
|
||||
l_usb_scsi_init_00102:
|
||||
push bc
|
||||
push de
|
||||
push de
|
||||
call _scsi_test
|
||||
pop af
|
||||
ld a, l
|
||||
pop de
|
||||
pop bc
|
||||
ld l, a
|
||||
or a
|
||||
jr Z,l_usb_scsi_init_00104
|
||||
dec c
|
||||
jr Z,l_usb_scsi_init_00104
|
||||
;source-doc/scsi-drv/scsi_driver.c:18: scsi_request_sense(dev, &response);
|
||||
push bc
|
||||
push de
|
||||
ld hl,4
|
||||
add hl, sp
|
||||
push hl
|
||||
push de
|
||||
call _scsi_request_sense
|
||||
pop af
|
||||
pop af
|
||||
pop de
|
||||
pop bc
|
||||
jr l_usb_scsi_init_00102
|
||||
l_usb_scsi_init_00104:
|
||||
;source-doc/scsi-drv/scsi_driver.c:19: critical_end();
|
||||
push hl
|
||||
call _critical_end
|
||||
pop hl
|
||||
;source-doc/scsi-drv/scsi_driver.c:21: return result;
|
||||
;source-doc/scsi-drv/scsi_driver.c:22: }
|
||||
ld sp, ix
|
||||
pop ix
|
||||
ret
|
||||
;source-doc/scsi-drv/scsi_driver.c:26: usb_error usb_scsi_read_capacity(const uint16_t dev_index, scsi_read_capacity_result *cap_result) {
|
||||
; ---------------------------------
|
||||
; Function usb_scsi_read_capacity
|
||||
; ---------------------------------
|
||||
_usb_scsi_read_capacity:
|
||||
push ix
|
||||
ld ix,0
|
||||
add ix,sp
|
||||
ld hl, -27
|
||||
add hl, sp
|
||||
ld sp, hl
|
||||
;source-doc/scsi-drv/scsi_driver.c:27: device_config_storage *const dev = (device_config_storage *)get_usb_device_config(dev_index);
|
||||
ld a,(ix+4)
|
||||
call _get_usb_device_config
|
||||
;source-doc/scsi-drv/scsi_driver.c:30: cbw_scsi.cbw = scsi_cmd_blk_wrap;
|
||||
push de
|
||||
ld hl,2
|
||||
add hl, sp
|
||||
ex de, hl
|
||||
ld bc,$000f
|
||||
ld hl,_scsi_cmd_blk_wrap
|
||||
ldir
|
||||
pop de
|
||||
;source-doc/scsi-drv/scsi_driver.c:31: cbw_scsi.read_capacity = scsi_pkt_read_cap;
|
||||
push de
|
||||
ld hl,17
|
||||
add hl, sp
|
||||
ex de, hl
|
||||
ld bc,$000c
|
||||
ld hl,_scsi_pkt_read_cap
|
||||
ldir
|
||||
pop de
|
||||
;source-doc/scsi-drv/scsi_driver.c:33: cbw_scsi.cbw.bCBWLUN = 0;
|
||||
ld (ix-14),$00
|
||||
;source-doc/scsi-drv/scsi_driver.c:34: cbw_scsi.cbw.bCBWCBLength = sizeof(_scsi_read_capacity);
|
||||
ld (ix-13),$0c
|
||||
;source-doc/scsi-drv/scsi_driver.c:35: cbw_scsi.cbw.dCBWDataTransferLength = sizeof(scsi_read_capacity_result);
|
||||
ld (ix-19),$08
|
||||
xor a
|
||||
ld (ix-18),a
|
||||
ld (ix-17),a
|
||||
ld (ix-16),a
|
||||
;source-doc/scsi-drv/scsi_driver.c:37: return do_scsi_cmd(dev, &cbw_scsi.cbw, cap_result, false);
|
||||
ld c,(ix+6)
|
||||
ld b,(ix+7)
|
||||
xor a
|
||||
push af
|
||||
inc sp
|
||||
push bc
|
||||
ld hl,3
|
||||
add hl, sp
|
||||
push hl
|
||||
push de
|
||||
call _do_scsi_cmd
|
||||
pop af
|
||||
pop af
|
||||
pop af
|
||||
inc sp
|
||||
;source-doc/scsi-drv/scsi_driver.c:38: }
|
||||
ld sp, ix
|
||||
pop ix
|
||||
ret
|
||||
;source-doc/scsi-drv/scsi_driver.c:58: usb_error usb_scsi_read(const uint16_t dev_index, uint8_t *const buffer) {
|
||||
; ---------------------------------
|
||||
; Function usb_scsi_read
|
||||
; ---------------------------------
|
||||
_usb_scsi_read:
|
||||
push ix
|
||||
ld ix,0
|
||||
add ix,sp
|
||||
push af
|
||||
;source-doc/scsi-drv/scsi_driver.c:61: device_config_storage *const dev = (device_config_storage *)get_usb_device_config(dev_index);
|
||||
ld a,(ix+4)
|
||||
call _get_usb_device_config
|
||||
pop bc
|
||||
push de
|
||||
;source-doc/scsi-drv/scsi_driver.c:63: memset(&cbw, 0, sizeof(cbw_scsi_read_write));
|
||||
ld de,_cbw
|
||||
ld l, e
|
||||
ld h, d
|
||||
ld b,$0e
|
||||
jr l_usb_scsi_read_00113
|
||||
l_usb_scsi_read_00112:
|
||||
ld (hl),$00
|
||||
inc hl
|
||||
l_usb_scsi_read_00113:
|
||||
ld (hl),$00
|
||||
inc hl
|
||||
djnz l_usb_scsi_read_00112
|
||||
;source-doc/scsi-drv/scsi_driver.c:64: cbw.cbw = scsi_cmd_blk_wrap;
|
||||
ld bc,$000f
|
||||
ld hl,_scsi_cmd_blk_wrap
|
||||
ldir
|
||||
;source-doc/scsi-drv/scsi_driver.c:66: cbw.cbw.bCBWLUN = 0;
|
||||
ld hl,_cbw + 13
|
||||
ld (hl),$00
|
||||
;source-doc/scsi-drv/scsi_driver.c:67: cbw.cbw.bCBWCBLength = sizeof(_scsi_packet_read_write);
|
||||
ld hl,_cbw + 14
|
||||
ld (hl),$0c
|
||||
;source-doc/scsi-drv/scsi_driver.c:68: cbw.cbw.dCBWDataTransferLength = 512;
|
||||
ld hl,$0200
|
||||
ld (_cbw + 8),hl
|
||||
ld h, l
|
||||
ld (_cbw + 8 + 2),hl
|
||||
;source-doc/scsi-drv/scsi_driver.c:70: cbw.scsi_cmd.operation_code = $28; // read operation
|
||||
ld hl,_cbw + 15
|
||||
ld (hl),$28
|
||||
;source-doc/scsi-drv/scsi_driver.c:71: cbw.scsi_cmd.transfer_len[1] = 1;
|
||||
ld hl,_cbw + 23
|
||||
ld (hl),$01
|
||||
;source-doc/scsi-drv/scsi_driver.c:72: cbw.scsi_cmd.lba[0] = dev->current_lba >> 24;
|
||||
pop hl
|
||||
push hl
|
||||
ld de,$000c
|
||||
add hl, de
|
||||
push hl
|
||||
inc hl
|
||||
inc hl
|
||||
inc hl
|
||||
ld a, (hl)
|
||||
ld ((_cbw + 17)),a
|
||||
pop hl
|
||||
;source-doc/scsi-drv/scsi_driver.c:73: cbw.scsi_cmd.lba[1] = dev->current_lba >> 16;
|
||||
push hl
|
||||
inc hl
|
||||
inc hl
|
||||
ld a, (hl)
|
||||
ld ((_cbw + 18)),a
|
||||
pop hl
|
||||
;source-doc/scsi-drv/scsi_driver.c:74: cbw.scsi_cmd.lba[2] = dev->current_lba >> 8;
|
||||
push hl
|
||||
inc hl
|
||||
ld a, (hl)
|
||||
ld ((_cbw + 19)),a
|
||||
pop hl
|
||||
;source-doc/scsi-drv/scsi_driver.c:75: cbw.scsi_cmd.lba[3] = dev->current_lba;
|
||||
ld bc,_cbw + 20
|
||||
ld a, (hl)
|
||||
ld (bc), a
|
||||
;source-doc/scsi-drv/scsi_driver.c:77: result = do_scsi_cmd(dev, &cbw.cbw, buffer, false);
|
||||
ld c,(ix+6)
|
||||
ld b,(ix+7)
|
||||
push hl
|
||||
xor a
|
||||
push af
|
||||
inc sp
|
||||
push bc
|
||||
ld de,_cbw
|
||||
push de
|
||||
ld e,(ix-2)
|
||||
ld d,(ix-1)
|
||||
push de
|
||||
call _do_scsi_cmd
|
||||
pop af
|
||||
pop af
|
||||
pop af
|
||||
inc sp
|
||||
ld a, l
|
||||
pop hl
|
||||
ld (ix-1),a
|
||||
;source-doc/scsi-drv/scsi_driver.c:79: if (result == USB_ERR_OK)
|
||||
or a
|
||||
jr NZ,l_usb_scsi_read_00102
|
||||
;source-doc/scsi-drv/scsi_driver.c:80: dev->current_lba++;
|
||||
ld c,(hl)
|
||||
push hl
|
||||
inc hl
|
||||
ld b, (hl)
|
||||
inc hl
|
||||
ld e, (hl)
|
||||
inc hl
|
||||
ld d, (hl)
|
||||
pop hl
|
||||
inc c
|
||||
jr NZ,l_usb_scsi_read_00114
|
||||
inc b
|
||||
jr NZ,l_usb_scsi_read_00114
|
||||
inc de
|
||||
l_usb_scsi_read_00114:
|
||||
ld (hl), c
|
||||
inc hl
|
||||
ld (hl), b
|
||||
inc hl
|
||||
ld (hl), e
|
||||
inc hl
|
||||
ld (hl), d
|
||||
l_usb_scsi_read_00102:
|
||||
;source-doc/scsi-drv/scsi_driver.c:81: return result;
|
||||
ld l,(ix-1)
|
||||
;source-doc/scsi-drv/scsi_driver.c:82: }
|
||||
ld sp, ix
|
||||
pop ix
|
||||
ret
|
||||
;source-doc/scsi-drv/scsi_driver.c:84: usb_error usb_scsi_write(const uint16_t dev_index, uint8_t *const buffer) {
|
||||
; ---------------------------------
|
||||
; Function usb_scsi_write
|
||||
; ---------------------------------
|
||||
_usb_scsi_write:
|
||||
push ix
|
||||
ld ix,0
|
||||
add ix,sp
|
||||
push af
|
||||
;source-doc/scsi-drv/scsi_driver.c:86: device_config_storage *const dev = (device_config_storage *)get_usb_device_config(dev_index);
|
||||
ld a,(ix+4)
|
||||
call _get_usb_device_config
|
||||
pop bc
|
||||
push de
|
||||
;source-doc/scsi-drv/scsi_driver.c:88: memset(&cbw, 0, sizeof(cbw_scsi_read_write));
|
||||
ld de,_cbw
|
||||
ld l, e
|
||||
ld h, d
|
||||
ld b,$0e
|
||||
jr l_usb_scsi_write_00113
|
||||
l_usb_scsi_write_00112:
|
||||
ld (hl),$00
|
||||
inc hl
|
||||
l_usb_scsi_write_00113:
|
||||
ld (hl),$00
|
||||
inc hl
|
||||
djnz l_usb_scsi_write_00112
|
||||
;source-doc/scsi-drv/scsi_driver.c:89: cbw.cbw = scsi_cmd_blk_wrap;
|
||||
ld bc,$000f
|
||||
ld hl,_scsi_cmd_blk_wrap
|
||||
ldir
|
||||
;source-doc/scsi-drv/scsi_driver.c:91: cbw.cbw.bCBWLUN = 0;
|
||||
ld hl,_cbw + 13
|
||||
ld (hl),$00
|
||||
;source-doc/scsi-drv/scsi_driver.c:92: cbw.cbw.bCBWCBLength = sizeof(_scsi_packet_read_write);
|
||||
ld hl,_cbw + 14
|
||||
ld (hl),$0c
|
||||
;source-doc/scsi-drv/scsi_driver.c:93: cbw.cbw.dCBWDataTransferLength = 512;
|
||||
ld hl,$0200
|
||||
ld (_cbw + 8),hl
|
||||
ld h, l
|
||||
ld (_cbw + 8 + 2),hl
|
||||
;source-doc/scsi-drv/scsi_driver.c:95: cbw.scsi_cmd.operation_code = $2A; // write operation
|
||||
ld hl,_cbw + 15
|
||||
ld (hl),$2a
|
||||
;source-doc/scsi-drv/scsi_driver.c:96: cbw.scsi_cmd.transfer_len[1] = 1;
|
||||
ld hl,_cbw + 23
|
||||
ld (hl),$01
|
||||
;source-doc/scsi-drv/scsi_driver.c:97: cbw.scsi_cmd.lba[0] = dev->current_lba >> 24;
|
||||
pop hl
|
||||
push hl
|
||||
ld de,$000c
|
||||
add hl, de
|
||||
push hl
|
||||
inc hl
|
||||
inc hl
|
||||
inc hl
|
||||
ld a, (hl)
|
||||
ld ((_cbw + 17)),a
|
||||
pop hl
|
||||
;source-doc/scsi-drv/scsi_driver.c:98: cbw.scsi_cmd.lba[1] = dev->current_lba >> 16;
|
||||
push hl
|
||||
inc hl
|
||||
inc hl
|
||||
ld a, (hl)
|
||||
ld ((_cbw + 18)),a
|
||||
pop hl
|
||||
;source-doc/scsi-drv/scsi_driver.c:99: cbw.scsi_cmd.lba[2] = dev->current_lba >> 8;
|
||||
push hl
|
||||
inc hl
|
||||
ld a, (hl)
|
||||
ld ((_cbw + 19)),a
|
||||
pop hl
|
||||
;source-doc/scsi-drv/scsi_driver.c:100: cbw.scsi_cmd.lba[3] = dev->current_lba;
|
||||
ld bc,_cbw + 20
|
||||
ld a, (hl)
|
||||
ld (bc), a
|
||||
;source-doc/scsi-drv/scsi_driver.c:102: result = do_scsi_cmd(dev, &cbw.cbw, buffer, true);
|
||||
ld c,(ix+6)
|
||||
ld b,(ix+7)
|
||||
push hl
|
||||
ld a,$01
|
||||
push af
|
||||
inc sp
|
||||
push bc
|
||||
ld de,_cbw
|
||||
push de
|
||||
ld e,(ix-2)
|
||||
ld d,(ix-1)
|
||||
push de
|
||||
call _do_scsi_cmd
|
||||
pop af
|
||||
pop af
|
||||
pop af
|
||||
inc sp
|
||||
ld a, l
|
||||
pop hl
|
||||
ld (ix-1),a
|
||||
;source-doc/scsi-drv/scsi_driver.c:104: if (result == USB_ERR_OK)
|
||||
or a
|
||||
jr NZ,l_usb_scsi_write_00102
|
||||
;source-doc/scsi-drv/scsi_driver.c:105: dev->current_lba++;
|
||||
ld c,(hl)
|
||||
push hl
|
||||
inc hl
|
||||
ld b, (hl)
|
||||
inc hl
|
||||
ld e, (hl)
|
||||
inc hl
|
||||
ld d, (hl)
|
||||
pop hl
|
||||
inc c
|
||||
jr NZ,l_usb_scsi_write_00114
|
||||
inc b
|
||||
jr NZ,l_usb_scsi_write_00114
|
||||
inc de
|
||||
l_usb_scsi_write_00114:
|
||||
ld (hl), c
|
||||
inc hl
|
||||
ld (hl), b
|
||||
inc hl
|
||||
ld (hl), e
|
||||
inc hl
|
||||
ld (hl), d
|
||||
l_usb_scsi_write_00102:
|
||||
;source-doc/scsi-drv/scsi_driver.c:106: return result;
|
||||
ld l,(ix-1)
|
||||
;source-doc/scsi-drv/scsi_driver.c:107: }
|
||||
ld sp, ix
|
||||
pop ix
|
||||
ret
|
||||
_scsi_pkt_read_cap:
|
||||
DEFB +$25
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
_cbw:
|
||||
DEFB +$00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB +$00,$00, +$00, +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB +$00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB +$00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
DEFB +$00
|
||||
DEFB $00
|
||||
DEFB $00
|
||||
13
Source/HBIOS/ch376-native/source-doc/.clang-format
Normal file
13
Source/HBIOS/ch376-native/source-doc/.clang-format
Normal file
@@ -0,0 +1,13 @@
|
||||
BasedOnStyle: LLVM
|
||||
IndentWidth: 2
|
||||
AlignConsecutiveMacros: true
|
||||
ColumnLimit: 132
|
||||
AlignConsecutiveAssignments: true
|
||||
AlignConsecutiveDeclarations: true
|
||||
AlignEscapedNewlines: true
|
||||
AlignConsecutiveMacros: true
|
||||
AlignEscapedNewlines: Right
|
||||
BinPackArguments: true
|
||||
BinPackParameters: false
|
||||
IncludeBlocks: Preserve
|
||||
SortIncludes: CaseInsensitive
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user