Path: blob/main/misc/emulator/xnes/snes9x/fxdbg.cpp
28515 views
/***********************************************************************************1Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.23(c) Copyright 1996 - 2002 Gary Henderson ([email protected]),4Jerremy Koot ([email protected])56(c) Copyright 2002 - 2004 Matthew Kendora78(c) Copyright 2002 - 2005 Peter Bortas ([email protected])910(c) Copyright 2004 - 2005 Joel Yliluoma (http://iki.fi/bisqwit/)1112(c) Copyright 2001 - 2006 John Weidman ([email protected])1314(c) Copyright 2002 - 2006 funkyass ([email protected]),15Kris Bleakley ([email protected])1617(c) Copyright 2002 - 2010 Brad Jorsch ([email protected]),18Nach ([email protected]),1920(c) Copyright 2002 - 2011 zones ([email protected])2122(c) Copyright 2006 - 2007 nitsuja2324(c) Copyright 2009 - 2011 BearOso,25OV2262728BS-X C emulator code29(c) Copyright 2005 - 2006 Dreamer Nom,30zones3132C4 x86 assembler and some C emulation code33(c) Copyright 2000 - 2003 _Demo_ ([email protected]),34Nach,35zsKnight ([email protected])3637C4 C++ code38(c) Copyright 2003 - 2006 Brad Jorsch,39Nach4041DSP-1 emulator code42(c) Copyright 1998 - 2006 _Demo_,43Andreas Naive ([email protected]),44Gary Henderson,45Ivar ([email protected]),46John Weidman,47Kris Bleakley,48Matthew Kendora,49Nach,50neviksti ([email protected])5152DSP-2 emulator code53(c) Copyright 2003 John Weidman,54Kris Bleakley,55Lord Nightmare ([email protected]),56Matthew Kendora,57neviksti5859DSP-3 emulator code60(c) Copyright 2003 - 2006 John Weidman,61Kris Bleakley,62Lancer,63z80 gaiden6465DSP-4 emulator code66(c) Copyright 2004 - 2006 Dreamer Nom,67John Weidman,68Kris Bleakley,69Nach,70z80 gaiden7172OBC1 emulator code73(c) Copyright 2001 - 2004 zsKnight,74pagefault ([email protected]),75Kris Bleakley76Ported from x86 assembler to C by sanmaiwashi7778SPC7110 and RTC C++ emulator code used in 1.39-1.5179(c) Copyright 2002 Matthew Kendora with research by80zsKnight,81John Weidman,82Dark Force8384SPC7110 and RTC C++ emulator code used in 1.52+85(c) Copyright 2009 byuu,86neviksti8788S-DD1 C emulator code89(c) Copyright 2003 Brad Jorsch with research by90Andreas Naive,91John Weidman9293S-RTC C emulator code94(c) Copyright 2001 - 2006 byuu,95John Weidman9697ST010 C++ emulator code98(c) Copyright 2003 Feather,99John Weidman,100Kris Bleakley,101Matthew Kendora102103Super FX x86 assembler emulator code104(c) Copyright 1998 - 2003 _Demo_,105pagefault,106zsKnight107108Super FX C emulator code109(c) Copyright 1997 - 1999 Ivar,110Gary Henderson,111John Weidman112113Sound emulator code used in 1.5-1.51114(c) Copyright 1998 - 2003 Brad Martin115(c) Copyright 1998 - 2006 Charles Bilyue'116117Sound emulator code used in 1.52+118(c) Copyright 2004 - 2007 Shay Green ([email protected])119120SH assembler code partly based on x86 assembler code121(c) Copyright 2002 - 2004 Marcus Comstedt ([email protected])1221232xSaI filter124(c) Copyright 1999 - 2001 Derek Liauw Kie Fa125126HQ2x, HQ3x, HQ4x filters127(c) Copyright 2003 Maxim Stepin ([email protected])128129NTSC filter130(c) Copyright 2006 - 2007 Shay Green131132GTK+ GUI code133(c) Copyright 2004 - 2011 BearOso134135Win32 GUI code136(c) Copyright 2003 - 2006 blip,137funkyass,138Matthew Kendora,139Nach,140nitsuja141(c) Copyright 2009 - 2011 OV2142143Mac OS GUI code144(c) Copyright 1998 - 2001 John Stiles145(c) Copyright 2001 - 2011 zones146147148Specific ports contains the works of other authors. See headers in149individual files.150151152Snes9x homepage: http://www.snes9x.com/153154Permission to use, copy, modify and/or distribute Snes9x in both binary155and source form, for non-commercial purposes, is hereby granted without156fee, providing that this license information and copyright notice appear157with all copies and any derived work.158159This software is provided 'as-is', without any express or implied160warranty. In no event shall the authors be held liable for any damages161arising from the use of this software or it's derivatives.162163Snes9x is freeware for PERSONAL USE only. Commercial users should164seek permission of the copyright holders first. Commercial use includes,165but is not limited to, charging money for Snes9x or software derived from166Snes9x, including Snes9x or derivatives in commercial game bundles, and/or167using Snes9x as a promotion for your commercial product.168169The copyright holders request that bug fixes and improvements to the code170should be forwarded to them so everyone can benefit from the modifications171in future versions.172173Super NES and Super Nintendo Entertainment System are trademarks of174Nintendo Co., Limited and its subsidiary companies.175***********************************************************************************/176177178#ifdef DEBUGGER179180#include "snes9x.h"181#include "fxinst.h"182#include "fxemu.h"183184/*185When printing a line from the pipe, it could look like this:18618701:8006 f4 fb 86 iwt r4, #$86fb188189The values are:190program bank : 01191adress : 8006192values at memory address 8006 : f4 fb 86193instruction in the pipe : iwt r4, #$86fb194195Note! If the instruction has more than one byte (like in 'iwt') and the instruction is in a delay slot,196the second and third byte displayed will not be the same as those used.197Since the instrction is in a delay slot,198the first byte of the instruction will be taken from the pipe at the address after the branch instruction,199and the next one or two bytes will be taken from the address that the branch points to.200This is a bit complicated, but I've taken this into account, in this debug function.201(See the diffrence of how the values vPipe1 and vPipe2 are read, compared to the values vByte1 and vByte2)202*/203204/*205static const char *fx_apvMnemonicTable[] =206{207// ALT0 Table208209// 00 - 0f210"stop",211"nop",212"cache",213"lsr",214"rol",215"bra $%04x",216"blt $%04x",217"bge $%04x",218"bne $%04x",219"beq $%04x",220"bpl $%04x",221"bmi $%04x",222"bcc $%04x",223"bcs $%04x",224"bvc $%04x",225"bvs $%04x",226227// 10 - 1f228"to r0",229"to r1",230"to r2",231"to r3",232"to r4",233"to r5",234"to r6",235"to r7",236"to r8",237"to r9",238"to r10",239"to r11",240"to r12",241"to r13",242"to r14",243"to r15",244245// 20 - 2f246"with r0",247"with r1",248"with r2",249"with r3",250"with r4",251"with r5",252"with r6",253"with r7",254"with r8",255"with r9",256"with r10",257"with r11",258"with r12",259"with r13",260"with r14",261"with r15",262263// 30 - 3f264"stw (r0)",265"stw (r1)",266"stw (r2)",267"stw (r3)",268"stw (r4)",269"stw (r5)",270"stw (r6)",271"stw (r7)",272"stw (r8)",273"stw (r9)",274"stw (r10)",275"stw (r11)",276"loop",277"alt1",278"alt2",279"alt3",280281// 40 - 4f282"ldw (r0)",283"ldw (r1)",284"ldw (r2)",285"ldw (r3)",286"ldw (r4)",287"ldw (r5)",288"ldw (r6)",289"ldw (r7)",290"ldw (r8)",291"ldw (r9)",292"ldw (r10)",293"ldw (r11)",294"plot",295"swap",296"color",297"not",298299// 50 - 5f300"add r0",301"add r1",302"add r2",303"add r3",304"add r4",305"add r5",306"add r6",307"add r7",308"add r8",309"add r9",310"add r10",311"add r11",312"add r12",313"add r13",314"add r14",315"add r15",316317// 60 - 6f318"sub r0",319"sub r1",320"sub r2",321"sub r3",322"sub r4",323"sub r5",324"sub r6",325"sub r7",326"sub r8",327"sub r9",328"sub r10",329"sub r11",330"sub r12",331"sub r13",332"sub r14",333"sub r15",334335// 70 - 7f336"merge",337"and r1",338"and r2",339"and r3",340"and r4",341"and r5",342"and r6",343"and r7",344"and r8",345"and r9",346"and r10",347"and r11",348"and r12",349"and r13",350"and r14",351"and r15",352353// 80 - 8f354"mult r0",355"mult r1",356"mult r2",357"mult r3",358"mult r4",359"mult r5",360"mult r6",361"mult r7",362"mult r8",363"mult r9",364"mult r10",365"mult r11",366"mult r12",367"mult r13",368"mult r14",369"mult r15",370371// 90 - 9f372"sbk",373"link #1",374"link #2",375"link #3",376"link #4",377"sex",378"asr",379"ror",380"jmp (r8)",381"jmp (r9)",382"jmp (r10)",383"jmp (r11)",384"jmp (r12)",385"jmp (r13)",386"lob",387"fmult",388389// a0 - af390"ibt r0, #$%02x",391"ibt r1, #$%02x",392"ibt r2, #$%02x",393"ibt r3, #$%02x",394"ibt r4, #$%02x",395"ibt r5, #$%02x",396"ibt r6, #$%02x",397"ibt r7, #$%02x",398"ibt r8, #$%02x",399"ibt r9, #$%02x",400"ibt r10, #$%02x",401"ibt r11, #$%02x",402"ibt r12, #$%02x",403"ibt r13, #$%02x",404"ibt r14, #$%02x",405"ibt r15, #$%02x",406407// b0 - bf408"from r0",409"from r1",410"from r2",411"from r3",412"from r4",413"from r5",414"from r6",415"from r7",416"from r8",417"from r9",418"from r10",419"from r11",420"from r12",421"from r13",422"from r14",423"from r15",424425// c0 - cf426"hib",427"or r1",428"or r2",429"or r3",430"or r4",431"or r5",432"or r6",433"or r7",434"or r8",435"or r9",436"or r10",437"or r11",438"or r12",439"or r13",440"or r14",441"or r15",442443// d0 - df444"inc r0",445"inc r1",446"inc r2",447"inc r3",448"inc r4",449"inc r5",450"inc r6",451"inc r7",452"inc r8",453"inc r9",454"inc r10",455"inc r11",456"inc r12",457"inc r13",458"inc r14",459"getc",460461// e0 - ef462"dec r0",463"dec r1",464"dec r2",465"dec r3",466"dec r4",467"dec r5",468"dec r6",469"dec r7",470"dec r8",471"dec r9",472"dec r10",473"dec r11",474"dec r12",475"dec r13",476"dec r14",477"getb",478479// f0 - ff480"iwt r0, #$%04x",481"iwt r1, #$%04x",482"iwt r2, #$%04x",483"iwt r3, #$%04x",484"iwt r4, #$%04x",485"iwt r5, #$%04x",486"iwt r6, #$%04x",487"iwt r7, #$%04x",488"iwt r8, #$%04x",489"iwt r9, #$%04x",490"iwt r10, #$%04x",491"iwt r11, #$%04x",492"iwt r12, #$%04x",493"iwt r13, #$%04x",494"iwt r14, #$%04x",495"iwt r15, #$%04x",496497// ALT1 Table498499// 00 - 0f500"stop",501"nop",502"cache",503"lsr",504"rol",505"bra $%04x",506"blt $%04x",507"bge $%04x",508"bne $%04x",509"beq $%04x",510"bpl $%04x",511"bmi $%04x",512"bcc $%04x",513"bcs $%04x",514"bvc $%04x",515"bvs $%04x",516517// 10 - 1f518"to r0",519"to r1",520"to r2",521"to r3",522"to r4",523"to r5",524"to r6",525"to r7",526"to r8",527"to r9",528"to r10",529"to r11",530"to r12",531"to r13",532"to r14",533"to r15",534535// 20 - 2f536"with r0",537"with r1",538"with r2",539"with r3",540"with r4",541"with r5",542"with r6",543"with r7",544"with r8",545"with r9",546"with r10",547"with r11",548"with r12",549"with r13",550"with r14",551"with r15",552553// 30 - 3f554"stb (r0)",555"stb (r1)",556"stb (r2)",557"stb (r3)",558"stb (r4)",559"stb (r5)",560"stb (r6)",561"stb (r7)",562"stb (r8)",563"stb (r9)",564"stb (r10)",565"stb (r11)",566"loop",567"alt1",568"alt2",569"alt3",570571// 40 - 4f572"ldb (r0)",573"ldb (r1)",574"ldb (r2)",575"ldb (r3)",576"ldb (r4)",577"ldb (r5)",578"ldb (r6)",579"ldb (r7)",580"ldb (r8)",581"ldb (r9)",582"ldb (r10)",583"ldb (r11)",584"rpix",585"swap",586"cmode",587"not",588589// 50 - 5f590"adc r0",591"adc r1",592"adc r2",593"adc r3",594"adc r4",595"adc r5",596"adc r6",597"adc r7",598"adc r8",599"adc r9",600"adc r10",601"adc r11",602"adc r12",603"adc r13",604"adc r14",605"adc r15",606607// 60 - 6f608"sbc r0",609"sbc r1",610"sbc r2",611"sbc r3",612"sbc r4",613"sbc r5",614"sbc r6",615"sbc r7",616"sbc r8",617"sbc r9",618"sbc r10",619"sbc r11",620"sbc r12",621"sbc r13",622"sbc r14",623"sbc r15",624625// 70 - 7f626"merge",627"bic r1",628"bic r2",629"bic r3",630"bic r4",631"bic r5",632"bic r6",633"bic r7",634"bic r8",635"bic r9",636"bic r10",637"bic r11",638"bic r12",639"bic r13",640"bic r14",641"bic r15",642643// 80 - 8f644"umult r0",645"umult r1",646"umult r2",647"umult r3",648"umult r4",649"umult r5",650"umult r6",651"umult r7",652"umult r8",653"umult r9",654"umult r10",655"umult r11",656"umult r12",657"umult r13",658"umult r14",659"umult r15",660661// 90 - 9f662"sbk",663"link #1",664"link #2",665"link #3",666"link #4",667"sex",668"div2",669"ror",670"ljmp (r8)",671"ljmp (r9)",672"ljmp (r10)",673"ljmp (r11)",674"ljmp (r12)",675"ljmp (r13)",676"lob",677"lmult",678679// a0 - af680"lms r0, ($%04x)",681"lms r1, ($%04x)",682"lms r2, ($%04x)",683"lms r3, ($%04x)",684"lms r4, ($%04x)",685"lms r5, ($%04x)",686"lms r6, ($%04x)",687"lms r7, ($%04x)",688"lms r8, ($%04x)",689"lms r9, ($%04x)",690"lms r10, ($%04x)",691"lms r11, ($%04x)",692"lms r12, ($%04x)",693"lms r13, ($%04x)",694"lms r14, ($%04x)",695"lms r15, ($%04x)",696697// b0 - bf698"from r0",699"from r1",700"from r2",701"from r3",702"from r4",703"from r5",704"from r6",705"from r7",706"from r8",707"from r9",708"from r10",709"from r11",710"from r12",711"from r13",712"from r14",713"from r15",714715// c0 - cf716"hib",717"xor r1",718"xor r2",719"xor r3",720"xor r4",721"xor r5",722"xor r6",723"xor r7",724"xor r8",725"xor r9",726"xor r10",727"xor r11",728"xor r12",729"xor r13",730"xor r14",731"xor r15",732733// d0 - df734"inc r0",735"inc r1",736"inc r2",737"inc r3",738"inc r4",739"inc r5",740"inc r6",741"inc r7",742"inc r8",743"inc r9",744"inc r10",745"inc r11",746"inc r12",747"inc r13",748"inc r14",749"getc",750751// e0 - ef752"dec r0",753"dec r1",754"dec r2",755"dec r3",756"dec r4",757"dec r5",758"dec r6",759"dec r7",760"dec r8",761"dec r9",762"dec r10",763"dec r11",764"dec r12",765"dec r13",766"dec r14",767"getbh",768769// f0 - ff770"lm r0, ($%04x)",771"lm r1, ($%04x)",772"lm r2, ($%04x)",773"lm r3, ($%04x)",774"lm r4, ($%04x)",775"lm r5, ($%04x)",776"lm r6, ($%04x)",777"lm r7, ($%04x)",778"lm r8, ($%04x)",779"lm r9, ($%04x)",780"lm r10, ($%04x)",781"lm r11, ($%04x)",782"lm r12, ($%04x)",783"lm r13, ($%04x)",784"lm r14, ($%04x)",785"lm r15, ($%04x)",786787// ALT2 Table788789// 00 - 0f790"stop",791"nop",792"cache",793"lsr",794"rol",795"bra $%04x",796"blt $%04x",797"bge $%04x",798"bne $%04x",799"beq $%04x",800"bpl $%04x",801"bmi $%04x",802"bcc $%04x",803"bcs $%04x",804"bvc $%04x",805"bvs $%04x",806807// 10 - 1f808"to r0",809"to r1",810"to r2",811"to r3",812"to r4",813"to r5",814"to r6",815"to r7",816"to r8",817"to r9",818"to r10",819"to r11",820"to r12",821"to r13",822"to r14",823"to r15",824825// 20 - 2f826"with r0",827"with r1",828"with r2",829"with r3",830"with r4",831"with r5",832"with r6",833"with r7",834"with r8",835"with r9",836"with r10",837"with r11",838"with r12",839"with r13",840"with r14",841"with r15",842843// 30 - 3f844"stw (r0)",845"stw (r1)",846"stw (r2)",847"stw (r3)",848"stw (r4)",849"stw (r5)",850"stw (r6)",851"stw (r7)",852"stw (r8)",853"stw (r9)",854"stw (r10)",855"stw (r11)",856"loop",857"alt1",858"alt2",859"alt3",860861// 40 - 4f862"ldw (r0)",863"ldw (r1)",864"ldw (r2)",865"ldw (r3)",866"ldw (r4)",867"ldw (r5)",868"ldw (r6)",869"ldw (r7)",870"ldw (r8)",871"ldw (r9)",872"ldw (r10)",873"ldw (r11)",874"plot",875"swap",876"color",877"not",878879// 50 - 5f880"add #0",881"add #1",882"add #2",883"add #3",884"add #4",885"add #5",886"add #6",887"add #7",888"add #8",889"add #9",890"add #10",891"add #11",892"add #12",893"add #13",894"add #14",895"add #15",896897// 60 - 6f898"sub #0",899"sub #1",900"sub #2",901"sub #3",902"sub #4",903"sub #5",904"sub #6",905"sub #7",906"sub #8",907"sub #9",908"sub #10",909"sub #11",910"sub #12",911"sub #13",912"sub #14",913"sub #15",914915// 70 - 7f916"merge",917"and #1",918"and #2",919"and #3",920"and #4",921"and #5",922"and #6",923"and #7",924"and #8",925"and #9",926"and #10",927"and #11",928"and #12",929"and #13",930"and #14",931"and #15",932933// 80 - 8f934"mult #0",935"mult #1",936"mult #2",937"mult #3",938"mult #4",939"mult #5",940"mult #6",941"mult #7",942"mult #8",943"mult #9",944"mult #10",945"mult #11",946"mult #12",947"mult #13",948"mult #14",949"mult #15",950951// 90 - 9f952"sbk",953"link #1",954"link #2",955"link #3",956"link #4",957"sex",958"asr",959"ror",960"jmp (r8)",961"jmp (r9)",962"jmp (r10)",963"jmp (r11)",964"jmp (r12)",965"jmp (r13)",966"lob",967"fmult",968969// a0 - af970"sms ($%04x), r0",971"sms ($%04x), r1",972"sms ($%04x), r2",973"sms ($%04x), r3",974"sms ($%04x), r4",975"sms ($%04x), r5",976"sms ($%04x), r6",977"sms ($%04x), r7",978"sms ($%04x), r8",979"sms ($%04x), r9",980"sms ($%04x), r10",981"sms ($%04x), r11",982"sms ($%04x), r12",983"sms ($%04x), r13",984"sms ($%04x), r14",985"sms ($%04x), r15",986987// b0 - bf988"from r0",989"from r1",990"from r2",991"from r3",992"from r4",993"from r5",994"from r6",995"from r7",996"from r8",997"from r9",998"from r10",999"from r11",1000"from r12",1001"from r13",1002"from r14",1003"from r15",10041005// c0 - cf1006"hib",1007"or #1",1008"or #2",1009"or #3",1010"or #4",1011"or #5",1012"or #6",1013"or #7",1014"or #8",1015"or #9",1016"or #10",1017"or #11",1018"or #12",1019"or #13",1020"or #14",1021"or #15",10221023// d0 - df1024"inc r0",1025"inc r1",1026"inc r2",1027"inc r3",1028"inc r4",1029"inc r5",1030"inc r6",1031"inc r7",1032"inc r8",1033"inc r9",1034"inc r10",1035"inc r11",1036"inc r12",1037"inc r13",1038"inc r14",1039"ramb",10401041// e0 - ef1042"dec r0",1043"dec r1",1044"dec r2",1045"dec r3",1046"dec r4",1047"dec r5",1048"dec r6",1049"dec r7",1050"dec r8",1051"dec r9",1052"dec r10",1053"dec r11",1054"dec r12",1055"dec r13",1056"dec r14",1057"getbl",10581059// f0 - ff1060"sm ($%04x), r0",1061"sm ($%04x), r1",1062"sm ($%04x), r2",1063"sm ($%04x), r3",1064"sm ($%04x), r4",1065"sm ($%04x), r5",1066"sm ($%04x), r6",1067"sm ($%04x), r7",1068"sm ($%04x), r8",1069"sm ($%04x), r9",1070"sm ($%04x), r10",1071"sm ($%04x), r11",1072"sm ($%04x), r12",1073"sm ($%04x), r13",1074"sm ($%04x), r14",1075"sm ($%04x), r15",10761077// ALT3 Table10781079// 00 - 0f1080"stop",1081"nop",1082"cache",1083"lsr",1084"rol",1085"bra $%04x",1086"blt $%04x",1087"bge $%04x",1088"bne $%04x",1089"beq $%04x",1090"bpl $%04x",1091"bmi $%04x",1092"bcc $%04x",1093"bcs $%04x",1094"bvc $%04x",1095"bvs $%04x",10961097// 10 - 1f1098"to r0",1099"to r1",1100"to r2",1101"to r3",1102"to r4",1103"to r5",1104"to r6",1105"to r7",1106"to r8",1107"to r9",1108"to r10",1109"to r11",1110"to r12",1111"to r13",1112"to r14",1113"to r15",11141115// 20 - 2f1116"with r0",1117"with r1",1118"with r2",1119"with r3",1120"with r4",1121"with r5",1122"with r6",1123"with r7",1124"with r8",1125"with r9",1126"with r10",1127"with r11",1128"with r12",1129"with r13",1130"with r14",1131"with r15",11321133// 30 - 3f1134"stb (r0)",1135"stb (r1)",1136"stb (r2)",1137"stb (r3)",1138"stb (r4)",1139"stb (r5)",1140"stb (r6)",1141"stb (r7)",1142"stb (r8)",1143"stb (r9)",1144"stb (r10)",1145"stb (r11)",1146"loop",1147"alt1",1148"alt2",1149"alt3",11501151// 40 - 4f1152"ldb (r0)",1153"ldb (r1)",1154"ldb (r2)",1155"ldb (r3)",1156"ldb (r4)",1157"ldb (r5)",1158"ldb (r6)",1159"ldb (r7)",1160"ldb (r8)",1161"ldb (r9)",1162"ldb (r10)",1163"ldb (r11)",1164"rpix",1165"swap",1166"cmode",1167"not",11681169// 50 - 5f1170"adc #0",1171"adc #1",1172"adc #2",1173"adc #3",1174"adc #4",1175"adc #5",1176"adc #6",1177"adc #7",1178"adc #8",1179"adc #9",1180"adc #10",1181"adc #11",1182"adc #12",1183"adc #13",1184"adc #14",1185"adc #15",11861187// 60 - 6f1188"cmp r0",1189"cmp r1",1190"cmp r2",1191"cmp r3",1192"cmp r4",1193"cmp r5",1194"cmp r6",1195"cmp r7",1196"cmp r8",1197"cmp r9",1198"cmp r10",1199"cmp r11",1200"cmp r12",1201"cmp r13",1202"cmp r14",1203"cmp r15",12041205// 70 - 7f1206"merge",1207"bic #1",1208"bic #2",1209"bic #3",1210"bic #4",1211"bic #5",1212"bic #6",1213"bic #7",1214"bic #8",1215"bic #9",1216"bic #10",1217"bic #11",1218"bic #12",1219"bic #13",1220"bic #14",1221"bic #15",12221223// 80 - 8f1224"umult #0",1225"umult #1",1226"umult #2",1227"umult #3",1228"umult #4",1229"umult #5",1230"umult #6",1231"umult #7",1232"umult #8",1233"umult #9",1234"umult #10",1235"umult #11",1236"umult #12",1237"umult #13",1238"umult #14",1239"umult #15",12401241// 90 - 9f1242"sbk",1243"link #1",1244"link #2",1245"link #3",1246"link #4",1247"sex",1248"div2",1249"ror",1250"ljmp (r8)",1251"ljmp (r9)",1252"ljmp (r10)",1253"ljmp (r11)",1254"ljmp (r12)",1255"ljmp (r13)",1256"lob",1257"lmult",12581259// a0 - af1260"lms r0, ($%04x)",1261"lms r1, ($%04x)",1262"lms r2, ($%04x)",1263"lms r3, ($%04x)",1264"lms r4, ($%04x)",1265"lms r5, ($%04x)",1266"lms r6, ($%04x)",1267"lms r7, ($%04x)",1268"lms r8, ($%04x)",1269"lms r9, ($%04x)",1270"lms r10, ($%04x)",1271"lms r11, ($%04x)",1272"lms r12, ($%04x)",1273"lms r13, ($%04x)",1274"lms r14, ($%04x)",1275"lms r15, ($%04x)",12761277// b0 - bf1278"from r0",1279"from r1",1280"from r2",1281"from r3",1282"from r4",1283"from r5",1284"from r6",1285"from r7",1286"from r8",1287"from r9",1288"from r10",1289"from r11",1290"from r12",1291"from r13",1292"from r14",1293"from r15",12941295// c0 - cf1296"hib",1297"xor #1",1298"xor #2",1299"xor #3",1300"xor #4",1301"xor #5",1302"xor #6",1303"xor #7",1304"xor #8",1305"xor #9",1306"xor #10",1307"xor #11",1308"xor #12",1309"xor #13",1310"xor #14",1311"xor #15",13121313// d0 - df1314"inc r0",1315"inc r1",1316"inc r2",1317"inc r3",1318"inc r4",1319"inc r5",1320"inc r6",1321"inc r7",1322"inc r8",1323"inc r9",1324"inc r10",1325"inc r11",1326"inc r12",1327"inc r13",1328"inc r14",1329"romb",13301331// e0 - ef1332"dec r0",1333"dec r1",1334"dec r2",1335"dec r3",1336"dec r4",1337"dec r5",1338"dec r6",1339"dec r7",1340"dec r8",1341"dec r9",1342"dec r10",1343"dec r11",1344"dec r12",1345"dec r13",1346"dec r14",1347"getbs",13481349// f0 - ff1350"lm r0, ($%04x)",1351"lm r1, ($%04x)",1352"lm r2, ($%04x)",1353"lm r3, ($%04x)",1354"lm r4, ($%04x)",1355"lm r5, ($%04x)",1356"lm r6, ($%04x)",1357"lm r7, ($%04x)",1358"lm r8, ($%04x)",1359"lm r9, ($%04x)",1360"lm r10, ($%04x)",1361"lm r11, ($%04x)",1362"lm r12, ($%04x)",1363"lm r13, ($%04x)",1364"lm r14, ($%04x)",1365"lm r15, ($%04x)"1366};1367*/13681369/*1370static void FxPipeString (char *pvString)1371{1372uint32 vOpcode = (GSU.vStatusReg & 0x300) | ((uint32) PIPE);1373const char *m = fx_apvMnemonicTable[vOpcode];1374uint8 vPipe1, vPipe2, vByte1, vByte2;1375uint8 vPipeBank = GSU.vPipeAdr >> 16;1376char *p;13771378// The next two bytes after the pipe's address1379vPipe1 = GSU.apvRomBank[vPipeBank][USEX16(GSU.vPipeAdr + 1)];1380vPipe2 = GSU.apvRomBank[vPipeBank][USEX16(GSU.vPipeAdr + 2)];13811382// The actual next two bytes to be read1383vByte1 = PRGBANK(USEX16(R15));1384vByte2 = PRGBANK(USEX16(R15 + 1));13851386// Print ROM address of the pipe1387sprintf(pvString, "%02x:%04x %02x ", USEX8(vPipeBank), USEX16(GSU.vPipeAdr), USEX8(PIPE));1388p = &pvString[strlen(pvString)];13891390if (PIPE >= 0x05 && PIPE <= 0x0f) // Check if it's a branch instruction1391{1392sprintf(&pvString[11], "%02x ", USEX8(vPipe1));1393#ifdef BRANCH_DELAY_RELATIVE1394sprintf(p, m, USEX16(R15 + SEX8(vByte1) + 1));1395#else1396sprintf(p, m, USEX16(R15 + SEX8(vByte1) - 1));1397#endif1398}1399else1400if (PIPE >= 0x10 && PIPE <= 0x1f && TF(B)) // Check for 'move' instruction1401sprintf(p, "move r%d, r%d", USEX8(PIPE & 0x0f), (uint32) (GSU.pvSreg - GSU.avReg));1402else1403if (PIPE >= 0xa0 && PIPE <= 0xaf) // Check for 'ibt', 'lms' or 'sms'1404{1405sprintf(&pvString[11], "%02x ", USEX8(vPipe1));1406if ((GSU.vStatusReg & 0x300) == 0x100 || (GSU.vStatusReg & 0x300) == 0x200)1407sprintf(p, m, USEX16(vByte1) << 1);1408else1409sprintf(p, m, USEX16(vByte1));1410}1411else1412if (PIPE >= 0xb0 && PIPE <= 0xbf && TF(B)) // Check for 'moves'1413sprintf(p, "moves r%d, r%d", (uint32) (GSU.pvDreg - GSU.avReg), USEX8(PIPE & 0x0f));1414else1415if (PIPE >= 0xf0) // Check for 'iwt', 'lm' or 'sm'1416{1417sprintf(&pvString[11], "%02x %02x ", USEX8(vPipe1), USEX8(vPipe2));1418sprintf(p, m, USEX8(vByte1) | (USEX16(vByte2) << 8));1419}1420else // Normal instruction1421strcpy(p, m);1422}1423*/14241425#endif142614271428