|
|
|
@ -11,50 +11,115 @@ The build process, is a 3 stage 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, to builders to not require the C compiler tool chain (z88dk) to be installed. |
|
|
|
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 also only support on linux, as the script to translate the .asm files |
|
|
|
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 |
|
|
|
|
|
|
|
To compile the c code, to update the .s files: |
|
|
|
> Requires linux with docker installed. |
|
|
|
|
|
|
|
Within the `Source/HBIOS/ch376-native` directly: |
|
|
|
> 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. |
|
|
|
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. |
|
|
|
|
|
|
|
### base-drv |
|
|
|
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 |
|
|
|
``` |
|
|
|
|
|
|
|
The `base-drv` system contains the core code to discover, enumerate, and communicate to USB devices. |
|
|
|
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. |
|
|
|
|
|
|
|
It also includes the driver code for enumerate and operating USB devices on USB hubs. |
|
|
|
``` |
|
|
|
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) |
|
|
|
``` |
|
|
|
|
|
|
|
### scsi-drv |
|
|
|
### 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 |
|
|
|
### 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 |
|
|
|
### 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. |
|
|
|
|
|
|
|
The `keyboard` system can be enabled with the HBIOS config `USBKYBENABLE` |
|
|
|
``` |
|
|
|
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` |
|
|
|
|