From ed3b666893d4754c87bbd4cb1e41bf7d7dac5bfb Mon Sep 17 00:00:00 2001 From: sato_tiff Date: Fri, 12 Dec 2008 05:15:44 +0000 Subject: [PATCH] =?utf8?q?debug=20=E6=99=82=E3=81=AB=20PPU=5FWRITE=20?= =?utf8?q?=E3=82=92=E5=BE=A9=E6=B4=BB,=20=E5=A4=89=E6=95=B0=E5=B1=95?= =?utf8?q?=E9=96=8B=E4=BB=98=E3=81=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit git-svn-id: svn+ssh://svn.osdn.net/svnroot/unagi@169 24ea1065-a21e-4ca1-99c9-f5125deb0858 --- client/trunk/reader_hongkongfc.c | 5 +++-- client/trunk/script.c | 16 +++++++++++----- client/trunk/syntax.h | 6 +++--- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/client/trunk/reader_hongkongfc.c b/client/trunk/reader_hongkongfc.c index b079be5..92ff723 100644 --- a/client/trunk/reader_hongkongfc.c +++ b/client/trunk/reader_hongkongfc.c @@ -279,11 +279,12 @@ W29C020 During the byte-load cycle, the addresses are latched by the falling edge of either CE or WE,whichever occurs last. The data are latched by the rising edge of either CE or WE, whicheveroccurs first. -*/ -/* W49F002 #CS or #WE ¤¬¹ß¤ê¤¿¤È¤­¤Ë address latch #CS or #WE ¤¬¾å¤¬¤Ã¤¿¤È¤­¤Ë data latch + +hongkong ·Ï¤Ï address ¤È /ROMCS ¤¬Æ±¤¸¥Ð¥¤¥È¤Ç¡¢ /CS À©¸æ¤Ë¤¹¤ë¤È +hongkong ¥Ç¡¼¥¿Ç˲õ+¥¢¥É¥ì¥¹ÉÔ°ÂÄê¤Ë¤Ê¤ë¤Î¤Ç¡¢/WE À©¸æ¤Ë¤·¤Ê¤¤¤ÈÆ°¤«¤Ê¤¤¡£ */ c = bit_clear(c, BITNUM_WRITEDATA_OUTPUT); //CS down diff --git a/client/trunk/script.c b/client/trunk/script.c index bf1260a..50a5565 100644 --- a/client/trunk/script.c +++ b/client/trunk/script.c @@ -33,7 +33,6 @@ todo: #include "header.h" #include "script.h" -#define OP_PPU_WRITE_ENABLE (0) /* MAPPER num MIRROR [HV] @@ -708,11 +707,15 @@ static int logical_check(const struct script *s, const struct st_config *c, stru } break; case SCRIPT_OPCODE_PPU_WRITE:{ - if(OP_PPU_WRITE_ENABLE==0){ + if(DEBUG==0){ break; } const long address = s->value[0]; - const long data = s->value[1]; + long data; + if(expression_calc(&s->expression, &data) == NG){ + printf("%s expression calc error\n", LOGICAL_ERROR_PREFIX); + error += 1; + } setting = DUMP; if(!is_region_ppurom(address)){ logical_print_illgalarea(STR_REGION_PPU, address); @@ -721,6 +724,7 @@ static int logical_check(const struct script *s, const struct st_config *c, stru logical_print_byteerror(STR_REGION_PPU, data); error += 1; } + setting = DUMP; } break; case SCRIPT_OPCODE_STEP_START:{ @@ -1026,8 +1030,10 @@ static int execute(const struct script *s, const struct st_config *c, struct rom } break; case SCRIPT_OPCODE_PPU_WRITE: - if(OP_PPU_WRITE_ENABLE == 1){ - d->ppu_write(s->value[0], s->value[1]); + if(DEBUG == 1){ + long data; + expression_calc(&s->expression, &data); + d->ppu_write(s->value[0], data); } break; case SCRIPT_OPCODE_STEP_START: diff --git a/client/trunk/syntax.h b/client/trunk/syntax.h index f6238be..e981097 100644 --- a/client/trunk/syntax.h +++ b/client/trunk/syntax.h @@ -193,13 +193,13 @@ static const struct script_syntax SCRIPT_SYNTAX[] = { argc: 2, compare: SYNTAX_COMPARE_EQ, argv_type: ARGV_TYPE_ADDRESS_LENGTH }, -#if OP_PPU_WRITE_ENABLE==1 +#if DEBUG==1 { name: "PPU_WRITE", script_opcode: SCRIPT_OPCODE_PPU_WRITE, permittion: PERMITTION_ROM_DUMP | PERMITTION_ROM_PROGRAM, - argc: 2, compare: SYNTAX_COMPARE_EQ, - argv_type: ARGV_TYPE_ADDRESS_LENGTH + argc: 2, compare: SYNTAX_COMPARE_GT, + argv_type: ARGV_TYPE_ADDRESS_EXPRESSION }, #endif #if 0 -- 2.11.0