From 583cb05cb4c8c302d17d2eedb5a3ff1cbbae89bd Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 6 Sep 2005 01:20:01 +0000 Subject: Completely revisited C64 opcodes table. Matched with disassembly. Most differences in opcodes is 16bits -> 8bits operands. Instead of duplicating code I just overload getVarOrDirectWord() and fetchScriptWord(). Saves considerable amount of code. At the moment reference is descumm. I.e. I modified the utility and later fixed script_c64.cpp. So there could be mistakes, though I doublechecked it. Best is to test it with real scripts. Difference in opcodes is so big that I wonder how it worked so well before, though we tried just few scripts. svn-id: r18778 --- scumm/intern.h | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) (limited to 'scumm/intern.h') diff --git a/scumm/intern.h b/scumm/intern.h index a846637d6c..7d638a70aa 100644 --- a/scumm/intern.h +++ b/scumm/intern.h @@ -403,45 +403,41 @@ protected: virtual void executeOpcode(byte i); virtual const char *getOpcodeDesc(byte i); - virtual void ifStateCommon(byte type); - virtual void ifNotStateCommon(byte type); - virtual void setStateCommon(byte type); - virtual void clearStateCommon(byte type); + virtual int getVarOrDirectWord(byte mask); + virtual uint fetchScriptWord(); - /* Version 2 script opcodes */ + /* Version C64 script opcodes */ void o_isGreaterEqual(); - void o_stopScript(); - void o_getDist(); - void o_isNotEqual(); + void o_stopCurrentScript(); void o_loadSound(); void o_animateActor(); void o_putActorAtObject(); void o_unknown13(); void o_clearState08(); - void o_move(); void o_loadActor(); - void o_freezeScript(); - void o_walkActorToObject(); - void o_isLessEqual(); - void o_subtract(); - void o_isLess(); - void o_increment(); - void o_isEqual(); void o_loadRoom(); + void o_freezeScript(); void o_loadScript(); void o_unknown4D(); - void o_unknown53(); - void o_add(); void o_cursorCommand(); void o_lights(); - void o_getObjectOwner(); - void o_isGreater(); void o_pickupObject(); void o_unknown93(); void o_setState08(); void o_unfreezeScript(); void o_decrement(); void o_badOpcode(); + void o_nop(); + void o_getActorBitVar(); + void o_setActorBitVar(); + void o_unknown1(); + void o_unknown2(); + void o_unknown3(); + void o_getClosestObjActor(); + void o_askDisk(); + void o_printEgo_c64(); + void o_print_c64(); + void o_unknownCD(); }; class ScummEngine_v6 : public ScummEngine { -- cgit v1.2.3