OSDN Git Service

vram mirroring が正しくとれないバグを修正
[unagi/old-svn-converted.git] / client / trunk / anago / anago_cui.c
index eb82d03..a09724a 100644 (file)
@@ -10,6 +10,7 @@
 #include "romimage.h"
 #include "reader_master.h"
 #include "reader_kazzo.h"
+#include "reader_dummy.h"
 #include "script_dump.h"
 #include "flash_device.h"
 #include "script_program.h"
@@ -88,12 +89,8 @@ static void program(int c, wgChar **v, const struct reader_driver *r)
        config.cpu.access = &r->cpu;
        config.ppu.access = &r->ppu;
        config.compare = false;
-       config.testrun = false;
        switch(v[1][0]){
-       case 'a':
-               config.testrun = true;
-               break;
-       case 'F':
+       case wgT('F'): case wgT('X'):
                config.compare = true;
                break;
        }
@@ -152,7 +149,7 @@ static void dump(int c, wgChar **v, const struct reader_driver *r)
        config.ppu.increase = 1;
        config.progress = true;
        switch(v[1][0]){
-       case wgT('d'):
+       case wgT('d'): case wgT('z'):
                config.mode = MODE_ROM_DUMP;
                break;
        case wgT('D'):
@@ -222,12 +219,18 @@ static void usage(const wgChar *v)
 {
        PUTS(wgT("famicom bus simluator 'anago'"));
        PRINTF(wgT("%s [mode] [script] [target] ....\n"), v);
+       PUTS(wgT("d - ROM dump with kazzo"));
+       PUTS(wgT("fF- flash program with kazzo"));
+       PUTS(wgT("r - workram read with kazzo"));
+       PUTS(wgT("w - workram write with kazzo"));
+       if(DEBUG == 1){
+               PUTS(wgT("z - ROM dump for test"));
+               PUTS(wgT("xX- flash program for test"));
+               PUTS(wgT("R - workram read for test"));
+               PUTS(wgT("W - workram write for test"));
+       }
 }
 
-#if DEBUG==1
-extern const struct reader_driver DRIVER_DUMMY;
-#endif
-
 #ifdef WIN32
 int main(int c, char **vv)
 #else
@@ -248,17 +251,13 @@ int anago_cui(int c, wgChar **v)
                }
 #endif
                switch(v[1][0]){
-#if DEBUG==1
-               case wgT('x'):
+               case wgT('x'): case wgT('X'):
                        r = &DRIVER_DUMMY; //though down
-#endif
                case wgT('f'): case wgT('F'):
                        program(c, v, r);
                        break;
-#if DEBUG==1
                case wgT('z'): case wgT('R'): case wgT('W'): 
                        r = &DRIVER_DUMMY; //though down
-#endif
                case wgT('d'): case wgT('D'):
                case wgT('r'): case wgT('w'):
                        dump(c,v, r);