mirror of https://github.com/zxdos/zxuno.git
Añado bin2hex.c
This commit is contained in:
parent
df90cde9fb
commit
adb347b94d
|
@ -0,0 +1,31 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
int main (int argc, char *argv[]){
|
||||
FILE *f;
|
||||
unsigned char *scr;
|
||||
char nombre[256];
|
||||
int i,leido;
|
||||
|
||||
if (argc<2)
|
||||
return 1;
|
||||
|
||||
scr = (unsigned char *) malloc(65536);
|
||||
f = fopen (argv[1],"rb");
|
||||
if (!f)
|
||||
return 1;
|
||||
|
||||
leido = fread (scr, 1, 65536, f);
|
||||
fclose (f);
|
||||
|
||||
strcpy (nombre, argv[1]);
|
||||
nombre[strlen(nombre)-3]=0;
|
||||
strcat (nombre, "hex");
|
||||
|
||||
f = fopen (nombre, "wt");
|
||||
for (i=0;i<leido;i++)
|
||||
fprintf (f, "%.2X\n", scr[i]);
|
||||
fclose(f);
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,3 +1,5 @@
|
|||
sjasmplus firmware.asm
|
||||
zx7b firmware_strings.rom firmware.rom.zx7b
|
||||
sjasmplus firmloader.asm
|
||||
bin2hex firmloader.rom
|
||||
copy /y firmloader.hex ..\cores\Spectrum\firmloader_hex.txt
|
|
@ -1,4 +1,5 @@
|
|||
include version.asm
|
||||
define w25q80 0
|
||||
define recovery 0
|
||||
output firmware_strings.rom
|
||||
macro wreg dir, dato
|
||||
|
@ -1797,8 +1798,12 @@ putc0 inc hl
|
|||
|
||||
sdtab defw $0020, $0040
|
||||
defw $0040, $0080
|
||||
defw $4000, $0000
|
||||
defw $0540;, $0580
|
||||
IF w25q80=0
|
||||
defw $4000
|
||||
ELSE
|
||||
defw $1000
|
||||
ENDIF
|
||||
defw $0000, $0540
|
||||
|
||||
include sd.asm
|
||||
|
||||
|
|
|
@ -22,11 +22,12 @@ call :CreateMachine CORE9 "NES (VGA)" NES\xilinx\nes_zxuno.%2.bit 0 %3
|
|||
copy /y rom_binaries\esxdos.rom sd_binaries\ESXDOS.%3
|
||||
copy /y firmware.rom sd_binaries\FIRMWARE.%3
|
||||
GenRom 0 sm1t BIOS firmware.rom core_taps\FIRMWARE.TAP
|
||||
rem CgLeches core_taps\FIRMWARE.TAP core_wavs\FIRMWARE.WAV 4
|
||||
GenRom 0 0 ESXDOS rom_binaries\esxdos.rom core_taps\ESXDOS.TAP
|
||||
call :CreateRom 0 "ZX Spectrum 48K" 48 dn lh17
|
||||
call :CreateRom 1 "ZX +2A 4.1" plus3en41 t 0
|
||||
call :CreateRom 5 "SE Basic IV 4.0 Anya" se d h1
|
||||
call :CreateRom 7 "ZX Spectrum 48K Cargando Leches" leches dn lh
|
||||
call :CreateRom 7 "ZX Spectrum 48K Cargando Leches" leches d lh
|
||||
AddItem ROM 8 rom_taps\rooted.tap
|
||||
call :CreateRom 9 "Inves Spectrum+" inves 0 lh17
|
||||
call :CreateRom 10 "Zx Spectrum +2" plus2en t h1
|
||||
|
|
|
@ -3,6 +3,17 @@
|
|||
inirea push hl
|
||||
push bc
|
||||
reinit call mmcinit
|
||||
; push af
|
||||
; ld a, SET_BLOCKLEN
|
||||
; call cs_low
|
||||
; out (c), a
|
||||
; out (c), 0
|
||||
; out (c), 0
|
||||
; ld a, 2
|
||||
; out (c), a
|
||||
; call send1z
|
||||
; call cs_high
|
||||
; pop af
|
||||
pop bc
|
||||
pop hl
|
||||
ret nz
|
||||
|
|
Loading…
Reference in New Issue