mirror of https://github.com/zxdos/zxuno.git
Merge branch 'master' of https://github.com/antoniovillena/zxuno
This commit is contained in:
commit
a18ec1c2c5
41
Makefile
41
Makefile
|
|
@ -33,9 +33,16 @@ UTILS_TARGETS=\
|
|||
|
||||
UTILS_INSTALL_DIR=$(INSTALL_DIR)/BIN
|
||||
|
||||
SOFTWARE_TARGETS=\
|
||||
ESPRST\
|
||||
IWCONFIG
|
||||
|
||||
SOFTWARE_INSTALL_DIR=$(INSTALL_DIR)/BIN
|
||||
|
||||
.PHONY: all
|
||||
all:\
|
||||
install-utils
|
||||
install-utils\
|
||||
install-software
|
||||
@echo 'Done.'
|
||||
|
||||
# utils
|
||||
|
|
@ -61,7 +68,37 @@ clean-utils: | utils
|
|||
uninstall-utils: clean-utils
|
||||
rm -f $(foreach t,$(UTILS_TARGETS),$(UTILS_INSTALL_DIR)/$(t))
|
||||
|
||||
# software
|
||||
|
||||
.PHONY: install-software
|
||||
install-software: $(foreach t,$(SOFTWARE_TARGETS),$(SOFTWARE_INSTALL_DIR)/$(t))
|
||||
|
||||
$(SOFTWARE_INSTALL_DIR)/ESPRST: software/esprst/esprst
|
||||
mv $< $@
|
||||
|
||||
$(SOFTWARE_INSTALL_DIR)/IWCONFIG: software/iwconfig/IWCONFIG
|
||||
mv $< $@
|
||||
|
||||
software/esprst/esprst: | software/esprst
|
||||
$(MAKE) -w -C $|
|
||||
|
||||
software/iwconfig/IWCONFIG: | software/iwconfig
|
||||
$(MAKE) -w -C $|
|
||||
|
||||
.PHONY: clean-software
|
||||
clean-software: |\
|
||||
software/esprst\
|
||||
software/iwconfig
|
||||
$(MAKE) -w -C software/esprst clean
|
||||
$(MAKE) -w -C software/iwconfig clean
|
||||
|
||||
.PHONY: uninstall-software
|
||||
uninstall-software: clean-software
|
||||
rm -f $(foreach t,$(SOFTWARE_TARGETS),$(SOFTWARE_INSTALL_DIR)/$(t))
|
||||
|
||||
# clean
|
||||
|
||||
.PHONY: clean
|
||||
clean: uninstall-utils
|
||||
clean:\
|
||||
uninstall-utils\
|
||||
uninstall-software
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1,6 +1,6 @@
|
|||
= ZXDOS+ and gomaDOS+ Manual
|
||||
:author: kounch
|
||||
:revnumber: 1.4.7
|
||||
:revnumber: 1.4.8
|
||||
:doctype: book
|
||||
:front-cover-image: image:img/portada.jpg[]
|
||||
:email: kounch@users.noreply.github.com
|
||||
|
|
@ -1149,7 +1149,7 @@ As explained in the installation part, there are a series of commands that are e
|
|||
|
||||
Each gomaDOS+, and some models of ZXDOS+, include inside an ESP-12 module with an https://es.wikipedia.org/wiki/ESP8266[ESP8266] Wi-Fi chip, that can be easily used with a ZX Spectrum core (e.g., EXP27 160820 core) which has synthesized an https://es.wikipedia.org/wiki/Universal_Asynchronous_Receiver-Transmitter[UART] device, that allows communication with the module.
|
||||
|
||||
There are two "DOT" commands for configuring software access to the module. Then can be downloaded from https://github.com/zxdos/zxuno/tree/master/utils[GitHub official repository]:
|
||||
There are two "DOT" commands for configuring software access to the module. They can be downloaded from https://github.com/zxdos/zxuno/tree/master/SD/BIN/[GitHub official repository]:
|
||||
|
||||
- `esprst`, which restarts the module
|
||||
- `iwconfig`, to register the Wi-Fi network name (SSID) and password, keeping them in the file `/sys/config/iw.cfg`.
|
||||
|
|
@ -2443,7 +2443,7 @@ You can use a SD card with the first partition in FAT16 or FAT32 formata to stor
|
|||
|
||||
==== Keyboard
|
||||
|
||||
The CHIP-9 machine uses an hexadecimal keyboard as input. This is the key mapping:
|
||||
The CHIP-8 machine uses an hexadecimal keyboard as input. This is the key mapping:
|
||||
|
||||
[align="center",width="25%",%header,cols=2*]
|
||||
|===
|
||||
|
|
@ -2459,6 +2459,7 @@ The CHIP-9 machine uses an hexadecimal keyboard as input. This is the key mappin
|
|||
While the core is running:
|
||||
|
||||
- `Esc` (or `Caps Shift+Space` on gomaDOS+, `PC XT` keyboard mode): Show or hide configuration menu
|
||||
- `F11` (`Caps Shift+Symbol Shift+Q` on gomaDOS+): Hard Reset
|
||||
- `F12` (`Caps Shift+Symbol Shift+W` on gomaDOS+): Reset
|
||||
|
||||
<<<
|
||||
|
|
@ -2470,19 +2471,15 @@ Pressing `Esc` (`Caps Shift+Space` on gomaDOS+, `PC XT` keyboard mode) shows or
|
|||
[.text-center]
|
||||
image:img/chip8.jpg[pdfwidth=70%]
|
||||
|
||||
|
||||
The following options are available:
|
||||
|
||||
- Reset the core
|
||||
- Change the core clock speed
|
||||
- Load a ROM file from the microSD card
|
||||
- Enable or disable sound output
|
||||
- Help
|
||||
- Exit the menu
|
||||
|
||||
[CAUTION]
|
||||
====
|
||||
After loading a ROM, always press the reset key so that it runs correctly: `F12` (`Caps Shift+Symbol Shift+W` on gomaDOS+)
|
||||
====
|
||||
|
||||
<<<
|
||||
|
||||
== Other Hardware
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1,6 +1,6 @@
|
|||
= ZXUNO+ Manual
|
||||
:author: kounch
|
||||
:revnumber: 0.7
|
||||
:revnumber: 0.9
|
||||
:doctype: book
|
||||
:front-cover-image: image:img/portadauno.jpg[]
|
||||
:email: kounch@users.noreply.github.com
|
||||
|
|
@ -1307,7 +1307,7 @@ Some of its features are:
|
|||
|
||||
==== SD card format
|
||||
|
||||
You have to use a SD card with the first partition in FAT32 format, with a maximum of 4GB in size, and 4096 bytes per cluster.
|
||||
You have to use a SD card with the first partition in FAT32 format (`0B` Win95 FAT-32 Partition Type), with a maximum of 4GB in size, and 4096 bytes per cluster.
|
||||
|
||||
You also need the following ROM files (they are available http://www.cpcwiki.eu/index.php/FPGAmstrad#How_to_assemble_it[at the original project Wiki]) or from the https://github.com/renaudhelias/FPGAmstrad/raw/master/OS6128_BASIC1-1_AMSDOS_MAXAM.zip[GitHub repository]:
|
||||
|
||||
|
|
@ -2239,6 +2239,60 @@ See the <<#_cores,corresponding section>> for instructions of how to install the
|
|||
|
||||
<<<
|
||||
|
||||
=== Chip-8
|
||||
|
||||
https://en.wikipedia.org/wiki/CHIP-8[CHIP-8] is an interpreted programming language, developed by Joseph Weisbecker. It was initially used on the COSMAC VIP and Telmac 1800 8-bit microcomputers in the mid-1970s. Erik Bryntse later created another interpreter based on CHIP-8, called SCHIP, S-CHIP or Super-Chip which extended the CHIP-8.
|
||||
|
||||
The ZXUNO+ core is based on an existing https://bitbucket.org/csoren/fpga-chip8/[FPGA implementation] of the SuperChip.
|
||||
|
||||
There are several sites like https://johnearnest.github.io/chip8Archive/[CHIP-8 Archive] ot https://github.com/mattmikolay/chip-8[Matthew Mikolay's CHIP-8] where you can obtain osftware for these machines.
|
||||
|
||||
==== microSD card format
|
||||
|
||||
You can use a SD card with the first partition in FAT16 or FAT32 formata to store `BIN` or `CH8` ROM files to load with the core.
|
||||
|
||||
==== Keyboard
|
||||
|
||||
The CHIP-8 machine uses an hexadecimal keyboard as input. This is the key mapping:
|
||||
|
||||
[align="center",width="25%",%header,cols=2*]
|
||||
|===
|
||||
|Chip-8|PS/2
|
||||
|`1 2 3 C`|`1 2 3 4`
|
||||
|`4 5 6 D`|`Q W E R`
|
||||
|`7 8 9 E`|`A S D F`
|
||||
|`A 0 B F`|`Z X C V`
|
||||
|===
|
||||
|
||||
===== Special keys and buttons
|
||||
|
||||
While the core is running:
|
||||
|
||||
- `Esc`: Show or hide configuration menu
|
||||
- `F11`: Hard Reset
|
||||
- `F12`: Reset
|
||||
|
||||
<<<
|
||||
|
||||
==== Basic Guide
|
||||
|
||||
Pressing `Esc` shows or hides the configuration menu. Use the cursor keys and `Enter` to select and choose menu options.
|
||||
|
||||
[.text-center]
|
||||
image:img/chip8uno.jpg[pdfwidth=70%]
|
||||
|
||||
|
||||
The following options are available:
|
||||
|
||||
- Reset the core
|
||||
- Change the core clock speed
|
||||
- Load a ROM file from the microSD card
|
||||
- Enable or disable sound output
|
||||
- Help
|
||||
- Exit the menu
|
||||
|
||||
<<<
|
||||
|
||||
=== SmartROM
|
||||
|
||||
https://github.com/Utodev/smartROM[SmartROM] is a kind of firmware that allows to loadi different ROMS for implementations of the ZX-Uno core in FPGA boards without flash memory, or where the flash memory cannot be used by the ZX-Uno core.
|
||||
|
|
@ -2338,7 +2392,7 @@ aclocal && autoconf && autoheader && automake --add-missing
|
|||
make
|
||||
----
|
||||
|
||||
If all goes well, a new file named `tzxplay` will be created, which you can copy anywhere and then use. You can delete the compilation directory.
|
||||
If all goes well, a new file named `playtzx` will be created, which you can copy anywhere and then use. You can delete the compilation directory.
|
||||
|
||||
==== Mobile phone, tablet, MP3 player, etc.
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1,6 +1,6 @@
|
|||
= Manual de ZXDOS+ y gomaDOS+
|
||||
:author: kounch
|
||||
:revnumber: 1.4.7
|
||||
:revnumber: 1.4.8
|
||||
:doctype: book
|
||||
:front-cover-image: image:img/portada.jpg[]
|
||||
:email: kounch@users.noreply.github.com
|
||||
|
|
@ -1153,7 +1153,7 @@ Tal y como se ha explicado en la parte de instalación, existe una serie de coma
|
|||
|
||||
Todos los gomaDOS+, y algunos modelos de ZXDOS+, tienen incorporado un módulo ESP-12 con un chip Wi-Fi https://es.wikipedia.org/wiki/ESP8266[ESP8266], que se puede utilizar fácilmente con un core de ZX Spectrum (por ejemplo, el core EXP27 160820) que tenga sintetizado un dispositivo https://es.wikipedia.org/wiki/Universal_Asynchronous_Receiver-Transmitter[UART], que permite la comunicacion con el módulo.
|
||||
|
||||
Para configurar de forma básica el acceso al módulo, existen dos comandos "DOT" que se pueden obtener desde https://github.com/zxdos/zxuno/tree/master/utils[el repositorio oficial en GitHub]:
|
||||
Para configurar de forma básica el acceso al módulo, existen dos comandos "DOT" que se pueden obtener desde https://github.com/zxdos/zxuno/tree/master/SD/BIN/[el repositorio oficial en GitHub]:
|
||||
|
||||
- `esprst`, que sirve para reiniciar el módulo
|
||||
- `iwconfig`, que se utiliza para indicar el identificador (SSID) y la contraseña de la red Wi-Fi a la que conectarse, que quedarán almacenados en el fichero `/sys/config/iw.cfg` para que puedan usarlos otros programas.
|
||||
|
|
@ -2456,6 +2456,7 @@ La máquina CHIP-8 utiliza un teclado hexadecimal como entrada. La asignación e
|
|||
Durante la ejecución del core:
|
||||
|
||||
- `Esc` (o `Caps Shift+Espacio` en gomaDOS+) para mostrar u ocultar el menú.
|
||||
- `F11` (`Caps Shift+Symbol Shift+Q` en gomaDOS+): Hard Reset
|
||||
- `F12` (`Caps Shift+Symbol Shift+W` en gomaDOS+): Reset
|
||||
|
||||
<<<
|
||||
|
|
@ -2472,13 +2473,10 @@ En él se pueden activar, desactivar o configurar las siguientes opciones:
|
|||
- Reiniciar el core (Reset)
|
||||
- Cambiar la velocidad de reloj del core (Clock Speed)
|
||||
- Cargar un archivo de ROM desde la tarjeta microSD (Load Rom)
|
||||
- Activar o desactivar el sonido (Sound On/Off)
|
||||
- Ayuda sobre el uso del teclado (Keyboard Help)
|
||||
- Salir del menú (Exit)
|
||||
|
||||
[CAUTION]
|
||||
====
|
||||
Después de cargar cualquier ROM, pulsar siempre a continuación la tecla de reset para que funcione correctamente: `F12` (`Caps Shift+Symbol Shift+W` en gomaDOS+)
|
||||
====
|
||||
|
||||
<<<
|
||||
|
||||
== Otro Hardware
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1,6 +1,6 @@
|
|||
= Manual de ZXUNO+
|
||||
:author: kounch
|
||||
:revnumber: 0.7
|
||||
:revnumber: 0.9
|
||||
:doctype: book
|
||||
:front-cover-image: image:img/portadauno.jpg[]
|
||||
:email: kounch@users.noreply.github.com
|
||||
|
|
@ -1316,7 +1316,7 @@ Algunas de sus características son:
|
|||
|
||||
==== Formato de Tarjeta SD
|
||||
|
||||
Se debe de utilizar una tarjeta SD con la primera partición en formato FAT32, de 4GB de tamaño máximo y 4096 bytes por cluster.
|
||||
Se debe de utilizar una tarjeta SD con la primera partición en formato FAT32 (Tipo de partición `0B` Win95 FAT-32), de 4GB de tamaño máximo y 4096 bytes por cluster.
|
||||
|
||||
Además son necesarios los ficheros ROM siguientes (se pueden obtener http://www.cpcwiki.eu/index.php/FPGAmstrad#How_to_assemble_it[en la wiki oficial del proyecto original]) o en el https://github.com/renaudhelias/FPGAmstrad/raw/master/OS6128_BASIC1-1_AMSDOS_MAXAM.zip[repositorio de GitHub]:
|
||||
|
||||
|
|
@ -2246,6 +2246,59 @@ Si no estuviera ya, <<#_cores,instalar el core de PC XT>> en el ZXUNO+.
|
|||
|
||||
<<<
|
||||
|
||||
=== Chip-8
|
||||
|
||||
https://es.wikipedia.org/wiki/CHIP-8[CHIP-8] es un lenguaje de programación interpretado, desarrollado por Joseph Weisbecker. Fue inicialmente usado en los microcomputadores de 8 bits COSMAC VIP y Telmac 1800 a mediados de 1970. CHIP-8 tiene un descendiente llamado SCHIP (Super Chip), presentado por Erik Bryntse.
|
||||
|
||||
El core de ZXUNO+ está basada en una implementación ya existente https://bitbucket.org/csoren/fpga-chip8/[para FPGA] de la máquina virtual de SuperChip.
|
||||
|
||||
Existen múltiples sitios como https://johnearnest.github.io/chip8Archive/[CHIP-8 Archive] o https://github.com/mattmikolay/chip-8[CHIP-8 de Matthew Mikolay] donde se puede obtener software para este tipo de máquinas.
|
||||
|
||||
==== Formato de Tarjeta microSD
|
||||
|
||||
Se puede utilizar una tarjeta con la primera partición en formato FAT16 o FAT32 para almacenar ficheros ROM en formato `BIN` o `CH8` para usar con el core.
|
||||
|
||||
==== Teclado
|
||||
|
||||
La máquina CHIP-8 utiliza un teclado hexadecimal como entrada. La asignación en el teclado es la siguiente:
|
||||
|
||||
[align="center",width="25%",%header,cols=2*]
|
||||
|===
|
||||
|Chip-8|PS/2
|
||||
|`1 2 3 C`|`1 2 3 4`
|
||||
|`4 5 6 D`|`Q W E R`
|
||||
|`7 8 9 E`|`A S D F`
|
||||
|`A 0 B F`|`Z X C V`
|
||||
|===
|
||||
|
||||
===== Teclas especiales y botones
|
||||
|
||||
Durante la ejecución del core:
|
||||
|
||||
- `Esc`: para mostrar u ocultar el menú.
|
||||
- `F11`: Hard Reset
|
||||
- `F12`: Reset
|
||||
|
||||
<<<
|
||||
|
||||
==== Guía Básica
|
||||
|
||||
Pulsando `Esc` se muestra el menú de configuración. Se usan las teclas de cursor y `Enter` para elegir y seleccionar las distintas opciones.
|
||||
|
||||
[.text-center]
|
||||
image:img/chip8uno.jpg[pdfwidth=70%]
|
||||
|
||||
En él se pueden activar, desactivar o configurar las siguientes opciones:
|
||||
|
||||
- Reiniciar el core (Reset)
|
||||
- Cambiar la velocidad de reloj del core (Clock Speed)
|
||||
- Cargar un archivo de ROM desde la tarjeta microSD (Load Rom)
|
||||
- Activar o desactivar el sonido (Sound On/Off)
|
||||
- Ayuda sobre el uso del teclado (Keyboard Help)
|
||||
- Salir del menú (Exit)
|
||||
|
||||
<<<
|
||||
|
||||
=== SmartROM
|
||||
|
||||
https://github.com/Utodev/smartROM[SmartROM] es un nuevo firmware para el core de Spectrum del ZX-UNO pensado para funcionar en placas FPGA que no tengan flash, o en las que no se pueda usar. Está basado en una versión del core de McLeod hay había hecho un core "sin flash", que contiene la ROM y ESXDOS dentro del propio core. El proyecto SmartROM incluye una versión ligeramente modificada de ese core, junto con un fichero que en la SD que permite cargar una ROM de Spectrum distinta y, además, cambiar algunos ajustes.
|
||||
|
|
@ -2349,7 +2402,7 @@ aclocal && autoconf && autoheader && automake --add-missing
|
|||
make
|
||||
----
|
||||
|
||||
Si todo se ha hecho correctamente, se habrá generado el fichero `tzplay` que se puede copiar a donde se desee en el disco duro y utilizar. Se puede borrar el directorio descomprimido donde se compiló.
|
||||
Si todo se ha hecho correctamente, se habrá generado el fichero `playtzx` que se puede copiar a donde se desee en el disco duro y utilizar. Se puede borrar el directorio descomprimido donde se compiló.
|
||||
|
||||
==== Teléfono móvil, tableta, reproductor de sonido MP3, etc.
|
||||
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 377 KiB After Width: | Height: | Size: 315 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 138 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -14,8 +14,13 @@ z88dk is distributed under [Clarified Artistic](https://spdx.org/licenses/ClArti
|
|||
|
||||
# 1. General information
|
||||
|
||||
The source code of local tools is in `src` directory. Compiled binaries of them are placed in `bin` directory.
|
||||
Downloaded tools are placed in sub-directories of `src`. See Makefiles for details.
|
||||
The structure of `sdk` folder:
|
||||
|
||||
Directory | Description
|
||||
----|----
|
||||
`bin` | Compiled binaries of tools.
|
||||
`include` | Header files (`.def`, `.h` etc.) to be included in other sources (assembler, C, etc.).
|
||||
`src` | The source code of local and downloadable tools. See Makefiles for details.
|
||||
|
||||
## 1.1. Copyright and licensing information for files
|
||||
|
||||
|
|
|
|||
|
|
@ -9,5 +9,7 @@ bin2hex
|
|||
fcut
|
||||
fpad
|
||||
fpoke
|
||||
rcs
|
||||
GenRom
|
||||
AddItem
|
||||
Bit2Bin
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -0,0 +1,11 @@
|
|||
SPDX-FileName: Bit2Bin.exe
|
||||
|
||||
SPDX-FileType: BINARY
|
||||
|
||||
SPDX-FileChecksum: SHA1: f1484d968816b72f7c1a246e11a468c175e8822a
|
||||
|
||||
SPDX-FileCopyrightText: Copyright (C) 2019-2021 Antonio Villena
|
||||
|
||||
SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
SPDX-FileComment: Bit2Bin version 0.05 (2020-02-19) - strip .bit header and align binary to 16K.
|
||||
Binary file not shown.
|
|
@ -0,0 +1,11 @@
|
|||
SPDX-FileName: rcs.exe
|
||||
|
||||
SPDX-FileType: BINARY
|
||||
|
||||
SPDX-FileChecksum: SHA1: 49651fa71f9da7cd56c2e3e9bb5af2d4398b1fb6
|
||||
|
||||
SPDX-FileCopyrightText: Copyright (C) 2013, 2021 Antonio Villena
|
||||
|
||||
SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
SPDX-FileComment: rcs version 1.03 (18 Jan 2013) - SCR filter to RCS (and inverse).
|
||||
|
|
@ -252,8 +252,10 @@ INSTALLED_TOOLS:=\
|
|||
$(INSTALLDIR)/fcut$(EXESUFFIX)\
|
||||
$(INSTALLDIR)/fpad$(EXESUFFIX)\
|
||||
$(INSTALLDIR)/fpoke$(EXESUFFIX)\
|
||||
$(INSTALLDIR)/rcs$(EXESUFFIX)\
|
||||
$(INSTALLDIR)/GenRom$(EXESUFFIX)\
|
||||
$(INSTALLDIR)/AddItem$(EXESUFFIX)
|
||||
$(INSTALLDIR)/AddItem$(EXESUFFIX)\
|
||||
$(INSTALLDIR)/Bit2Bin$(EXESUFFIX)
|
||||
|
||||
.PHONY: local-tools clean-tools
|
||||
|
||||
|
|
@ -273,12 +275,18 @@ $(INSTALLDIR)/fpad$(EXESUFFIX): tools/fpad$(EXESUFFIX)
|
|||
$(INSTALLDIR)/fpoke$(EXESUFFIX): tools/fpoke$(EXESUFFIX)
|
||||
cp $< $@
|
||||
|
||||
$(INSTALLDIR)/rcs$(EXESUFFIX): tools/rcs$(EXESUFFIX)
|
||||
cp $< $@
|
||||
|
||||
$(INSTALLDIR)/GenRom$(EXESUFFIX): tools/GenRom$(EXESUFFIX)
|
||||
cp $< $@
|
||||
|
||||
$(INSTALLDIR)/AddItem$(EXESUFFIX): tools/AddItem$(EXESUFFIX)
|
||||
cp $< $@
|
||||
|
||||
$(INSTALLDIR)/Bit2Bin$(EXESUFFIX): tools/Bit2Bin$(EXESUFFIX)
|
||||
cp $< $@
|
||||
|
||||
tools/%$(EXESUFFIX): | tools
|
||||
$(MAKE) -w -C $| $(@F)
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,11 @@ fpad
|
|||
fpad.exe
|
||||
fpoke
|
||||
fpoke.exe
|
||||
rcs
|
||||
rcs.exe
|
||||
GenRom
|
||||
GenRom.exe
|
||||
AddItem
|
||||
AddItem.exe
|
||||
Bit2Bin
|
||||
Bit2Bin.exe
|
||||
|
|
|
|||
|
|
@ -1,99 +1,148 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
FILE *fi, *fo;
|
||||
int i, length;
|
||||
unsigned char mem[0x4000];
|
||||
unsigned short j;
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
if( argc==1 )
|
||||
printf("\n"
|
||||
"Bit2Bin v0.05, strip .bit header and align binary to 16k, 2020-02-19\n\n"
|
||||
" Bit2Bin <input_file> <output_file>\n\n"
|
||||
" <input_file> Input BIT file\n"
|
||||
" <output_file> Output BIN file\n\n"
|
||||
"All params are mandatory\n\n"),
|
||||
exit(0);
|
||||
if( argc!=3 )
|
||||
printf("\nInvalid number of parameters\n"),
|
||||
exit(-1);
|
||||
fi= fopen(argv[1], "rb");
|
||||
if( !fi )
|
||||
printf("\nInput file not found: %s\n", argv[1]),
|
||||
exit(-1);
|
||||
fseek(fi, 0, SEEK_END);
|
||||
i= ftell(fi);
|
||||
fseek(fi, 0, SEEK_SET);
|
||||
fread(mem, 1, 2, fi);
|
||||
i-= (j= mem[1]|mem[0]<<8)+4;
|
||||
fread(mem, 1, j+2, fi);
|
||||
i-= (j= mem[j+1]|mem[j]<<8)+3;
|
||||
fread(mem, 1, j+3, fi);
|
||||
i-= (j= mem[j+1]|mem[j]<<8)+3;
|
||||
fread(mem, 1, j+3, fi);
|
||||
i-= (j= mem[j+1]|mem[j]<<8)+3;
|
||||
fread(mem, 1, j+3, fi);
|
||||
i-= (j= mem[j+1]|mem[j]<<8)+3;
|
||||
fread(mem, 1, j+3, fi);
|
||||
i-= (j= mem[j+1]|mem[j]<<8)+4;
|
||||
fread(mem, 1, j+4, fi);
|
||||
length= mem[j+3]|mem[j+2]<<8|mem[j+1]<<16|mem[j]<<24;
|
||||
if( i!=length )
|
||||
printf("\nInvalid file length\n"),
|
||||
exit(-1);
|
||||
fo= fopen(argv[2], "wb+");
|
||||
if( !fo )
|
||||
printf("\nCannot create output file: %s\n", argv[2]),
|
||||
exit(-1);
|
||||
j= i>>14;
|
||||
if( j>71 ){
|
||||
for ( i= 0; i<72; i++ )
|
||||
fread(mem, 1, 0x4000, fi),
|
||||
fwrite(mem, 1, 0x4000, fo);
|
||||
fclose(fo);
|
||||
argv[2][strlen(argv[2])-5]++;
|
||||
if(argv[2][strlen(argv[2])-5]==':')
|
||||
if(strlen(argv[2])==9)
|
||||
argv[2]= "CORE10.ZX3";
|
||||
else
|
||||
argv[2][4]++,
|
||||
argv[2][5]='0';
|
||||
fo= fopen(argv[2], "wb+");
|
||||
if( !fo )
|
||||
printf("\nCannot create output file: %s\n", argv[2]),
|
||||
exit(-1);
|
||||
for ( i= 0; i<j-72; i++ )
|
||||
fread(mem, 1, 0x4000, fi),
|
||||
fwrite(mem, 1, 0x4000, fo);
|
||||
memset(mem, 0, 0x4000);
|
||||
fread(mem, 1, length&0x3fff, fi),
|
||||
fwrite(mem, 1, 0x4000, fo);
|
||||
memset(mem, 0, 0x4000);
|
||||
for ( i= 0; i<143-j; i++ )
|
||||
fwrite(mem, 1, 0x4000, fo);
|
||||
}
|
||||
else{
|
||||
if( j )
|
||||
for ( i= 0; i<j; i++ )
|
||||
fread(mem, 1, 0x4000, fi),
|
||||
fwrite(mem, 1, 0x4000, fo);
|
||||
memset(mem, 0, 0x4000);
|
||||
fread(mem, 1, length&0x3fff, fi),
|
||||
fwrite(mem, 1, 0x4000, fo);
|
||||
memset(mem, 0, 0x4000);
|
||||
if( j>48 )
|
||||
for ( i= 0; i<71-j; i++ )
|
||||
fwrite(mem, 1, 0x4000, fo);
|
||||
else if( j>28 )
|
||||
for ( i= 0; i<48-j; i++ )
|
||||
fwrite(mem, 1, 0x4000, fo);
|
||||
else if( j>20 )
|
||||
for ( i= 0; i<28-j; i++ )
|
||||
fwrite(mem, 1, 0x4000, fo);
|
||||
else
|
||||
for ( i= 0; i<20-j; i++ )
|
||||
fwrite(mem, 1, 0x4000, fo);
|
||||
}
|
||||
printf("\nFile generated successfully\n");
|
||||
}
|
||||
/*
|
||||
* Bit2Bin - strip .bit header and align binary to 16K.
|
||||
*
|
||||
* Copyright (C) 2019-2021 Antonio Villena
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* SPDX-FileCopyrightText: Copyright (C) 2019-2021 Antonio Villena
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-only
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define PROGRAM "Bit2Bin"
|
||||
#define DESCRIPTION "strip .bit header and align binary to 16K."
|
||||
#define VERSION "0.05 (2020-02-19)"
|
||||
#define COPYRIGHT "Copyright (C) 2019-2021 Antonio Villena"
|
||||
#define LICENSE \
|
||||
"This program is free software: you can redistribute it and/or modify\n" \
|
||||
"it under the terms of the GNU General Public License as published by\n" \
|
||||
"the Free Software Foundation, version 3."
|
||||
#define HOMEPAGE "https://github.com/zxdos/zxuno/"
|
||||
|
||||
FILE *fi, *fo;
|
||||
int i, length;
|
||||
unsigned char mem[0x4000];
|
||||
unsigned short j;
|
||||
|
||||
void show_help() {
|
||||
printf(
|
||||
PROGRAM " version " VERSION " - " DESCRIPTION "\n"
|
||||
COPYRIGHT "\n"
|
||||
LICENSE "\n"
|
||||
"Home page: " HOMEPAGE "\n"
|
||||
"\n"
|
||||
"Usage:\n"
|
||||
" " PROGRAM " <input_file> <output_file>\n"
|
||||
"\n"
|
||||
" <input_file> Input BIT file\n"
|
||||
" <output_file> Output BIN file\n"
|
||||
"\n"
|
||||
"All parameters are mandatory.\n"
|
||||
);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
if( argc==1 )
|
||||
show_help(),
|
||||
exit(0);
|
||||
if( argc!=3 )
|
||||
printf("Invalid number of parameters\n"),
|
||||
exit(-1);
|
||||
fi= fopen(argv[1], "rb");
|
||||
if( !fi )
|
||||
printf("Input file not found: %s\n", argv[1]),
|
||||
exit(-1);
|
||||
fseek(fi, 0, SEEK_END);
|
||||
i= ftell(fi);
|
||||
fseek(fi, 0, SEEK_SET);
|
||||
fread(mem, 1, 2, fi);
|
||||
i-= (j= mem[1]|mem[0]<<8)+4;
|
||||
fread(mem, 1, j+2, fi);
|
||||
i-= (j= mem[j+1]|mem[j]<<8)+3;
|
||||
fread(mem, 1, j+3, fi);
|
||||
i-= (j= mem[j+1]|mem[j]<<8)+3;
|
||||
fread(mem, 1, j+3, fi);
|
||||
i-= (j= mem[j+1]|mem[j]<<8)+3;
|
||||
fread(mem, 1, j+3, fi);
|
||||
i-= (j= mem[j+1]|mem[j]<<8)+3;
|
||||
fread(mem, 1, j+3, fi);
|
||||
i-= (j= mem[j+1]|mem[j]<<8)+4;
|
||||
fread(mem, 1, j+4, fi);
|
||||
length= mem[j+3]|mem[j+2]<<8|mem[j+1]<<16|mem[j]<<24;
|
||||
if( i!=length )
|
||||
printf("Invalid file length\n"),
|
||||
exit(-1);
|
||||
fo= fopen(argv[2], "wb+");
|
||||
if( !fo )
|
||||
printf("Cannot create output file: %s\n", argv[2]),
|
||||
exit(-1);
|
||||
j= i>>14;
|
||||
if( j>71 ){
|
||||
for ( i= 0; i<72; i++ )
|
||||
fread(mem, 1, 0x4000, fi),
|
||||
fwrite(mem, 1, 0x4000, fo);
|
||||
fclose(fo);
|
||||
argv[2][strlen(argv[2])-5]++;
|
||||
if(argv[2][strlen(argv[2])-5]==':')
|
||||
if(strlen(argv[2])==9)
|
||||
argv[2]= "CORE10.ZX3";
|
||||
else
|
||||
argv[2][4]++,
|
||||
argv[2][5]='0';
|
||||
fo= fopen(argv[2], "wb+");
|
||||
if( !fo )
|
||||
printf("Cannot create output file: %s\n", argv[2]),
|
||||
exit(-1);
|
||||
for ( i= 0; i<j-72; i++ )
|
||||
fread(mem, 1, 0x4000, fi),
|
||||
fwrite(mem, 1, 0x4000, fo);
|
||||
memset(mem, 0, 0x4000);
|
||||
fread(mem, 1, length&0x3fff, fi),
|
||||
fwrite(mem, 1, 0x4000, fo);
|
||||
memset(mem, 0, 0x4000);
|
||||
for ( i= 0; i<143-j; i++ )
|
||||
fwrite(mem, 1, 0x4000, fo);
|
||||
}
|
||||
else{
|
||||
if( j )
|
||||
for ( i= 0; i<j; i++ )
|
||||
fread(mem, 1, 0x4000, fi),
|
||||
fwrite(mem, 1, 0x4000, fo);
|
||||
memset(mem, 0, 0x4000);
|
||||
fread(mem, 1, length&0x3fff, fi),
|
||||
fwrite(mem, 1, 0x4000, fo);
|
||||
memset(mem, 0, 0x4000);
|
||||
if( j>48 )
|
||||
for ( i= 0; i<71-j; i++ )
|
||||
fwrite(mem, 1, 0x4000, fo);
|
||||
else if( j>28 )
|
||||
for ( i= 0; i<48-j; i++ )
|
||||
fwrite(mem, 1, 0x4000, fo);
|
||||
else if( j>20 )
|
||||
for ( i= 0; i<28-j; i++ )
|
||||
fwrite(mem, 1, 0x4000, fo);
|
||||
else
|
||||
for ( i= 0; i<20-j; i++ )
|
||||
fwrite(mem, 1, 0x4000, fo);
|
||||
}
|
||||
printf("File `%s' successfully created\n", argv[2]);
|
||||
}
|
||||
|
|
@ -25,8 +25,10 @@ TARGETS:=\
|
|||
fcut$(EXESUFFIX)\
|
||||
fpad$(EXESUFFIX)\
|
||||
fpoke$(EXESUFFIX)\
|
||||
rcs$(EXESUFFIX)\
|
||||
GenRom$(EXESUFFIX)\
|
||||
AddItem$(EXESUFFIX)
|
||||
AddItem$(EXESUFFIX)\
|
||||
Bit2Bin$(EXESUFFIX)
|
||||
|
||||
.PHONY: all
|
||||
all: $(TARGETS)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,100 @@
|
|||
/*
|
||||
* rcs - SCR filter to RCS (and inverse).
|
||||
*
|
||||
* Copyright (C) 2013, 2021 Antonio Villena
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* SPDX-FileCopyrightText: Copyright (C) 2013, 2021 Antonio Villena
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-only
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define PROGRAM "rcs"
|
||||
#define DESCRIPTION "SCR filter to RCS (and inverse)."
|
||||
#define VERSION "1.03 (18 Jan 2013)"
|
||||
#define COPYRIGHT "Copyright (C) 2013, 2021 Antonio Villena"
|
||||
#define LICENSE \
|
||||
"This program is free software: you can redistribute it and/or modify\n" \
|
||||
"it under the terms of the GNU General Public License as published by\n" \
|
||||
"the Free Software Foundation, version 3."
|
||||
#define HOMEPAGE "https://github.com/zxdos/zxuno/"
|
||||
|
||||
void show_help() {
|
||||
printf(
|
||||
PROGRAM " version " VERSION " - " DESCRIPTION "\n"
|
||||
COPYRIGHT "\n"
|
||||
LICENSE "\n"
|
||||
"Home page: " HOMEPAGE "\n"
|
||||
"\n"
|
||||
"Usage:\n"
|
||||
" " PROGRAM " [-i] <input_file> <output_file>\n"
|
||||
"\n"
|
||||
" -i Inverse filter (RCS to SCR), optional\n"
|
||||
" <input_file> Input file to filter\n"
|
||||
" <output_file> Generated output file\n"
|
||||
"\n"
|
||||
"All parameters are mandatory except `-i'.\n"
|
||||
);
|
||||
}
|
||||
|
||||
int scr2rcs( int i ){ return i&0x1800 | i<<8&0x700 | i<<2&0xe0 | i>>6&0x1f; }
|
||||
int rcs2scr( int i ){ return i&0x1800 | i>>8&7 | i>>2&0x38 | i<<6&0x7c0; }
|
||||
int main(int argc, char* argv[]){
|
||||
unsigned char *mem= (unsigned char *) malloc (0x1b00);
|
||||
int tmp, last, j, k;
|
||||
FILE *fi, *fo;
|
||||
if( argc==1 )
|
||||
show_help(),
|
||||
exit(0);
|
||||
int (*func)(int)= &scr2rcs;
|
||||
if( argv[1][0] == '-' )
|
||||
func= &rcs2scr, argv++, argc--;
|
||||
if( argc!=3 )
|
||||
printf("Invalid number of parameters\n"),
|
||||
exit(-1);
|
||||
fi= fopen(argv[1], "rb");
|
||||
if( !fi )
|
||||
printf("Input file not found: %s\n", argv[1]),
|
||||
exit(-1);
|
||||
fo= fopen(argv[2], "wb+");
|
||||
if( !fo )
|
||||
printf("Cannot create output file: %s\n", argv[2]),
|
||||
exit(-1);
|
||||
fread(mem, 1, 0x1b01, fi);
|
||||
if( ftell(fi) != 0x1b00 )
|
||||
printf("Input file size must be 6912 bytes\n"),
|
||||
exit(-1);
|
||||
for ( int i= 0; i<0x1800; i++ ){
|
||||
k= j= i;
|
||||
do
|
||||
last= j,
|
||||
j= func(j),
|
||||
k<j && (k= j, j= i);
|
||||
while( j != i );
|
||||
if( k==i ){
|
||||
tmp= mem[j];
|
||||
do
|
||||
k= func(j),
|
||||
mem[j]= mem[k],
|
||||
j= k;
|
||||
while( j != i );
|
||||
mem[last]= tmp;
|
||||
}
|
||||
}
|
||||
fwrite(mem, 1, 0x1b00, fo);
|
||||
printf("File `%s' successfully created\n",argv[2]);
|
||||
}
|
||||
|
|
@ -4,3 +4,4 @@
|
|||
|
||||
https://sourceforge.net/p/emuscriptoria/code/HEAD/tree/desprot/
|
||||
https://github.com/antoniovillena/EmuScriptoria/tree/master/desprot
|
||||
https://github.com/DSkywalk/fase
|
||||
|
|
|
|||
BIN
utils/ESPRST
BIN
utils/ESPRST
Binary file not shown.
BIN
utils/IWCONFIG
BIN
utils/IWCONFIG
Binary file not shown.
|
|
@ -13,9 +13,10 @@
|
|||
|
||||
include ../sdk/common.mk
|
||||
|
||||
INC_DIR = ../sdk/include
|
||||
BUILD_DIR = build
|
||||
AS = sjasmplus
|
||||
AFLAGS = --nobanner
|
||||
AFLAGS = --nobanner -I$(INC_DIR)
|
||||
|
||||
TARGETS=\
|
||||
BACK16M\
|
||||
|
|
@ -38,8 +39,8 @@ $(BUILD_DIR):
|
|||
mkdir -p $@
|
||||
|
||||
$(BUILD_DIR)/BACK16M: back16m.asm\
|
||||
zxuno.def\
|
||||
esxdos.def\
|
||||
$(INC_DIR)/zxuno.def\
|
||||
$(INC_DIR)/esxdos.def\
|
||||
Print.inc\
|
||||
rdflsh.inc\
|
||||
rst28.inc\
|
||||
|
|
@ -47,8 +48,8 @@ $(BUILD_DIR)/BACK16M: back16m.asm\
|
|||
$(AS) $(AFLAGS) --raw=$@ $<
|
||||
|
||||
$(BUILD_DIR)/BACKZX2: back32m.asm\
|
||||
zxuno.def\
|
||||
esxdos.def\
|
||||
$(INC_DIR)/zxuno.def\
|
||||
$(INC_DIR)/esxdos.def\
|
||||
Print.inc\
|
||||
rdflsh.inc\
|
||||
rst28.inc\
|
||||
|
|
@ -58,8 +59,8 @@ $(BUILD_DIR)/BACKZX2: back32m.asm\
|
|||
rm -f back32m.def
|
||||
|
||||
$(BUILD_DIR)/BACKZXD: back32m.asm\
|
||||
zxuno.def\
|
||||
esxdos.def\
|
||||
$(INC_DIR)/zxuno.def\
|
||||
$(INC_DIR)/esxdos.def\
|
||||
Print.inc\
|
||||
rdflsh.inc\
|
||||
rst28.inc\
|
||||
|
|
@ -69,8 +70,8 @@ $(BUILD_DIR)/BACKZXD: back32m.asm\
|
|||
rm -f back32m.def
|
||||
|
||||
$(BUILD_DIR)/BACKUP: backup.asm\
|
||||
zxuno.def\
|
||||
esxdos.def\
|
||||
$(INC_DIR)/zxuno.def\
|
||||
$(INC_DIR)/esxdos.def\
|
||||
Print.inc\
|
||||
rdflsh.inc\
|
||||
rst28.inc\
|
||||
|
|
@ -78,7 +79,7 @@ $(BUILD_DIR)/BACKUP: backup.asm\
|
|||
$(AS) $(AFLAGS) --raw=$@ $<
|
||||
|
||||
$(BUILD_DIR)/CORCLEAN: corclean.asm\
|
||||
zxuno.def\
|
||||
$(INC_DIR)/zxuno.def\
|
||||
Print.inc\
|
||||
rdflsh.inc\
|
||||
wrflsh.inc\
|
||||
|
|
@ -87,8 +88,8 @@ $(BUILD_DIR)/CORCLEAN: corclean.asm\
|
|||
$(AS) $(AFLAGS) --raw=$@ $<
|
||||
|
||||
$(BUILD_DIR)/COREBIOS: corebios.asm\
|
||||
zxuno.def\
|
||||
esxdos.def\
|
||||
$(INC_DIR)/zxuno.def\
|
||||
$(INC_DIR)/esxdos.def\
|
||||
Print.inc\
|
||||
rdflsh.inc\
|
||||
wrflsh.inc\
|
||||
|
|
@ -97,8 +98,8 @@ $(BUILD_DIR)/COREBIOS: corebios.asm\
|
|||
$(AS) $(AFLAGS) --raw=$@ $<
|
||||
|
||||
$(BUILD_DIR)/ROMSBACK: romsback.asm\
|
||||
zxuno.def\
|
||||
esxdos.def\
|
||||
$(INC_DIR)/zxuno.def\
|
||||
$(INC_DIR)/esxdos.def\
|
||||
Print.inc\
|
||||
rdflsh.inc\
|
||||
rst28.inc\
|
||||
|
|
@ -106,8 +107,8 @@ $(BUILD_DIR)/ROMSBACK: romsback.asm\
|
|||
$(AS) $(AFLAGS) --raw=$@ $<
|
||||
|
||||
$(BUILD_DIR)/ROMSUPGR: romsupgr.asm\
|
||||
zxuno.def\
|
||||
esxdos.def\
|
||||
$(INC_DIR)/zxuno.def\
|
||||
$(INC_DIR)/esxdos.def\
|
||||
Print.inc\
|
||||
rdflsh.inc\
|
||||
wrflsh.inc\
|
||||
|
|
@ -116,8 +117,8 @@ $(BUILD_DIR)/ROMSUPGR: romsupgr.asm\
|
|||
$(AS) $(AFLAGS) --raw=$@ $<
|
||||
|
||||
$(BUILD_DIR)/UPGR16M: upgr16m.asm\
|
||||
zxuno.def\
|
||||
esxdos.def\
|
||||
$(INC_DIR)/zxuno.def\
|
||||
$(INC_DIR)/esxdos.def\
|
||||
Print.inc\
|
||||
wrflsh.inc\
|
||||
rst28.inc\
|
||||
|
|
@ -125,8 +126,8 @@ $(BUILD_DIR)/UPGR16M: upgr16m.asm\
|
|||
$(AS) $(AFLAGS) --raw=$@ $<
|
||||
|
||||
$(BUILD_DIR)/UPGRZX2: upgr32m.asm\
|
||||
zxuno.def\
|
||||
esxdos.def\
|
||||
$(INC_DIR)/zxuno.def\
|
||||
$(INC_DIR)/esxdos.def\
|
||||
Print.inc\
|
||||
wrflsh.inc\
|
||||
rst28.inc\
|
||||
|
|
@ -136,8 +137,8 @@ $(BUILD_DIR)/UPGRZX2: upgr32m.asm\
|
|||
rm -f upgr32m.def
|
||||
|
||||
$(BUILD_DIR)/UPGRZXD: upgr32m.asm\
|
||||
zxuno.def\
|
||||
esxdos.def\
|
||||
$(INC_DIR)/zxuno.def\
|
||||
$(INC_DIR)/esxdos.def\
|
||||
Print.inc\
|
||||
wrflsh.inc\
|
||||
rst28.inc\
|
||||
|
|
@ -147,8 +148,8 @@ $(BUILD_DIR)/UPGRZXD: upgr32m.asm\
|
|||
rm -f upgr32m.def
|
||||
|
||||
$(BUILD_DIR)/UPGRADE: upgrade.asm\
|
||||
zxuno.def\
|
||||
esxdos.def\
|
||||
$(INC_DIR)/zxuno.def\
|
||||
$(INC_DIR)/esxdos.def\
|
||||
Print.inc\
|
||||
wrflsh.inc\
|
||||
rst28.inc\
|
||||
|
|
|
|||
Loading…
Reference in New Issue