Files used with EPROM Emulator

This commit is contained in:
Kris Sekula 2022-12-05 02:02:17 -08:00 committed by GitHub
parent 6a2eec95c0
commit 379f227105
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 6291 additions and 0 deletions

BIN
WithEMU/check Normal file

Binary file not shown.

52
WithEMU/check.c Normal file
View File

@ -0,0 +1,52 @@
/* Based on https://github.com/TheCodeman/Nabu_PC */
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
if( argc == 2 ) {
printf("Patching file %s\n", argv[1]);
}
else {
printf("Filename expected...\n");
exit(1);
}
FILE *fp;
uint16_t check=0;
uint16_t index=0;
uint8_t c=0;
uint16_t sz;
fp=fopen(argv[1],"rb+");
fseek(fp, 0L, SEEK_END);
sz = ftell(fp);
rewind(fp);
if(sz < 4097) {
sz = 4096;
}
else {
sz = 8192;
}
printf("Filesize is %u \n\r",sz);
if(fp!=NULL) {
printf("starting\n\r");
for(index=0;index<(sz-2);index++){
fread(&c, 1,1, fp);
check+=c;
}
printf("Checksum value: %04x\n\r",check);
printf("Index value: %04x\n\r",index);
}
fseek(fp, ftell(fp), SEEK_SET);
c=check&0x00ff;
fwrite(&c, 1, 1, fp);
c=(check>>8);
fwrite(&c, 1, 1, fp);
fclose(fp);
printf("File %s patched\n", argv[1]);
}

BIN
WithEMU/check.exe Normal file

Binary file not shown.

6
WithEMU/compile.sh Normal file
View File

@ -0,0 +1,6 @@
printf "Compiling...."
z80asm --list=nabu_4k_new.lst nabu_4k.asm -o nabu_4k_new.bin
read -p "Press enter to patch checksum"
./check nabu_4k_new.bin
read -p "Press enter to upload"
python3 EPROM_NG_v2.0rc3.py -mem 2732 -spi y -auto n -map y nabu_4k_new.bin /dev/ttyUSB0

3115
WithEMU/nabu_4k.asm Normal file

File diff suppressed because it is too large Load Diff

BIN
WithEMU/nabu_4k_new.bin Normal file

Binary file not shown.

3118
WithEMU/nabu_4k_new.lst Normal file

File diff suppressed because it is too large Load Diff

BIN
WithEMU/original_rom4k.bin Normal file

Binary file not shown.