Actualiza GenRom y generamcs_multi

This commit is contained in:
antoniovillena 2016-07-04 23:15:13 +02:00
parent 39a686cf82
commit 4f20ac46a9
3 changed files with 40 additions and 44 deletions

View File

@ -43,47 +43,45 @@ unsigned short j, k, crc, tab[]= {
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
if( argc==1 ) if( argc==1 )
printf("\n" printf("\n"
"GenRom v0.05, generates a TAP for loading a ROM in the ZX-Uno, 2016-05-14\n\n" "GenRom v0.06, generates a TAP for loading a ROM in the ZX-Uno, 2016-07-04\n\n"
" GenRom <params1> <params2> <name> <input_file> <output_file>\n\n" " GenRom <params> <name> <input_file> <output_file>\n\n"
" <params1> Set 5 flags parameters, combinable\n" " <params> Set 13 flags parameters, combinable\n"
" 0 Default values Issue3, Tim48K, Contended, Disabled Div & NMI\n" " 0 MODE=00, I2KB=DISCONT=DIVEN=DISNMI=0\n"
" DISD=ENMMU=DIROM1F=DIROM7F=DI1FFD=DI7FFD=DITAY=DIAY=0\n"
" i Change Issue2\n" " i Change Issue2\n"
" t Force Timing to 128\n" " t Force Timing to 128\n"
" p Force Timing to Pentagon\n" " p Force Timing to Pentagon\n"
" c Disable Contention\n" " c Disable Contention\n"
" d Enable DivMMC paging\n" " d Enable DivMMC paging\n"
" n Enable NMI-DivMMC\n" " n Enable NMI-DivMMC\n"
" <params2> Set 8 flags parameters, combinable\n"
" 0 Default values DISD, DIFUL, DIKEMP, ENMMU, DI1FFD, DI7FFD,"
" DITAY and DIAY\n"
" s Disable SD ports (DivMMC and ZXMMC)\n" " s Disable SD ports (DivMMC and ZXMMC)\n"
" m Enable horizontal MMU in Timex Sinclair\n" " m Enable horizontal MMU in Timex Sinclair\n"
" h Disable high bit ROM (1FFD bit 2)\n" " h Disable high bit ROM (1FFD bit 2)\n"
" l Disable low bit ROM (7FFD bit 4)\n" " l Disable low bit ROM (7FFD bit 4)\n"
" 1 Disable 1FFD port (+2A/+3 memory paging)\n" " 1 Disable 1FFD port (+2A/+3 memory paging)\n"
" 7 Disable 7FFD port (128K memory paging)\n" " 7 Disable 7FFD port (128K memory paging)\n"
" t Disable second AY chip\n" " 2 Disable 2nd AY chip\n"
" a Disable main AY chip\n" " a Disable main AY chip\n"
" <name> Name between single quotes up to 32 chars\n" " <name> Name between single quotes up to 32 chars\n"
" <input_file> Input ROM file\n" " <input_file> Input ROM file\n"
" <output_file> Output TAP file\n\n" " <output_file> Output TAP file\n\n"
"All params are mandatory\n\n"), "All params are mandatory\n\n"),
exit(0); exit(0);
if( argc!=6 ) if( argc!=5 )
printf("\nInvalid number of parameters\n"), printf("\nInvalid number of parameters\n"),
exit(-1); exit(-1);
fi= fopen(argv[4], "rb"); fi= fopen(argv[3], "rb");
if( !fi ) if( !fi )
printf("\nInput file not found: %s\n", argv[4]), printf("\nInput file not found: %s\n", argv[3]),
exit(-1); exit(-1);
fseek(fi, 0, SEEK_END); fseek(fi, 0, SEEK_END);
i= ftell(fi); i= ftell(fi);
if( i&0x3fff && i!=8192 ) if( i&0x3fff && i!=8192 )
printf("\nInput file size must be multiple of 16384: %s\n", argv[4]), printf("\nInput file size must be multiple of 16384: %s\n", argv[3]),
exit(-1); exit(-1);
fo= fopen(argv[5], "wb+"); fo= fopen(argv[4], "wb+");
if( !fo ) if( !fo )
printf("\nCannot create output file: %s\n", argv[5]), printf("\nCannot create output file: %s\n", argv[4]),
exit(-1); exit(-1);
fwrite(mem, 1, 0x55, fo); fwrite(mem, 1, 0x55, fo);
j= i>>14; j= i>>14;
@ -134,6 +132,7 @@ int main(int argc, char *argv[]) {
fseek(fo, 0, SEEK_SET); fseek(fo, 0, SEEK_SET);
mem[0x4007]= j; mem[0x4007]= j;
mem[0x4008]= 0b00110000; mem[0x4008]= 0b00110000;
mem[0x4009]= 0b00000000;
for ( i= 0; i<strlen(argv[1]); i++ ) for ( i= 0; i<strlen(argv[1]); i++ )
switch( argv[1][i] ){ switch( argv[1][i] ){
case 'i': mem[0x4008]^= 0b00100000; break; case 'i': mem[0x4008]^= 0b00100000; break;
@ -141,22 +140,18 @@ int main(int argc, char *argv[]) {
case 'd': mem[0x4008]^= 0b00001000; break; case 'd': mem[0x4008]^= 0b00001000; break;
case 'n': mem[0x4008]^= 0b00000100; break; case 'n': mem[0x4008]^= 0b00000100; break;
case 'p': mem[0x4008]^= 0b00000010; break; case 'p': mem[0x4008]^= 0b00000010; break;
case 't': mem[0x4008]^= 0b00000001; case 't': mem[0x4008]^= 0b00000001; break;
}
mem[0x4009]= 0b00000000;
for ( i= 0; i<strlen(argv[2]); i++ )
switch( argv[2][i] ){
case 's': mem[0x4009]^= 0b10000000; break; case 's': mem[0x4009]^= 0b10000000; break;
case 'm': mem[0x4009]^= 0b01000000; break; case 'm': mem[0x4009]^= 0b01000000; break;
case 'h': mem[0x4009]^= 0b00100000; break; case 'h': mem[0x4009]^= 0b00100000; break;
case 'l': mem[0x4009]^= 0b00010000; break; case 'l': mem[0x4009]^= 0b00010000; break;
case '1': mem[0x4009]^= 0b00001000; break; case '1': mem[0x4009]^= 0b00001000; break;
case '7': mem[0x4009]^= 0b00000100; break; case '7': mem[0x4009]^= 0b00000100; break;
case 't': mem[0x4009]^= 0b00000010; break; case '2': mem[0x4009]^= 0b00000010; break;
case 'a': mem[0x4009]^= 0b00000001; case 'a': mem[0x4009]^= 0b00000001;
} }
for ( i= 0; i<32 && i<strlen(argv[3]); i++ ) for ( i= 0; i<32 && i<strlen(argv[2]); i++ )
mem[i+0x4006+0x32]= argv[3][i]; mem[i+0x4006+0x32]= argv[2][i];
while( ++i<33 ) while( ++i<33 )
mem[i+0x4006+0x31]= ' '; mem[i+0x4006+0x31]= ' ';
for ( checksum= 0xff, k= 0x4007; k<0x4058; ++k ) for ( checksum= 0xff, k= 0x4007; k<0x4058; ++k )

View File

@ -24,29 +24,29 @@ copy /y firmware.rom sd_binaries\FIRMWARE.%3
GenRom 0 sm1t BIOS firmware.rom core_taps\FIRMWARE.TAP GenRom 0 sm1t BIOS firmware.rom core_taps\FIRMWARE.TAP
rem CgLeches core_taps\FIRMWARE.TAP core_wavs\FIRMWARE.WAV 3 rem CgLeches core_taps\FIRMWARE.TAP core_wavs\FIRMWARE.WAV 3
GenRom 0 0 ESXDOS rom_binaries\esxdos.rom core_taps\ESXDOS.TAP GenRom 0 0 ESXDOS rom_binaries\esxdos.rom core_taps\ESXDOS.TAP
call :CreateRom 0 "ZX Spectrum 48K" 48 dn lh17 call :CreateRom 0 "ZX Spectrum 48K" 48 dnlh17
call :CreateRom 1 "ZX +2A 4.1" plus3en41 t 0 call :CreateRom 1 "ZX +2A 4.1" plus3en41 t
call :CreateRom 5 "SE Basic IV 4.0 Anya" se d h1 call :CreateRom 5 "SE Basic IV 4.0 Anya" se dh1
call :CreateRom 7 "ZX Spectrum 48K Cargando Leches" leches d lh call :CreateRom 7 "ZX Spectrum 48K Cargando Leches" leches dlh
AddItem ROM 8 rom_taps\rooted.tap AddItem ROM 8 rom_taps\rooted.tap
call :CreateRom 9 "Inves Spectrum+" inves 0 lh17 call :CreateRom 9 "Inves Spectrum+" inves lh17
call :CreateRom 10 "Zx Spectrum +2" plus2en t h1 call :CreateRom 10 "Zx Spectrum +2" plus2en th1
call :CreateRom 12 "Pentagon 128" pentagon pc h1 call :CreateRom 12 "Pentagon 128" pentagon pch1
call :CreateRom 14 "Jet Pac (1983)" JetPac 0 lh17 call :CreateRom 14 "Jet Pac (1983)" JetPac lh17
call :CreateRom 15 "Pssst (1983)" Pssst 0 lh17 call :CreateRom 15 "Pssst (1983)" Pssst lh17
call :CreateRom 16 "Cookie (1983)" Cookie 0 lh17 call :CreateRom 16 "Cookie (1983)" Cookie lh17
call :CreateRom 17 "Tranz Am (1983)" TranzAm 0 lh17 call :CreateRom 17 "Tranz Am (1983)" TranzAm lh17
call :CreateRom 18 "Master Chess (1983)" MasterChess 0 lh17 call :CreateRom 18 "Master Chess (1983)" MasterChess lh17
call :CreateRom 19 "Backgammon (1983)" Backgammon 0 lh17 call :CreateRom 19 "Backgammon (1983)" Backgammon lh17
call :CreateRom 20 "Hungry Horace (1983)" HungryHorace 0 lh17 call :CreateRom 20 "Hungry Horace (1983)" HungryHorace lh17
call :CreateRom 21 "Horace & the Spiders (1983)" HoraceSpiders 0 lh17 call :CreateRom 21 "Horace & the Spiders (1983)" HoraceSpiders lh17
call :CreateRom 22 "Planetoids (1983)" Planetoids 0 lh17 call :CreateRom 22 "Planetoids (1983)" Planetoids lh17
call :CreateRom 23 "Space Raiders (1983)" SpaceRaiders 0 lh17 call :CreateRom 23 "Space Raiders (1983)" SpaceRaiders lh17
call :CreateRom 24 "Deathchase (1983)" Deathchase 0 lh17 call :CreateRom 24 "Deathchase (1983)" Deathchase lh17
call :CreateRom 25 "Manic Miner (1983)" ManicMiner 0 lh17 call :CreateRom 25 "Manic Miner (1983)" ManicMiner lh17
call :CreateRom 26 "Misco Jones (2013)" MiscoJones 0 lh17 call :CreateRom 26 "Misco Jones (2013)" MiscoJones lh17
call :CreateRom 27 "Jet Set Willy (1984)" JetSetWilly 0 lh17 call :CreateRom 27 "Jet Set Willy (1984)" JetSetWilly lh17
call :CreateRom 28 "Lala Prologue (2010)" LalaPrologue 0 lh17 call :CreateRom 28 "Lala Prologue (2010)" LalaPrologue lh17
fcut FLASH.ZX1 006000 001041 tmp.bin fcut FLASH.ZX1 006000 001041 tmp.bin
fcut FLASH.ZX1 00c000 04c000 tmp1.bin fcut FLASH.ZX1 00c000 04c000 tmp1.bin
fcut FLASH.ZX1 34c000 0b4000 tmp2.bin fcut FLASH.ZX1 34c000 0b4000 tmp2.bin

View File

@ -38,6 +38,7 @@ start2 ld a, (hl)
call cancio call cancio
start3 ei start3 ei
halt
halt halt
di di
ld bc, 4 ld bc, 4