2020-07-22 04:47:25 +00:00
|
|
|
#include <conio.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
#include "ram2e.h"
|
|
|
|
#include "ram2gs.h"
|
|
|
|
|
|
|
|
int main(void)
|
|
|
|
{
|
|
|
|
// First clear screen
|
|
|
|
clrscr();
|
|
|
|
|
|
|
|
// Check machine type
|
|
|
|
switch ((get_ostype() & 0xF0)) {
|
|
|
|
case APPLE_IIE:
|
|
|
|
ram2e_main();
|
2020-08-03 01:34:56 +00:00
|
|
|
// Set RAMWorks bank to 0
|
|
|
|
__asm__("lda #0");
|
|
|
|
__asm__("sta $C073");
|
2020-09-06 04:00:30 +00:00
|
|
|
return EXIT_SUCCESS;
|
2020-07-22 04:47:25 +00:00
|
|
|
case APPLE_IIGS:
|
2020-09-06 04:00:30 +00:00
|
|
|
ram2gs_main();
|
|
|
|
return EXIT_SUCCESS;
|
2020-07-22 04:47:25 +00:00
|
|
|
default:
|
|
|
|
// If not on IIe or IIgs, show an error message and quit
|
2020-09-06 02:45:23 +00:00
|
|
|
cputsxy(0, 8, " THIS PROGRAM REQUIRES APPLE IIE OR IIGS");
|
|
|
|
cputsxy(0, 10, " PRESS ANY KEY TO QUIT.");
|
2020-07-22 04:47:25 +00:00
|
|
|
cgetc(); // Wait for key
|
|
|
|
clrscr(); // Clear screen before quitting
|
2020-09-06 04:00:30 +00:00
|
|
|
return EXIT_SUCCESS;
|
2020-09-06 02:45:23 +00:00
|
|
|
}
|
2020-07-22 04:47:25 +00:00
|
|
|
}
|