summaryrefslogtreecommitdiff
path: root/uuu-sdl.c
diff options
context:
space:
mode:
authorSegher Boessenkool <segher@kernel.crashing.org>2009-02-07 23:07:52 +0100
committerSegher Boessenkool <segher@kernel.crashing.org>2009-02-07 23:07:52 +0100
commitfd6d41de918068f462f791081ac3d69a83086b39 (patch)
tree75ed44b576cb968894e7499e8ebe3d28526b5b44 /uuu-sdl.c
parentf8aaee0559e836655c92c47b22852246e8e82d58 (diff)
Get rid of all_the_mem[]; instead, read from file on switch_bank()
Diffstat (limited to 'uuu-sdl.c')
-rw-r--r--uuu-sdl.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/uuu-sdl.c b/uuu-sdl.c
index a736faf..e61bb99 100644
--- a/uuu-sdl.c
+++ b/uuu-sdl.c
@@ -27,7 +27,6 @@ void CGSReleaseObj(int);
int main(int argc, char *argv[])
{
FILE *in;
- u32 i, n;
#ifdef __APPLE__
if (argc == 1) {
@@ -47,17 +46,9 @@ int main(int argc, char *argv[])
perror("Cannot read ROM file");
exit(1);
}
+ rom_file = in;
- n = fread(all_the_mem, 2, 4*N_MEM, in);
-
- fclose(in);
-
-// gross, but whatever. one day i'll fix this, but not today
-#ifdef _BIG_ENDIAN
- for (i = 0; i < n; i++)
- all_the_mem[i] = (all_the_mem[i] << 8) | (all_the_mem[i] >> 8);
-#endif
-
+ read_rom(0);
platform_init();
#ifdef __APPLE__