Fixed reset and menu bugs introduced in previous commits
This commit is contained in:
parent
312cba4375
commit
75c06e1ccd
BIN
bin/GWRAM.dbg.po
BIN
bin/GWRAM.dbg.po
Binary file not shown.
BIN
bin/GWRAM.po
BIN
bin/GWRAM.po
Binary file not shown.
6
main.c
6
main.c
|
@ -17,14 +17,16 @@ int main(void)
|
||||||
// Set RAMWorks bank to 0
|
// Set RAMWorks bank to 0
|
||||||
__asm__("lda #0");
|
__asm__("lda #0");
|
||||||
__asm__("sta $C073");
|
__asm__("sta $C073");
|
||||||
|
return EXIT_SUCCESS;
|
||||||
case APPLE_IIGS:
|
case APPLE_IIGS:
|
||||||
ram2gs_main();
|
ram2gs_main();
|
||||||
|
return EXIT_SUCCESS;
|
||||||
default:
|
default:
|
||||||
// If not on IIe or IIgs, show an error message and quit
|
// If not on IIe or IIgs, show an error message and quit
|
||||||
cputsxy(0, 8, " THIS PROGRAM REQUIRES APPLE IIE OR IIGS");
|
cputsxy(0, 8, " THIS PROGRAM REQUIRES APPLE IIE OR IIGS");
|
||||||
cputsxy(0, 10, " PRESS ANY KEY TO QUIT.");
|
cputsxy(0, 10, " PRESS ANY KEY TO QUIT.");
|
||||||
cgetc(); // Wait for key
|
cgetc(); // Wait for key
|
||||||
clrscr(); // Clear screen before quitting
|
clrscr(); // Clear screen before quitting
|
||||||
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
return EXIT_SUCCESS;
|
|
||||||
}
|
}
|
||||||
|
|
1
ram2e.c
1
ram2e.c
|
@ -346,6 +346,7 @@ int ram2e_main(void)
|
||||||
gwcputsxy(1, 8, "RAM2E settings reset successfully.");
|
gwcputsxy(1, 8, "RAM2E settings reset successfully.");
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
continue;
|
||||||
} default: reset_count = 0; continue;
|
} default: reset_count = 0; continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
1
ram2gs.c
1
ram2gs.c
|
@ -113,6 +113,7 @@ int ram2gs_main(void)
|
||||||
gwcputsxy(1, 8, "RAM2GS settings reset successfully.");
|
gwcputsxy(1, 8, "RAM2GS settings reset successfully.");
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
continue;
|
||||||
} default: reset_count = 0; continue;
|
} default: reset_count = 0; continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,71 @@
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <conio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include "util.h"
|
||||||
|
#include "gwconio.h"
|
||||||
|
#include "ramtestpat.c"
|
||||||
|
|
||||||
|
#define TEST_SIZE 8*1024*1024
|
||||||
|
|
||||||
|
char test_run() {
|
||||||
|
// Put copy stub in low RAM
|
||||||
|
for (uint32_t a = 0; a < TEST_SIZE) {
|
||||||
|
wr(a, getpat(a));
|
||||||
|
}
|
||||||
|
|
||||||
|
for (uint32_t a = 0; a < TEST_SIZE) {
|
||||||
|
char d = rd(a);
|
||||||
|
if (d != getpat(a)) { return -1; }
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline char getpat(uint32_t a) {
|
||||||
|
return ramtestpat[a % RAMTESTPAT_SIZE];
|
||||||
|
}
|
||||||
|
|
||||||
|
static char rd(uint32_t a) {
|
||||||
|
uint16_t al = a & 0xFFFF;
|
||||||
|
if (al < 0x0200) { return rd_zplc(a); }
|
||||||
|
else if (al < 0xC000) { return rd_mid(a); }
|
||||||
|
else if (al < 0xD000) { return rd_lc2(a); }
|
||||||
|
else { return rd_zplc(a); }
|
||||||
|
}
|
||||||
|
|
||||||
|
static char rd_zplc(uint32_t a) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static char rd_mid(uint32_t a) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static char rd_lc2(uint32_t a) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static char wr(uint32_t a, char d) {
|
||||||
|
uint16_t al = a & 0xFFFF;
|
||||||
|
if (al < 0x0200) { wr_zplc(a, d); }
|
||||||
|
else if (al < 0xC000) { wr_mid(a, d); }
|
||||||
|
else if (al < 0xD000) { wr_lc2(a, d); }
|
||||||
|
else { wr_zplc(a, d); }
|
||||||
|
}
|
||||||
|
|
||||||
|
static char rd_zplc(uint32_t a) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static char rd_mid(uint32_t a) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static char rd_lc2(uint32_t a) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue