From dffa89ebdee4d328a8e166b30fcdf38a3fc54b28 Mon Sep 17 00:00:00 2001 From: Shamus Hammons Date: Wed, 30 Jan 2013 17:51:49 -0600 Subject: [PATCH 1/1] Preparation for 2.1.0 release. Added new icons, updated help file, and fixed/changed the various debug browsers to work better. There are a few minor things left to fix, but all the major stuff is done. Onward! --- res/blur.png | Bin 0 -> 640 bytes res/fullscreen.png | Bin 0 -> 971 bytes res/help.html | 41 ++++++++++++- res/tool-68k-dis.png | Bin 0 -> 731 bytes res/tool-cpu.png | Bin 0 -> 614 bytes res/tool-memory.png | Bin 0 -> 688 bytes res/tool-op.png | Bin 0 -> 593 bytes res/tool-risc-dis.png | Bin 0 -> 695 bytes res/zoom100.png | Bin 895 -> 1229 bytes res/zoom200.png | Bin 978 -> 1397 bytes res/zoom300.png | Bin 987 -> 1419 bytes src/gui/controllertab.cpp | 2 +- src/gui/debug/cpubrowser.cpp | 2 +- src/gui/debug/m68kdasmbrowser.cpp | 22 ++++++- src/gui/debug/m68kdasmbrowser.h | 3 + src/gui/debug/memorybrowser.cpp | 24 +++++++- src/gui/debug/memorybrowser.h | 3 + src/gui/debug/opbrowser.cpp | 97 +++++------------------------- src/gui/debug/riscdasmbrowser.cpp | 1 - src/gui/mainwin.cpp | 15 ++--- src/gui/virtualjaguar.qrc | 7 +++ src/m68000/cpuextra.c | 16 ++++- src/m68000/m68kdasm.c | 2 + src/m68000/m68kinterface.c | 15 +++++ src/m68000/readcpu.c | 11 +++- virtualjaguar.pro | 4 ++ 26 files changed, 165 insertions(+), 100 deletions(-) create mode 100644 res/blur.png create mode 100644 res/fullscreen.png create mode 100644 res/tool-68k-dis.png create mode 100644 res/tool-cpu.png create mode 100644 res/tool-memory.png create mode 100644 res/tool-op.png create mode 100644 res/tool-risc-dis.png diff --git a/res/blur.png b/res/blur.png new file mode 100644 index 0000000000000000000000000000000000000000..efc1ad5e24ee4f0f4363dcfda5e90c42926fb2fc GIT binary patch literal 640 zcmV-`0)PF9P)WFU8GbZ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a|$!=9d=k}?!Np|!QOq^x$k5p{NU>bk0ft$4jmD|Y|4 z71!3*mb7AkuMt0uz4{p~=l~x0jC49}1Q5q~6bPl1nw*@}X%BS(#dbU}Fc3N6#283I zzw7Vs*J*ck07o^(Y}^rR2P4^>MmruH4A+1I`!tlU07rtIaLlg=Ap}B*H$y{1WHOl@ z8CzRhV`^%O!NEa<5U)MszGqKOqwyu+ZJ5G}iV9jW}Arl+S@fx{8_I)GOuMkDYD*w~}1*_h{O?91tG;Ffo1JipB>ECMfpm)_;{*LH8m tVb}BXz**q5mQxG(>HXL~1ApTx{0DCoq+k`kk;4E0002ovPDHLkV1hr*t@{7~ literal 0 HcmV?d00001 diff --git a/res/help.html b/res/help.html index ac07ec6..29b814a 100644 --- a/res/help.html +++ b/res/help.html @@ -101,6 +101,7 @@
  • Power
  • Pause
  • +
  • Frame Advance
  • Insert Cartridge...
  • Use CD Unit
  • Configure
  • @@ -111,6 +112,8 @@

    Pause does the same as the toolbar button; see the “Pause” toolbar button description for details.

    +

    Frame Advance causes Virtual Jaguar to run for one frame (1/60th of a second for NTSC, 1/50th for PAL), and update the screen. This option only works when Virtual Jaguar is paused.

    +

    Insert Cartridge... does the same as the toolbar button; see the “Insert Cartridge” toolbar button description for details.

    Use CD Unit does the same as the toolbar button; see the “Use CD Unit” toolbar button description for details.

    @@ -186,11 +189,13 @@

    Under the Controller tab, there are the following options:

      -
    • A picture of a Jaguar controller showing which keys are defined
    • -
    • A button labeled “Define All Keys”
    • +
    • A picture of a Jaguar controller showing which inputs are defined
    • +
    • A button labeled “Define All Inputs”
    -

    Hovering over a letter on the picture of the Jaguar controller will highlight it; clicking on the letter will let you redefine that key. If you prefer, you can define all the keys at once by clicking on the “Define All Keys” button. It will then step through each button on the controller, one at a time, and wait for you to press the key that you wish to set it to. You can exit the key redefinition process at any time by pressing the Esc key on your keyboard.

    +

    Hovering over a letter on the picture of the Jaguar controller will highlight it; clicking on the letter will let you redefine that input by pressing a key on the keyboard or button on a connected gamepad. If you prefer, you can define all inputs at once by clicking on the “Define All Inputs” button. It will then step through each input on the controller, one at a time, and wait for you to press the key/button that you wish to set it to. You can exit the key redefinition process at any time by pressing the Esc key on your keyboard.

    + +

    NOTE: For gamepads to be detected, they must be connected to the computer before starting Virtual Jaguar.

    EEPROMs

    @@ -223,6 +228,36 @@

    ABS to load is the path to a Jaguar executable file that will be loaded in the Jaguar’s main RAM. This file must have valid headers, otherwise Virtual Jaguar won’t be able to load it. Assuming the file exists and has the correct headers in it, it will be loaded and run when Virtual Jaguar is first run.

    +

    Also, when in Alpine mode, extra toolbar buttons are defined (also found under the extra “Debug” menu):

    + +
      +
    • Memory Browser
    • +
    • CPU Browser
    • +
    • OP Browser
    • +
    • M68K Disassembly Browser
    • +
    • RISC Disassembly Browser
    • +
    + +

    Memory Browser

    + +

    This window lets you inspect Virtual Jaguar’s emulated memory space. The PgDn key will advance the top of the window’s memory location by 480 bytes, and PgUp will go back by the same amount. The Plus (+) key will advance the top of the window’s memory location by 16 bytes, and Minus (-) will go back by the same amount. Entering a memory location, in hexadecimal, in the edit field and pressing the Go button will display memory from that location. It can be dismissed by clicking on the “X” in the upper corner of the dialog, or by pressing the Esc key on your keyboard.

    + +

    CPU Browser

    + +

    This window shows the state of the various CPUs in the emulated Jaguar. It can be dismissed by clicking on the “X” in the upper corner of the dialog, or by pressing the Esc key on your keyboard.

    + +

    OP Browser

    + +

    This window shows the current state of object list that the Object Processor is pointing to. Note that most of the time, this will likely show an object list that has had its objects processed. It can be dismissed by clicking on the “X” in the upper corner of the dialog, or by pressing the Esc key on your keyboard.

    + +

    M68K Disassembly Browser

    + +

    This window provides a disassembly of 68000 opcodes. It can be dismissed by clicking on the “X” in the upper corner of the dialog, or by pressing the Esc key on your keyboard.

    + +

    RISC Disassembly Browser

    + +

    This window provides a disassembly of RISC opcodes. It can be dismissed by clicking on the “X” in the upper corner of the dialog, or by pressing the Esc key on your keyboard.

    +

    The aforementioned options will only work when Virtual Jaguar is run in Alpine mode, that is, when the --alpine flag is passed in. If you do not pass in the --alpine flag, Virtual Jaguar will run as it normally does, i.e., as a stock Jaguar, and nothing will be loaded by default.

    For The Curious

    diff --git a/res/tool-68k-dis.png b/res/tool-68k-dis.png new file mode 100644 index 0000000000000000000000000000000000000000..1696fa1751066b77108f186580622358f23471a9 GIT binary patch literal 731 zcmV<10wn#3P)WFU8GbZ8()Nlj2>E@cM*00KWrL_t(o!_}5gNK{c2 z#(x?GWq%b*i^OtKrVfT+=%PhIOrp{zH$kgh2nMcPjS#uer3tzU)F`4&EhMFaC@T_I z+8-j2R&H!jX_}(RwD|@OmpkT6Z{E;_;m-NKd(L;>d*_~e;XfD$vn5;!%mPb5PT1mo zKwQ6$Foll*a}s_Al!qx^46Fewz{PBQ^ZR=8NH)atBt9;?2517R!b;${5*P)(ngWai zuYtXP@h=2U{!0R7M(`UD1ERo9VPhVja$pGfWqiK_b?GENV03B&m zSad^gZEa<4bN~PV002XBWnpw>WFU8GbZ8()Nlj2>E@cM*00GKLL_t(o!|m5UNLNu5 z2k?)-(hN}qiz1TNq$NlkYElS-Xsf|75TXXBn)?F=x`u+#(p1!_gJnaFQqfR^Bm^x% zQGyzTS=w@h$K$;p=zG7XLkBMBo_pRo=X>ux_q==gPrH=%qX&a{f$=JXU%^I3yI4i= zz6ka)fSgAc-eb550N?Nndv;>qFU9Qd>{Q}C2>=JG3|dR{mxJ%yqK})H!5H=y0dpi) z;8h*4Q#c)R8|G6dnV8{r*IwL zt1MWz@I3k-s;nJXQ%7&2h_fPvV-U0WQC20~s?D2>;0L2+(OZm^0bnusjSSsvv^2Hh zWK`S2TktG+XNIml$EGFtS{VR-<1eN&bQ?J~9jVnT1YiZtb%ND$wm?+X!Z}cHrk`;* zWBf$ohgAxIJo=gAvpe{FqXB%43r#v1d&}N}JX*~eABfqnHX6WO@KGF(EB#PhZXQ+f zpJ*h^8!qrUn7&#Tguplkqs-9J`PH0eIzW3@T*+g#Z8m07*qoM6N<$f=fU9 AZ~y=R literal 0 HcmV?d00001 diff --git a/res/tool-memory.png b/res/tool-memory.png new file mode 100644 index 0000000000000000000000000000000000000000..b809c05a25e6906cd883b455fa64012bd9654309 GIT binary patch literal 688 zcmV;h0#E&kP)WFU8GbZ8()Nlj2>E@cM*00I^v8h?<;b+D z8CiwzHE^~V2fBcvzpR-8mSs2zoGx{5_@ruRn^=SXwc1iR@It5m3j74NOepfoi-NCV z7<>dSDS4OltO2{ghVNbhaNW78VbKCS)m1JE9i|pc0xy9DRnaT^?0c+zX`s5;(!FG2 zo>9X}DKtTSXm|Fdfp6M#BZ^QQR`$E72j*nxxnyy@kE+CP`pl7FmY5KI3)~ccUh`!h z==bHoEg5Jw6V-+@*nC$#@q*yAannunO4tAi$xixk;HrN7qNy_()rUIC+Ds|`qZ>wn zbWFU8GbZ8()Nlj2>E@cM*00Fg0L_t(o!|j&MD@0Kk z#((5vl%X)bvcrm!siDb&$jZ{nUfJ16MA)*x#%lfsg{3B6YmsQ8Mm}nqEJXPjA7S&T z+jL!BGiN3>Pu<=-=Y7umJaf<@4%@LXVHX#O%*Tvh4%uirz)0j zGv)`bfj5VF1waw-l&XOOo3S`h|I55`#h79r(5o+Z3>*Nbe>JtNLfsCWc5#M*%A{WL z{X7GEz<^r=%_^|qz?l@M6ByHbD^Lye05j?zAIf#OH4y<4K*~QK-kOANwJ9$EpVqnzSQ57hc>SRwP%=CcKQeuAC4lXuu~J}P2Kr5kdnK}>-)%t1vRo6U|GiH_Vc^6f98q&J zjz$UI>ar5jT_R)XlYyah9!75P-Kg%eWgt(nHd_XKimlnYvTtY))Md-SxmtBvFC=bo fXgL*g_@DR!rvY!F{m{pc00000NkvXXu0mjf5)bpg literal 0 HcmV?d00001 diff --git a/res/tool-risc-dis.png b/res/tool-risc-dis.png new file mode 100644 index 0000000000000000000000000000000000000000..71e00d86921aa180faa2b63b086e682ef37cebe1 GIT binary patch literal 695 zcmV;o0!aOdP)WFU8GbZ8()Nlj2>E@cM*00J9HL_t(o!|j(lNL*16 zhCkP3jjX{!@=%F+uGk17LK3Y+B^J>pO^QegMTn3lO#(qM^_HS+AWdRz5m@4`jW!~f zB2|JWDhO*Hg7~)3peg(phRfX`uIJh~a5-~k=AQGPxifR;z&Rb!HDD3g1ik~Kz~vwT z^Z|#!XW*Ck-5>$H*QQa;Uu)hK6o9Y5ika66z(`O4_JE}L0>#4tP!$w_bzmNN2dwJ! z52Pyu8i7kLHV$k215^XIfgNA~NK01(Oo?9rJ}FpN6*HU0_QaIdf^#~3wMXA7?<`C2 zeG2mhFb-@07lC~(`Z$N}h{=!+c`a|61D3?!Hy~d6*!D_y{WN2tMNgK>lo^LW$Yc9V z@|f$)C9cmiR^&Zja=U7Xy{z z+YO*w9=i}Q2&8}s;H}<0b$TQK-#qe+2|N&#`;g=uO($Yw_^pR=-@ z@#zoZ#%3mn4m+X>dDFN(ORof~?W`_6VUz#&Bx}+IC>9imPV;$w8$K4KC!#>V8rvVh d-SZnUz&}GIlCAj{-x&Y^002ovPDHLkV1k(a8g&2w literal 0 HcmV?d00001 diff --git a/res/zoom100.png b/res/zoom100.png index 8cbc738ea3258d7ddcc2577014a4fa08270493ba..5b56a3f83f63b4936d093bec676855974fdbc418 100644 GIT binary patch delta 1143 zcmV--1c>|p2F(eOBo78+OGiWi000000Qp0^e~~~Q3f%!77ZMDI`6WP+Xe)mNF-b&0 zR9M5cmrF>TR}{y8-yLmz4%XV1V(^U-t&gdQ4~nruYut$om*QiktE}88F0ytZh=?c! zEodMjU6^Van@&NYqGDsA){YX1T4}*ST_l~sxwnhXH{5Z)F*B3o!d;yEIOl)QJ@4H=mYSMMSy>rHMMYFpRFImQ`o99hKuU?n+9;_!-uk=p+N!4FbscF|ALhV{srC# zkW#AG#78_$2_cM|-WLJkQ`2~9X({i(IDk=CSEtLL=m74UqwVeOZ)|CNd>kP}*mz4z zi!R>Rg=zEdT`rf5_s*r1YHVyQ7)KT{A+VAP`$- z-wO#4KqV(9$8CIcbX0!!+wH-b`uchRW@ctW z6i6vC41?_KY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$1u9S~k#=WOgOf zAcjoQbS#w&qaJdo#%i4A^s+XrHv8PBnHFsJ-fMl|x_s;U)$|5^Sc+?KKAQ2=a1=k_ zF#hP4VSlX+?NZ!|AuPvLJt}($W7vW1__3Q!H)1P(P1eoj^DgdebpkhFPaEZa$9{Z^ zy_gJq6Ll=X0ItL!8f|#3#K&di)?hXh@2@e8`^+Ae<08)TV9pnt4Lgb#YK=-hY@hA}gVHXZcOuo+*5 zyy2j)!lq*Jfuw1phZ9)VA!eF*r9~WkQ-z%D(Wlqr{Yd9}g`gKI_Dq)pabZGyF^AFq z9Qva+WZ0eLEhq|5fp`mR@pv2NpGH4u1%Fip;7rs6cq8GjtK;gl`K!?Cr54OL;&vRX zsDGvpC##;pML}B_!L|#xU_9;ZhsTme8-nmXUMmS-7i;<|6niLW8{3@BHk>NSTi+-J zPmuuwn2O%;B5uN~(X4)}U_RQRv%(W${W%F&Z{Y8QD85gJpO4^dj9^W;Xtr=T-iuUN zT)-LW`zY?fC-^9Wr}iIu#U=5c$OhMOFn=MIls3H?!Lt%iR|p@%6W6?v-3fyoP!i#42DBjL#C>?7v>NPwV|2bfavb(BOaE3YvFY3&Z z`2Re~>noSy({ZFt+*ZM?NX0WtMP+ft+MDrSMTMQHnhB04(uIB@BALvgmsN<(-Y~wMObp`(baddWidget(controllerWidget); diff --git a/src/gui/debug/cpubrowser.cpp b/src/gui/debug/cpubrowser.cpp index 3871dbc..9951c64 100644 --- a/src/gui/debug/cpubrowser.cpp +++ b/src/gui/debug/cpubrowser.cpp @@ -98,7 +98,7 @@ void CPUBrowserWindow::RefreshContents(void) void CPUBrowserWindow::keyPressEvent(QKeyEvent * e) { - if (e->key() == Qt::Key_Escape || e->key() == Qt::Key_Return) + if (e->key() == Qt::Key_Escape) hide(); else if (e->key() == Qt::Key_PageUp) { diff --git a/src/gui/debug/m68kdasmbrowser.cpp b/src/gui/debug/m68kdasmbrowser.cpp index 25829e1..0d94aa3 100644 --- a/src/gui/debug/m68kdasmbrowser.cpp +++ b/src/gui/debug/m68kdasmbrowser.cpp @@ -25,10 +25,18 @@ M68KDasmBrowserWindow::M68KDasmBrowserWindow(QWidget * parent/*= 0*/): QWidget(p // layout(new QVBoxLayout), text(new QTextBrowser), layout(new QVBoxLayout), text(new QLabel), refresh(new QPushButton(tr("Refresh"))), + address(new QLineEdit), + go(new QPushButton(tr("Go"))), memBase(0x4000) { setWindowTitle(tr("M68K Disassembly Browser")); + address->setInputMask("hhhhhh"); + QHBoxLayout * hbox1 = new QHBoxLayout; + hbox1->addWidget(refresh); + hbox1->addWidget(address); + hbox1->addWidget(go); + // Need to set the size as well... // resize(560, 480); @@ -38,9 +46,11 @@ M68KDasmBrowserWindow::M68KDasmBrowserWindow(QWidget * parent/*= 0*/): QWidget(p setLayout(layout); layout->addWidget(text); - layout->addWidget(refresh); +// layout->addWidget(refresh); + layout->addLayout(hbox1); connect(refresh, SIGNAL(clicked()), this, SLOT(RefreshContents())); + connect(go, SIGNAL(clicked()), this, SLOT(GoToAddress())); } @@ -125,3 +135,13 @@ void M68KDasmBrowserWindow::keyPressEvent(QKeyEvent * e) } #endif } + + +void M68KDasmBrowserWindow::GoToAddress(void) +{ + bool ok; + QString newAddress = address->text(); + memBase = newAddress.toUInt(&ok, 16); + RefreshContents(); +} + diff --git a/src/gui/debug/m68kdasmbrowser.h b/src/gui/debug/m68kdasmbrowser.h index 77550ee..fe3f29d 100644 --- a/src/gui/debug/m68kdasmbrowser.h +++ b/src/gui/debug/m68kdasmbrowser.h @@ -22,6 +22,7 @@ class M68KDasmBrowserWindow: public QWidget public slots: // void DefineAllKeys(void); void RefreshContents(void); + void GoToAddress(void); protected: void keyPressEvent(QKeyEvent *); @@ -31,6 +32,8 @@ class M68KDasmBrowserWindow: public QWidget // QTextBrowser * text; QLabel * text; QPushButton * refresh; + QLineEdit * address; + QPushButton * go; int32_t memBase; }; diff --git a/src/gui/debug/memorybrowser.cpp b/src/gui/debug/memorybrowser.cpp index 7acc132..b2d2170 100644 --- a/src/gui/debug/memorybrowser.cpp +++ b/src/gui/debug/memorybrowser.cpp @@ -22,10 +22,18 @@ MemoryBrowserWindow::MemoryBrowserWindow(QWidget * parent/*= 0*/): QWidget(paren // layout(new QVBoxLayout), text(new QTextBrowser), layout(new QVBoxLayout), text(new QLabel), refresh(new QPushButton(tr("Refresh"))), + address(new QLineEdit), + go(new QPushButton(tr("Go"))), memBase(0) { setWindowTitle(tr("Memory Browser")); + address->setInputMask("hhhhhh"); + QHBoxLayout * hbox1 = new QHBoxLayout; + hbox1->addWidget(refresh); + hbox1->addWidget(address); + hbox1->addWidget(go); + // Need to set the size as well... // resize(560, 480); @@ -35,9 +43,11 @@ MemoryBrowserWindow::MemoryBrowserWindow(QWidget * parent/*= 0*/): QWidget(paren setLayout(layout); layout->addWidget(text); - layout->addWidget(refresh); +// layout->addWidget(refresh); + layout->addLayout(hbox1); connect(refresh, SIGNAL(clicked()), this, SLOT(RefreshContents())); + connect(go, SIGNAL(clicked()), this, SLOT(GoToAddress())); } @@ -83,7 +93,7 @@ void MemoryBrowserWindow::RefreshContents(void) void MemoryBrowserWindow::keyPressEvent(QKeyEvent * e) { - if (e->key() == Qt::Key_Escape || e->key() == Qt::Key_Return) + if (e->key() == Qt::Key_Escape) hide(); else if (e->key() == Qt::Key_PageUp) { @@ -122,3 +132,13 @@ void MemoryBrowserWindow::keyPressEvent(QKeyEvent * e) RefreshContents(); } } + + +void MemoryBrowserWindow::GoToAddress(void) +{ + bool ok; + QString newAddress = address->text(); + memBase = newAddress.toUInt(&ok, 16); + RefreshContents(); +} + diff --git a/src/gui/debug/memorybrowser.h b/src/gui/debug/memorybrowser.h index e373e51..ce3234d 100644 --- a/src/gui/debug/memorybrowser.h +++ b/src/gui/debug/memorybrowser.h @@ -22,6 +22,7 @@ class MemoryBrowserWindow: public QWidget public slots: // void DefineAllKeys(void); void RefreshContents(void); + void GoToAddress(void); protected: void keyPressEvent(QKeyEvent *); @@ -31,6 +32,8 @@ class MemoryBrowserWindow: public QWidget // QTextBrowser * text; QLabel * text; QPushButton * refresh; + QLineEdit * address; + QPushButton * go; int32_t memBase; }; diff --git a/src/gui/debug/opbrowser.cpp b/src/gui/debug/opbrowser.cpp index f129bec..3c1d2ea 100644 --- a/src/gui/debug/opbrowser.cpp +++ b/src/gui/debug/opbrowser.cpp @@ -21,10 +21,8 @@ OPBrowserWindow::OPBrowserWindow(QWidget * parent/*= 0*/): QWidget(parent, Qt::Dialog), -// layout(new QVBoxLayout), text(new QTextBrowser), layout(new QVBoxLayout), text(new QLabel), - refresh(new QPushButton(tr("Refresh")))//, -// memBase(0) + refresh(new QPushButton(tr("Refresh"))) { setWindowTitle(tr("OP Browser")); @@ -36,7 +34,10 @@ OPBrowserWindow::OPBrowserWindow(QWidget * parent/*= 0*/): QWidget(parent, Qt::D //// layout->setSizeConstraint(QLayout::SetFixedSize); setLayout(layout); - layout->addWidget(text); + QScrollArea * scrollArea = new QScrollArea; + scrollArea->setWidgetResizable(true); + scrollArea->setWidget(text); + layout->addWidget(scrollArea); layout->addWidget(refresh); connect(refresh, SIGNAL(clicked()), this, SLOT(RefreshContents())); @@ -48,39 +49,8 @@ void OPBrowserWindow::RefreshContents(void) char string[1024];//, buf[64]; QString opDump; -#if 0 - for(uint32_t i=0; i<480; i+=16) - { - sprintf(string, "%s%06X: ", (i != 0 ? "
    " : ""), memBase + i); - - for(uint32_t j=0; j<16; j++) - { - sprintf(buf, "%02X ", jaguarMainRAM[memBase + i + j]); - strcat(string, buf); - } - - sprintf(buf, "| "); - strcat(string, buf); - - for(uint32_t j=0; j<16; j++) - { - uint8_t c = jaguarMainRAM[memBase + i + j]; - sprintf(buf, "&#%i;", c); - - if (c == 0x20) - sprintf(buf, " "); - - if ((c < 0x20) || ((c > 0x7F) && (c < 0xA0))) - sprintf(buf, "."); - - strcat(string, buf); - } - - memDump += QString(string); - } -#endif uint32_t olp = OPGetListPointer(); - sprintf(string, "OLP = $%08X

    ", olp); + sprintf(string, "OLP = $%X
    ", olp); opDump += QString(string); numberOfObjects = 0; @@ -94,46 +64,10 @@ void OPBrowserWindow::RefreshContents(void) void OPBrowserWindow::keyPressEvent(QKeyEvent * e) { - if (e->key() == Qt::Key_Escape || e->key() == Qt::Key_Return) + if (e->key() == Qt::Key_Escape) hide(); -#if 0 - else if (e->key() == Qt::Key_PageUp) - { - memBase -= 480; - - if (memBase < 0) - memBase = 0; - + else if (e->key() == Qt::Key_Enter) RefreshContents(); - } - else if (e->key() == Qt::Key_PageDown) - { - memBase += 480; - - if (memBase > (0x200000 - 480)) - memBase = 0x200000 - 480; - - RefreshContents(); - } - else if (e->key() == Qt::Key_Up || e->key() == Qt::Key_Minus) - { - memBase -= 16; - - if (memBase < 0) - memBase = 0; - - RefreshContents(); - } - else if (e->key() == Qt::Key_Down || e->key() == Qt::Key_Equal) - { - memBase += 16; - - if (memBase > (0x200000 - 480)) - memBase = 0x200000 - 480; - - RefreshContents(); - } -#endif } @@ -204,7 +138,7 @@ void OPBrowserWindow::DumpObjectList(QString & list) uint8_t objectType = lo & 0x07; uint32_t link = ((hi << 11) | (lo >> 21)) & 0x3FFFF8; // WriteLog("%08X: %08X %08X %s", address, hi, lo, opType[objectType]); - sprintf(buf, "%08X: %08X %08X %s -> %08X", address, hi, lo, opType[objectType], link); + sprintf(buf, "
    %06X: %08X %08X %s -> %06X", address, hi, lo, opType[objectType], link); list += QString(buf); if (objectType == 3) @@ -231,7 +165,7 @@ void OPBrowserWindow::DumpObjectList(QString & list) { // Runaway recursive link is bad! // WriteLog("***** SELF REFERENTIAL LINK *****\n\n"); - sprintf(buf, "***** SELF REFERENTIAL LINK *****

    "); + sprintf(buf, "***** SELF REFERENTIAL LINK *****
    "); list += QString(buf); } } @@ -246,17 +180,17 @@ void OPBrowserWindow::DumpScaledObject(QString & list, uint64_t p0, uint64_t p1, char buf[512]; // WriteLog(" %08X %08X\n", (uint32)(p1>>32), (uint32)(p1&0xFFFFFFFF)); - sprintf(buf, "_________ %08X %08X
    ", (uint32)(p1>>32), (uint32)(p1&0xFFFFFFFF)); + sprintf(buf, "        %08X %08X
    ", (uint32)(p1>>32), (uint32)(p1&0xFFFFFFFF)); list += QString(buf); // WriteLog(" %08X %08X\n", (uint32)(p2>>32), (uint32)(p2&0xFFFFFFFF)); - sprintf(buf, "_________ %08X %08X
    ", (uint32)(p2>>32), (uint32)(p2&0xFFFFFFFF)); + sprintf(buf, "        %08X %08X
    ", (uint32)(p2>>32), (uint32)(p2&0xFFFFFFFF)); list += QString(buf); DumpBitmapCore(list, p0, p1); uint32 hscale = p2 & 0xFF; uint32 vscale = (p2 >> 8) & 0xFF; uint32 remainder = (p2 >> 16) & 0xFF; // WriteLog(" [hsc: %02X, vsc: %02X, rem: %02X]\n", hscale, vscale, remainder); - sprintf(buf, "[hsc: %02X, vsc: %02X, rem: %02X]
    ", hscale, vscale, remainder); + sprintf(buf, "        [hsc: %02X, vsc: %02X, rem: %02X]
    ", hscale, vscale, remainder); list += QString(buf); } @@ -266,7 +200,7 @@ void OPBrowserWindow::DumpFixedObject(QString & list, uint64_t p0, uint64_t p1) char buf[512]; // WriteLog(" %08X %08X\n", (uint32)(p1>>32), (uint32)(p1&0xFFFFFFFF)); - sprintf(buf, "          %08X %08X
    ", (uint32)(p1>>32), (uint32)(p1&0xFFFFFFFF)); + sprintf(buf, "        %08X %08X
    ", (uint32)(p1>>32), (uint32)(p1&0xFFFFFFFF)); list += QString(buf); DumpBitmapCore(list, p0, p1); } @@ -298,7 +232,7 @@ void OPBrowserWindow::DumpBitmapCore(QString & list, uint64_t p0, uint64_t p1) // ptr, firstPix, (flags&OPFLAG_REFLECT ? "REFLECT " : ""), // (flags&OPFLAG_RMW ? "RMW " : ""), (flags&OPFLAG_TRANS ? "TRANS " : ""), // (flags&OPFLAG_RELEASE ? "RELEASE" : ""), idx, pitch); - sprintf(buf, " [%u x %u @ (%i, %u) (iw:%u, dw:%u) (%u bpp), p:%08X fp:%02X, fl:%s%s%s%s, idx:%02X, pt:%02X]
    ", + sprintf(buf, "        [%u x %u @ (%i, %u) (iw:%u, dw:%u) (%u bpp), p:%06X fp:%02X, fl:%s%s%s%s, idx:%02X, pt:%02X]
    ", iwidth * bdMultiplier[bitdepth], height, xpos, ypos, iwidth, dwidth, op_bitmap_bit_depth[bitdepth], ptr, firstPix, (flags&OPFLAG_REFLECT ? "REFLECT " : ""), @@ -306,3 +240,4 @@ void OPBrowserWindow::DumpBitmapCore(QString & list, uint64_t p0, uint64_t p1) (flags&OPFLAG_RELEASE ? "RELEASE" : ""), idx, pitch); list += QString(buf); } + diff --git a/src/gui/debug/riscdasmbrowser.cpp b/src/gui/debug/riscdasmbrowser.cpp index 194bb11..be2196f 100644 --- a/src/gui/debug/riscdasmbrowser.cpp +++ b/src/gui/debug/riscdasmbrowser.cpp @@ -39,7 +39,6 @@ RISCDasmBrowserWindow::RISCDasmBrowserWindow(QWidget * parent/*= 0*/): QWidget(p hbox1->addWidget(address); hbox1->addWidget(go); - // Need to set the size as well... // resize(560, 480); diff --git a/src/gui/mainwin.cpp b/src/gui/mainwin.cpp index 28d022b..88b4d19 100644 --- a/src/gui/mainwin.cpp +++ b/src/gui/mainwin.cpp @@ -175,7 +175,7 @@ MainWin::MainWin(bool autoRun): running(true), powerButtonOn(false), palAct->setCheckable(true); connect(palAct, SIGNAL(triggered()), this, SLOT(SetPAL())); - blurAct = new QAction(QIcon(":/res/generic.png"), tr("Blur"), this); + blurAct = new QAction(QIcon(":/res/blur.png"), tr("Blur"), this); blurAct->setStatusTip(tr("Sets OpenGL rendering to GL_NEAREST")); blurAct->setCheckable(true); connect(blurAct, SIGNAL(triggered()), this, SLOT(ToggleBlur())); @@ -208,32 +208,33 @@ MainWin::MainWin(bool autoRun): running(true), powerButtonOn(false), frameAdvanceAct->setShortcut(QKeySequence(tr("F7"))); connect(frameAdvanceAct, SIGNAL(triggered()), this, SLOT(FrameAdvance())); - fullScreenAct = new QAction(QIcon(":/res/generic.png"), tr("F&ull Screen"), this); + fullScreenAct = new QAction(QIcon(":/res/fullscreen.png"), tr("F&ull Screen"), this); fullScreenAct->setShortcut(QKeySequence(tr("F9"))); + fullScreenAct->setCheckable(true); connect(fullScreenAct, SIGNAL(triggered()), this, SLOT(ToggleFullScreen())); // Debugger Actions - memBrowseAct = new QAction(QIcon(":/res/generic.png"), tr("Memory Browser"), this); + memBrowseAct = new QAction(QIcon(":/res/tool-memory.png"), tr("Memory Browser"), this); memBrowseAct->setStatusTip(tr("Shows the Jaguar memory browser window")); // memBrowseAct->setCheckable(true); connect(memBrowseAct, SIGNAL(triggered()), this, SLOT(ShowMemoryBrowserWin())); - cpuBrowseAct = new QAction(QIcon(":/res/generic.png"), tr("CPU Browser"), this); + cpuBrowseAct = new QAction(QIcon(":/res/tool-cpu.png"), tr("CPU Browser"), this); cpuBrowseAct->setStatusTip(tr("Shows the Jaguar CPU browser window")); // memBrowseAct->setCheckable(true); connect(cpuBrowseAct, SIGNAL(triggered()), this, SLOT(ShowCPUBrowserWin())); - opBrowseAct = new QAction(QIcon(":/res/generic.png"), tr("OP Browser"), this); + opBrowseAct = new QAction(QIcon(":/res/tool-op.png"), tr("OP Browser"), this); opBrowseAct->setStatusTip(tr("Shows the Jaguar OP browser window")); // memBrowseAct->setCheckable(true); connect(opBrowseAct, SIGNAL(triggered()), this, SLOT(ShowOPBrowserWin())); - m68kDasmBrowseAct = new QAction(QIcon(":/res/generic.png"), tr("68K Listing Browser"), this); + m68kDasmBrowseAct = new QAction(QIcon(":/res/tool-68k-dis.png"), tr("68K Listing Browser"), this); m68kDasmBrowseAct->setStatusTip(tr("Shows the 68K disassembly browser window")); // memBrowseAct->setCheckable(true); connect(m68kDasmBrowseAct, SIGNAL(triggered()), this, SLOT(ShowM68KDasmBrowserWin())); - riscDasmBrowseAct = new QAction(QIcon(":/res/generic.png"), tr("RISC Listing Browser"), this); + riscDasmBrowseAct = new QAction(QIcon(":/res/tool-risc-dis.png"), tr("RISC Listing Browser"), this); riscDasmBrowseAct->setStatusTip(tr("Shows the RISC disassembly browser window")); // memBrowseAct->setCheckable(true); connect(riscDasmBrowseAct, SIGNAL(triggered()), this, SLOT(ShowRISCDasmBrowserWin())); diff --git a/src/gui/virtualjaguar.qrc b/src/gui/virtualjaguar.qrc index 87fc927..4225d19 100644 --- a/src/gui/virtualjaguar.qrc +++ b/src/gui/virtualjaguar.qrc @@ -10,6 +10,13 @@ ../../res/zoom100.png ../../res/zoom200.png ../../res/zoom300.png + ../../res/blur.png + ../../res/fullscreen.png + ../../res/tool-memory.png + ../../res/tool-cpu.png + ../../res/tool-op.png + ../../res/tool-68k-dis.png + ../../res/tool-risc-dis.png ../../res/generic.png ../../res/cart-blank.png ../../res/label-blank.png diff --git a/src/m68000/cpuextra.c b/src/m68000/cpuextra.c index 3b57590..e165dd2 100644 --- a/src/m68000/cpuextra.c +++ b/src/m68000/cpuextra.c @@ -21,6 +21,7 @@ int CurrentInstrCycles; struct regstruct regs; + // // Make displacement effective address for 68000 // @@ -51,6 +52,7 @@ uint32_t get_disp_ea_000(uint32_t base, uint32_t dp) #endif } + // // Create the Status Register from the flags // @@ -60,6 +62,7 @@ void MakeSR(void) | (GET_NFLG << 3) | (GET_ZFLG << 2) | (GET_VFLG << 1) | GET_CFLG); } + // // Set up the flags from Status Register // @@ -94,6 +97,7 @@ void MakeFromSR(void) // set_special(SPCFLAG_DOINT); } + // // Rudimentary exception handling. This is really stripped down from what // was in Hatari. @@ -108,6 +112,10 @@ NB: Seems that when an address exception occurs, it doesn't get handled properly // void Exception(int nr, uint32_t oldpc, int ExceptionSource) { + uint32_t currpc = m68k_getpc(), newpc; + +// Need to figure out how to report this stuff without using printf on stdout :-/ +#if 0 char excNames[33][64] = { "???", "???", "Bus Error", "Address Error", "Illegal Instruction", "Zero Divide", "CHK", "TrapV", @@ -123,7 +131,6 @@ char excNames[33][64] = { printf("Exception #%i occurred! (%s)\n", nr, (nr < 32 ? excNames[nr] : (nr < 48 ? "Trap #" : "????"))); printf("Vector @ #%i = %08X\n", nr, m68k_read_memory_32(nr * 4)); //abort(); - uint32_t currpc = m68k_getpc(), newpc; printf("PC = $%08X\n", currpc); printf("A0 = $%08X A1 = $%08X A2 = $%08X A3 = $%08X\n", m68k_areg(regs, 0), m68k_areg(regs, 1), m68k_areg(regs, 2), m68k_areg(regs, 3)); printf("A4 = $%08X A5 = $%08X A6 = $%08X A7 = $%08X\n", m68k_areg(regs, 4), m68k_areg(regs, 5), m68k_areg(regs, 6), m68k_areg(regs, 7)); @@ -141,6 +148,7 @@ do printf("%s%08X: %s\n", (oldpc == currpc ? ">" : " "), oldpc, buffer); } while (disPC < (currpc + 10)); +#endif /*if( nr>=2 && nr<10 ) fprintf(stderr,"Exception (-> %i bombs)!\n",nr);*/ @@ -317,6 +325,7 @@ while (disPC < (currpc + 10)); #endif } + /* The routines below take dividend and divisor as parameters. They return 0 if division by zero, or exact number of cycles otherwise. @@ -394,6 +403,7 @@ STATIC_INLINE int getDivu68kCycles_2 (uint32_t dividend, uint16_t divisor) return mcycles * 2; } + // This is called by cpuemu.c int getDivu68kCycles(uint32_t dividend, uint16_t divisor) { @@ -402,11 +412,11 @@ int getDivu68kCycles(uint32_t dividend, uint16_t divisor) return v; } + // // DIVS // Signed division // - STATIC_INLINE int getDivs68kCycles_2(int32_t dividend, int16_t divisor) { int mcycles; @@ -451,6 +461,7 @@ STATIC_INLINE int getDivs68kCycles_2(int32_t dividend, int16_t divisor) return mcycles * 2; } + // This is called by cpuemu.c int getDivs68kCycles(int32_t dividend, int16_t divisor) { @@ -458,3 +469,4 @@ int getDivs68kCycles(int32_t dividend, int16_t divisor) // write_log ("S%d ", v); return v; } + diff --git a/src/m68000/m68kdasm.c b/src/m68000/m68kdasm.c index 007f9d6..0720c40 100644 --- a/src/m68000/m68kdasm.c +++ b/src/m68000/m68kdasm.c @@ -369,6 +369,7 @@ unsigned int m68k_disasm(char * output, uint32_t addr, uint32_t * nextpc, int cn return numberOfBytes; } + // // Disasemble one instruction at pc and store in str_buff // @@ -376,3 +377,4 @@ unsigned int m68k_disassemble(char * str_buff, unsigned int pc, unsigned int cpu { return m68k_disasm(str_buff, pc, 0, 1); } + diff --git a/src/m68000/m68kinterface.c b/src/m68000/m68kinterface.c index 12e5763..bdaa0c4 100644 --- a/src/m68000/m68kinterface.c +++ b/src/m68000/m68kinterface.c @@ -77,6 +77,8 @@ cpuop_func * cpuFunctionTable[65536]; #endif #define CPU_DEBUG + + void Dasm(uint32_t offset, uint32_t qt) { #ifdef CPU_DEBUG @@ -102,6 +104,7 @@ void Dasm(uint32_t offset, uint32_t qt) #endif } + #ifdef CPU_DEBUG void DumpRegisters(void) { @@ -122,6 +125,7 @@ void m68k_set_cpu_type(unsigned int type) { } + // Pulse the RESET line on the CPU void m68k_pulse_reset(void) { @@ -190,6 +194,7 @@ void m68k_pulse_reset(void) #endif } + int m68k_execute(int num_cycles) { #if 0 @@ -342,6 +347,7 @@ if (inRoutine) #endif } + /* ASG: rewrote so that the int_level is a mask of the IPL0/IPL1/IPL2 bits */ void m68k_set_irq(unsigned int intLevel) { @@ -368,6 +374,7 @@ void m68k_set_irq(unsigned int intLevel) #endif } + // Check for interrupts STATIC_INLINE void m68ki_check_interrupts(void) { @@ -380,6 +387,7 @@ STATIC_INLINE void m68ki_check_interrupts(void) #endif } + // Service an interrupt request and start exception processing void m68ki_exception_interrupt(uint32_t intLevel) { @@ -495,6 +503,7 @@ void m68ki_exception_interrupt(uint32_t intLevel) #endif } + // Initiate exception processing STATIC_INLINE uint32_t m68ki_init_exception(void) { @@ -518,6 +527,7 @@ STATIC_INLINE uint32_t m68ki_init_exception(void) #endif } + // 3 word stack frame (68000 only) STATIC_INLINE void m68ki_stack_frame_3word(uint32_t pc, uint32_t sr) { @@ -534,6 +544,7 @@ STATIC_INLINE void m68ki_stack_frame_3word(uint32_t pc, uint32_t sr) #endif } + unsigned int m68k_get_reg(void * context, m68k_register_t reg) { if (reg <= M68K_REG_A7) @@ -551,6 +562,7 @@ unsigned int m68k_get_reg(void * context, m68k_register_t reg) return 0; } + void m68k_set_reg(m68k_register_t reg, unsigned int value) { if (reg <= M68K_REG_A7) @@ -566,6 +578,7 @@ void m68k_set_reg(m68k_register_t reg, unsigned int value) regs.regs[15] = value; } + // // Check if the instruction is a valid one // @@ -579,6 +592,7 @@ unsigned int m68k_is_valid_instruction(unsigned int instruction, unsigned int cp return 1; } + // Dummy functions, for now, until we prove the concept here. :-) // Temp, while we're using the Musashi disassembler... @@ -594,6 +608,7 @@ int m68k_cycles_remaining(void) {} /* Number of cycles left */ void m68k_modify_timeslice(int cycles) {} /* Modify cycles left */ //void m68k_end_timeslice(void) {} /* End timeslice now */ + void m68k_end_timeslice(void) { #if 0 diff --git a/src/m68000/readcpu.c b/src/m68000/readcpu.c index 3287e03..4fcb100 100644 --- a/src/m68000/readcpu.c +++ b/src/m68000/readcpu.c @@ -153,7 +153,9 @@ const struct mnemolookup lookuptab[] = { { i_ILLG, "" }, }; -struct instr *table68k; + +struct instr * table68k; + STATIC_INLINE amodes mode_from_str(const char * str) { @@ -174,6 +176,7 @@ STATIC_INLINE amodes mode_from_str(const char * str) return 0; } + STATIC_INLINE amodes mode_from_mr(int mode, int reg) { switch (mode) @@ -203,6 +206,7 @@ STATIC_INLINE amodes mode_from_mr(int mode, int reg) return 0; } + static void build_insn(int insn) { int find = -1; @@ -948,8 +952,10 @@ void read_table68k(void) build_insn(i); } + static int mismatch; + static void handle_merges (long int opcode) { uint16_t smsk; @@ -1087,6 +1093,7 @@ if (opcode == 0x31C3 || code == 0x31C3) } } + // What this really does is expand the # of handlers, which is why the // opcode has to be passed into the opcode handler... // E.g., $F620 maps into $F621-F627 as well; this code does this expansion. @@ -1108,7 +1115,9 @@ void do_merges(void) nr_cpuop_funcs = nr; } + int get_no_mismatches(void) { return mismatch; } + diff --git a/virtualjaguar.pro b/virtualjaguar.pro index d31d2fb..6e0862f 100644 --- a/virtualjaguar.pro +++ b/virtualjaguar.pro @@ -45,6 +45,10 @@ QMAKE_CXXFLAGS += `$(CROSS)sdl-config --cflags` # Need to add libcdio stuffola (checking/including)... +# Translations. None yet. :-( +#TRANSLATIONS = virtualjaguar_fr.ts \ +# virtualjaguar_gr.ts + INCLUDEPATH += \ src \ src/gui -- 2.37.2