]> Shamusworld >> Repos - virtualjaguar/commitdiff
Mask out ALT for now, small optimization in screen rendering code.
authorShamus Hammons <jlhamm@acm.org>
Thu, 6 Oct 2011 14:28:34 +0000 (14:28 +0000)
committerShamus Hammons <jlhamm@acm.org>
Thu, 6 Oct 2011 14:28:34 +0000 (14:28 +0000)
17 files changed:
docs/INSTALL
docs/README
docs/WHATSNEW
res/help.html [new file with mode: 0644]
res/pause.png
res/power.png
res/zoom100.png
res/zoom200.png
res/zoom300.png
src/filedb.cpp
src/gui/glwidget.cpp
src/gui/help.cpp
src/gui/keygrabber.cpp
src/gui/mainwin.cpp
src/gui/virtualjaguar.qrc
src/op.cpp
src/tom.cpp

index 299e2062b102d2029bc05fc7b11ebb41c389870b..36ea778ef00a4bb2fb413bc75a8c76dc48b4f8c7 100644 (file)
@@ -31,8 +31,7 @@ Optionally you can manually strip virtualjaguar[.exe] to downsize the binary.
 You can also run upx on the binary as well and you'll end up with a somewhat
 smaller binary.
 
 You can also run upx on the binary as well and you'll end up with a somewhat
 smaller binary.
 
-That's it! You can now start the emulator with ./virtualjaguar. See the output
-for more details (or stdout.txt on Win32) or consult the README file for more
-info.
+That's it! You can now start the emulator with ./virtualjaguar. See the built
+in help (Help|Contents) for more info.
 
 For even more info, go to http://icculus.org/virtualjaguar.
 
 For even more info, go to http://icculus.org/virtualjaguar.
index da59ae45a948fe6f002f1fdbadd6ec33ebe700fa..1f2f3b3669ce766b8c1b7f125256b4c4408c73c9 100644 (file)
@@ -107,75 +107,9 @@ http://www.libsdl.org. Thanks Sam--you rock! :)
 - Using Virtual Jaguar GCC/Qt -
 -------------------------------
 
 - Using Virtual Jaguar GCC/Qt -
 -------------------------------
 
-After compiling the binary (see INSTALL) you can now run original Atari Jaguar
-games. These games are distributed on cartridges and can therefore cannot be
-used on a PC (we're still waiting for that Jaguar-on-a-PCI-card that you plug
-into your late model PC, complete with cartridge slot and controller connectors
-;-). To use these games on Virtual Jaguar GCC/Qt you need to get ROM images.
-For legal issues concerning ROM images please consult the DISCLAIMER at the
-beginning of this file.
-
-After obtaining several game ROMs you can now use Virtual Jaguar using the
-following command:
-
-./virtualjaguar [romfile] [-switches]
-
-The context of ROMFILE is the filename of the an Atari Jaguar ROM dump (can be
-either compressed or uncompressed). You can also use switches. By just typing
-./virtualjaguar -? (or ./virtualjaguar -help) you get an overview of the
-options you can use. WIN32 users should look into the stdout.txt in the
-directory they ran Virtual Jaguar for that information. Also, WIN32 users
-should be aware that if their ROM filenames contain any spaces, you will have
-to enclose the ROMFILE in double quotes for Virtual Jaguar to function
-properly.
-
-Note that running Virtual Jaguar this way will cause the emulator to exit
-completely upon pressing the ESC key. If this is not what you want, then omit
-the ROMFILE and it will bring up a nice GUI instead.
-
-If you prefer a nice GUI instead of typing in command lines, you can either
-type ./virtualjaguar or double click on the Virtual Jaguar executable. If you
-have a directory full of ROM files, you can tell Virtual Jaguar where they are
-by editing the appropriate line in the vj.cfg file (it assumes a ROMs directory
-under the directory where VJ lives) so that they show up when you pick the
-"Load" option from the "File" menu.
-
-This emulator also emulates the Atari Jaguar gamepads. By using the following
-keyboard or joystick settings you can (possibly) play a given game:
-
-Atari Button C       : Z or joystick button 3
-Atari Button B       : X or joystick button 2
-Atari Button A       : C or joystick button 1
-Atari Buttons 1 - 10 : Keypad 0 - 9 (0 = 10)
-Atari Start/Pause    : ENTER
-Atari Select         : '
-Atari UP             : UP    or joystick UP
-Atari DOWN           : DOWN  or joystick DOWN
-Atari LEFT           : LEFT  or joystick LEFT
-Atari RIGHT          : RIGHT or joystick RIGHT
-Atari #              : Keypad /
-Atari *              : Keypad *
-
-With ESC you can easily stop Virtual Jaguar GCC/Qt which will get you back to
-the GUI (pressing ESC again will take you back to the game). To exit VJ, you
-can either select File|Quit or press the "Q" key on your keyboard. If you want
-to change the key layout, simply edit the vj.cfg file and change the keys. :)
-NOTE: There are quite a few keys mapped to debugging functions at present. You
-have been warned!
-
--------------------
-- A note on sound -
--------------------
-
-By default, the Virtual Jaguar's DSP is turned off, since it doesn't work very
-well at present (it requires a lot of horsepower to sound decent at this
-point!). In order to hear any sound at all, you have to either edit the vj.cfg
-file and change the appropriate line or set the DSP on in the GUI (found under
-Settings|Misc). One word of caution: Use the old DSP core instead of the new
-pipelined version for now--the new pipelined DSP core has not yet been
-optimized and runs quite slow at present! Once the DSP issues have been ironed
-out, it will be turned on by default and you won't have to deal with it
-anymore. ;)
+Simply double click on the Virtual Jaguar icon or type ./virtualjaguar from
+the command line. See the built in help (under Help|Contents) for more
+information on how to use it. :-)
 
 -----------
 - Finally -
 
 -----------
 - Finally -
@@ -190,16 +124,13 @@ website [http://sdlemu.ngemu.com].
 
 We hope you enjoy the emulator and will use it wisely!
 
 
 We hope you enjoy the emulator and will use it wisely!
 
-Special thanks go to guys over at ngemu.com and #ngemu (EFNET). Thanks also to
-David Raingeard of Potato Emulation who originally developed this emulator and
+Thanks go to guys over at ngemu.com and #ngemu (EFNET). Thanks also to David
+Raingeard of Potato Emulation who originally developed this emulator and
 released the sources to the public. We couldn't have done it without you!
 
 released the sources to the public. We couldn't have done it without you!
 
-SDLEMU
-
+Special thanks go to everyone who submitted good, detailed bug reports,
+sometimes with demonstration code(!); your help has helped to make Virtual
+Jaguar better, more accurate, and more polished than it would be otherwise. We
+really appreciate your help!
 
 
-*** Stuff to add in:
-
- o  Documentation needs a rewrite, more or less, as the GUI is now front and
-    center. Need to update the docs to reflect this change.
- o  Document the new "solid" zip file archive mechanism which allows putting
-    artwork into a "ROM".
+SDLEMU
index 6d5d3a6f53be927fbc58b1167580b7b19b22449e..bb53efa6266d68b9744e53ab0556d31247c764a3 100644 (file)
@@ -6,7 +6,7 @@ Virtual Jaguar v2.0.0 GCC/Qt
   means is that now you can have other goodies inside of your ROM ZIP like
   labels, box art, and overlays. See README for details. [Shamus]
 * Various usability improvements, too many to list here. ;-) [Shamus]
   means is that now you can have other goodies inside of your ROM ZIP like
   labels, box art, and overlays. See README for details. [Shamus]
 * Various usability improvements, too many to list here. ;-) [Shamus]
-* Various compatibility improvemnents to the Jaguar core, too many to list
+* Various compatibility improvements to the Jaguar core, too many to list
   here. ;-) [Shamus]
 
 
   here. ;-) [Shamus]
 
 
diff --git a/res/help.html b/res/help.html
new file mode 100644 (file)
index 0000000..c9bd8cc
--- /dev/null
@@ -0,0 +1,13 @@
+<html>
+
+<head>
+<title>Virtual Jaguar: The Documentation</title>
+</head>
+
+<body>
+<h1><i>Virtual Jaguar:</i> The Documentation</h1>
+
+<i>Coming Soon!</i>
+
+</body>
+</html>
index 1032cb9a24b0b83d3b3a3a1db8b37b4f98671ede..7b03a0dea030b6e739bd70f6c51c2d9e4a36d279 100644 (file)
Binary files a/res/pause.png and b/res/pause.png differ
index 903b60d5ab52ac460f89223c7ca6d5bdc88eb356..742c441c48bca27f1669eab579f40741f97b7a44 100644 (file)
Binary files a/res/power.png and b/res/power.png differ
index 1c3422797fa446ec993ecd1d9ab755c17236ed10..8cbc738ea3258d7ddcc2577014a4fa08270493ba 100644 (file)
Binary files a/res/zoom100.png and b/res/zoom100.png differ
index 20821da1b4ab77fed337cb78eae085338528bd5d..62788fddc1520e7e38e15a8e738c22f58a6b4b0d 100644 (file)
Binary files a/res/zoom200.png and b/res/zoom200.png differ
index 3567764ae5d6440343c2425c48790bd4a1dc2d1f..9f9573fb0c332a114b05e2bc0cb63ee75636d7c6 100644 (file)
Binary files a/res/zoom300.png and b/res/zoom300.png differ
index e4e9e1fa28b25333c7daa222cab88be757d7e526..eadfda72f7cd5641da81fe13d4f4b5a4ad95ee04 100644 (file)
@@ -62,6 +62,7 @@ RomIdentifier romList[] = {
        { 0x47EBC158, "Theme Park (World)", FF_ROM | FF_VERIFIED },
        { 0x4899628F, "Hover Strike (World)", FF_ROM | FF_VERIFIED },
        { 0x4A08A2BD, "SuperCross 3D (World)", FF_ROM | FF_BAD_DUMP },
        { 0x47EBC158, "Theme Park (World)", FF_ROM | FF_VERIFIED },
        { 0x4899628F, "Hover Strike (World)", FF_ROM | FF_VERIFIED },
        { 0x4A08A2BD, "SuperCross 3D (World)", FF_ROM | FF_BAD_DUMP },
+       { 0x544E7A01, "Downfall (World)", FF_ROM | FF_VERIFIED },
        { 0x55A0669C, "[BIOS] Atari Jaguar Developer CD (World)", FF_BIOS },
        { 0x58272540, "Syndicate (World)", FF_ROM | FF_VERIFIED },
        { 0x5A101212, "Sensible Soccer - International Edition (World)", FF_ROM | FF_VERIFIED },
        { 0x55A0669C, "[BIOS] Atari Jaguar Developer CD (World)", FF_BIOS },
        { 0x58272540, "Syndicate (World)", FF_ROM | FF_VERIFIED },
        { 0x5A101212, "Sensible Soccer - International Edition (World)", FF_ROM | FF_VERIFIED },
index 2501ad8296a1d100c9bd3a2815718ef675edc878..65ccd57982ccd7f7ea42d6658333c67e0e17fb5d 100644 (file)
@@ -117,6 +117,15 @@ printf("Resizing: new raster width/height = %i x %i\n", rasterWidth, rasterHeigh
                }
 
                buffer = new uint32_t[textureWidth * textureHeight];
                }
 
                buffer = new uint32_t[textureWidth * textureHeight];
+#warning "!!! Remove all backbuffer stuff, since it's unneeded !!!"
+/*
+We do this here just as a quick 'n' dirty shortcut. We don't need a backbuffer,
+as OpenGL takes care of all that crap for us. This means we also have to fix the
+Jaguar core, giving it a setup function for setting things like the video buffer,
+etc.
+*/
+               backbuffer = buffer;
+
 //???
 memset(buffer, 0x00, textureWidth * textureHeight * sizeof(uint32_t));
                glGenTextures(1, &texture);
 //???
 memset(buffer, 0x00, textureWidth * textureHeight * sizeof(uint32_t));
                glGenTextures(1, &texture);
index 8bafe985bfccf48dcd60b5134b831f59729aec93..8c8c98d588454673d67b1d45f18fb8f4bc5d960f 100644 (file)
 
 #include "help.h"
 
 
 #include "help.h"
 
+
 HelpWindow::HelpWindow(QWidget * parent/*= 0*/): QWidget(parent, Qt::Dialog)
 {
        setWindowTitle(tr("Virtual Jaguar Help"));
 
        // Need to set the size as well...
 HelpWindow::HelpWindow(QWidget * parent/*= 0*/): QWidget(parent, Qt::Dialog)
 {
        setWindowTitle(tr("Virtual Jaguar Help"));
 
        // Need to set the size as well...
-//  resize(560, 480);
        resize(560, 480);
 
        layout = new QVBoxLayout();
        resize(560, 480);
 
        layout = new QVBoxLayout();
@@ -33,20 +33,15 @@ HelpWindow::HelpWindow(QWidget * parent/*= 0*/): QWidget(parent, Qt::Dialog)
 //     image->setPixmap(QPixmap(":/res/vj_title_small.png"));
 //     layout->addWidget(image);
 
 //     image->setPixmap(QPixmap(":/res/vj_title_small.png"));
 //     layout->addWidget(image);
 
-//     QString s = QString(tr("SVN %1<br>")).arg(__DATE__);
-       QString s;// = QString("");
-       s.append(tr(
-               "<h1>Virtual Jaguar Documentation</h1>"
-               "<br>"
-               "<b><i>Coming soon!</i></b>"
-       ));
        text = new QTextBrowser;
        text = new QTextBrowser;
-       text->setHtml(s);
+       text->setSource(QUrl("qrc:/res/help.html"));
        layout->addWidget(text);
 }
 
        layout->addWidget(text);
 }
 
-
 #if 0
 #if 0
+label size is 365x168
+scaled(365, 168
+
 #include "htmlviewer.moc"
 HtmlViewerWindow *htmlViewerWindow;
 
 #include "htmlviewer.moc"
 HtmlViewerWindow *htmlViewerWindow;
 
index cc0b7143b08c861cfbf2bab5cac6c94e6bfa316c..23954b855450c65fa765e984c022ddb8130c61c4 100644 (file)
@@ -45,5 +45,8 @@ void KeyGrabber::SetKeyText(int keyNum)
 void KeyGrabber::keyPressEvent(QKeyEvent * e)
 {
        key = e->key();
 void KeyGrabber::keyPressEvent(QKeyEvent * e)
 {
        key = e->key();
-       accept();
+
+       // Since this is problematic, we don't allow this key...
+       if (key != Qt::Key_Alt)
+               accept();
 }
 }
index 41c1a0ea70fa26116b29fb170c304f700b4c7b41..08693d01882415893540ffdaa5b964adcc38eac4 100644 (file)
@@ -79,7 +79,7 @@
 // We'll make the VJ core modular so that it doesn't matter what GUI is in
 // use, we can drop it in anywhere and use it as-is.
 
 // We'll make the VJ core modular so that it doesn't matter what GUI is in
 // use, we can drop it in anywhere and use it as-is.
 
-MainWin::MainWin(): running(false), powerButtonOn(false), showUntunedTankCircuit(true),
+MainWin::MainWin(): running(true), powerButtonOn(false), showUntunedTankCircuit(true),
        cartridgeLoaded(false), CDActive(false),//, alpineLoadSuccessful(false),
        pauseForFileSelector(false)
 {
        cartridgeLoaded(false), CDActive(false),//, alpineLoadSuccessful(false),
        pauseForFileSelector(false)
 {
@@ -115,7 +115,7 @@ MainWin::MainWin(): running(false), powerButtonOn(false), showUntunedTankCircuit
        powerAct->setStatusTip(tr("Powers Jaguar on/off"));
        powerAct->setCheckable(true);
        powerAct->setChecked(false);
        powerAct->setStatusTip(tr("Powers Jaguar on/off"));
        powerAct->setCheckable(true);
        powerAct->setChecked(false);
-       powerAct->setDisabled(true);
+//     powerAct->setDisabled(true);
        connect(powerAct, SIGNAL(triggered()), this, SLOT(TogglePowerState()));
 
        pauseAct = new QAction(QIcon(":/res/pause.png"), tr("Pause"), this);
        connect(powerAct, SIGNAL(triggered()), this, SLOT(TogglePowerState()));
 
        pauseAct = new QAction(QIcon(":/res/pause.png"), tr("Pause"), this);
@@ -226,7 +226,7 @@ MainWin::MainWin(): running(false), powerButtonOn(false), showUntunedTankCircuit
        x1Act->setChecked(zoomLevel == 1);
        x2Act->setChecked(zoomLevel == 2);
        x3Act->setChecked(zoomLevel == 3);
        x1Act->setChecked(zoomLevel == 1);
        x2Act->setChecked(zoomLevel == 2);
        x3Act->setChecked(zoomLevel == 3);
-       running = powerAct->isChecked();
+//     running = powerAct->isChecked();
        ntscAct->setChecked(vjs.hardwareTypeNTSC);
        palAct->setChecked(!vjs.hardwareTypeNTSC);
 
        ntscAct->setChecked(vjs.hardwareTypeNTSC);
        palAct->setChecked(!vjs.hardwareTypeNTSC);
 
@@ -294,11 +294,25 @@ void MainWin::closeEvent(QCloseEvent * event)
 
 void MainWin::keyPressEvent(QKeyEvent * e)
 {
 
 void MainWin::keyPressEvent(QKeyEvent * e)
 {
+       // We ignore the Alt key for now, since it causes problems with the GUI
+       if (e->key() == Qt::Key_Alt)
+       {
+               e->accept();
+               return;
+       }
+
        HandleKeys(e, true);
 }
 
 void MainWin::keyReleaseEvent(QKeyEvent * e)
 {
        HandleKeys(e, true);
 }
 
 void MainWin::keyReleaseEvent(QKeyEvent * e)
 {
+       // We ignore the Alt key for now, since it causes problems with the GUI
+       if (e->key() == Qt::Key_Alt)
+       {
+               e->accept();
+               return;
+       }
+
        HandleKeys(e, false);
 }
 
        HandleKeys(e, false);
 }
 
@@ -342,7 +356,7 @@ void MainWin::HandleKeys(QKeyEvent * e, bool state)
                        joypad_0_buttons[i] = (state ? 0x01 : 0x00);
 
 // Pad #2 is screwing up pad #1. Prolly a problem in joystick.cpp...
                        joypad_0_buttons[i] = (state ? 0x01 : 0x00);
 
 // Pad #2 is screwing up pad #1. Prolly a problem in joystick.cpp...
-// So let's try to fix it there. :-P
+// So let's try to fix it there. :-P [DONE]
                if (e->key() == (int)vjs.p2KeyBindings[i])
 //                     joypad_1_buttons[i] = (uint8)state;
                        joypad_1_buttons[i] = (state ? 0x01 : 0x00);
                if (e->key() == (int)vjs.p2KeyBindings[i])
 //                     joypad_1_buttons[i] = (uint8)state;
                        joypad_1_buttons[i] = (state ? 0x01 : 0x00);
@@ -444,9 +458,10 @@ void MainWin::Timer(void)
        {
                // Otherwise, run the Jaguar simulation
                JaguarExecuteNew();
        {
                // Otherwise, run the Jaguar simulation
                JaguarExecuteNew();
-//             memcpy(videoWidget->buffer, backbuffer, videoWidget->rasterHeight * videoWidget->rasterWidth);
-               memcpy(videoWidget->buffer, backbuffer, videoWidget->rasterHeight * videoWidget->textureWidth * sizeof(uint32_t));
-//             memcpy(surface->pixels, backbuffer, TOMGetVideoModeWidth() * TOMGetVideoModeHeight() * 4);
+////           memcpy(videoWidget->buffer, backbuffer, videoWidget->rasterHeight * videoWidget->rasterWidth);
+//No longer needed--see glwidget.cpp for details!
+//             memcpy(videoWidget->buffer, backbuffer, videoWidget->rasterHeight * videoWidget->textureWidth * sizeof(uint32_t));
+////           memcpy(surface->pixels, backbuffer, TOMGetVideoModeWidth() * TOMGetVideoModeHeight() * 4);
        }
 
        videoWidget->updateGL();
        }
 
        videoWidget->updateGL();
@@ -568,7 +583,7 @@ void MainWin::InsertCart(void)
 {
        // If the emulator is running, we pause it here and unpause it later
        // if we dismiss the file selector without choosing anything
 {
        // If the emulator is running, we pause it here and unpause it later
        // if we dismiss the file selector without choosing anything
-       if (running)
+       if (running && powerButtonOn)
        {
                ToggleRunState();
                pauseForFileSelector = true;
        {
                ToggleRunState();
                pauseForFileSelector = true;
@@ -618,6 +633,7 @@ void MainWin::ToggleCDUsage(void)
 {
        CDActive = !CDActive;
 
 {
        CDActive = !CDActive;
 
+#if 0
        if (CDActive)
        {
                powerAct->setDisabled(false);
        if (CDActive)
        {
                powerAct->setDisabled(false);
@@ -626,6 +642,7 @@ void MainWin::ToggleCDUsage(void)
        {
                powerAct->setDisabled(true);
        }
        {
                powerAct->setDisabled(true);
        }
+#endif
 }
 
 void MainWin::ResizeMainWindow(void)
 }
 
 void MainWin::ResizeMainWindow(void)
index 1e2f0f77b3e219c7d08eb8d7e351697b2bdf7595..1c60900511812985533d9db0b1d39ecafc4d78e2 100644 (file)
@@ -23,5 +23,6 @@
        <file>../../res/skunkboard-file.png</file>
        <file>../../res/homebrew-file.png</file>
        <file>../../res/unknown-file.png</file>
        <file>../../res/skunkboard-file.png</file>
        <file>../../res/homebrew-file.png</file>
        <file>../../res/unknown-file.png</file>
+       <file>../../res/help.html</file>
 </qresource>
 </RCC>
 </qresource>
 </RCC>
index 3765250e1ab55c78d1676f53efdff881c5f6a770..2978c6dc9541b4ea8e48ce5f9a1cf56b621bcbff 100644 (file)
@@ -682,9 +682,13 @@ OP: Scaled bitmap 4x? 4bpp at 34,? hscale=80 fpix=0 data=000756E8 pitch 1 hflipp
                                        op_pointer = link;
                                break;
                        case CONDITION_SECOND_HALF_LINE:
                                        op_pointer = link;
                                break;
                        case CONDITION_SECOND_HALF_LINE:
+//Here's the ASIC code:
+//  ND4(cctrue5, newheight[2], heightl[1], heightl[0], hcb[10]);
+//which means, do the link if bit 10 of HC is set...
+
                                // This basically means branch if bit 10 of HC is set
 #warning "Unhandled condition code causes emulator to crash... !!! FIX !!!"
                                // This basically means branch if bit 10 of HC is set
 #warning "Unhandled condition code causes emulator to crash... !!! FIX !!!"
-                               WriteLog("OP: Unexpected CONDITION_SECOND_HALF_LINE in BRANCH object\nOP: shuting down\n");
+                               WriteLog("OP: Unexpected CONDITION_SECOND_HALF_LINE in BRANCH object\nOP: shutting down!\n");
                                LogDone();
                                exit(0);
                                break;
                                LogDone();
                                exit(0);
                                break;
index 11d963b112673efe8374abe18603686242307871..ed47bf8043f79ac42a76052ab70aca2d8297811e 100644 (file)
@@ -770,6 +770,7 @@ void TOMExecScanline(uint16 scanline, bool render)
 
 //Interlacing is still not handled correctly here... !!! FIX !!!
        if (scanline & 0x01)                                                    // Execute OP only on even lines (non-interlaced only!)
 
 //Interlacing is still not handled correctly here... !!! FIX !!!
        if (scanline & 0x01)                                                    // Execute OP only on even lines (non-interlaced only!)
+//     if (!(scanline & 0x01))                                                 // Execute OP only on even lines (non-interlaced only!)
                return;
 
 //Hm, it seems that the OP needs to execute from zero, so let's try it:
                return;
 
 //Hm, it seems that the OP needs to execute from zero, so let's try it:
@@ -1386,6 +1387,8 @@ if (offset == VP)
        WriteLog("TOM: Vertical Period written by %s: %u (%sinterlaced)\n", whoName[who], data, (data & 0x01 ? "non-" : ""));
 if (offset == HDB1)
        WriteLog("TOM: Horizontal Display Begin 1 written by %s: %u\n", whoName[who], data);
        WriteLog("TOM: Vertical Period written by %s: %u (%sinterlaced)\n", whoName[who], data, (data & 0x01 ? "non-" : ""));
 if (offset == HDB1)
        WriteLog("TOM: Horizontal Display Begin 1 written by %s: %u\n", whoName[who], data);
+if (offset == HDB2)
+       WriteLog("TOM: Horizontal Display Begin 2 written by %s: %u\n", whoName[who], data);
 if (offset == HDE)
        WriteLog("TOM: Horizontal Display End written by %s: %u\n", whoName[who], data);
 if (offset == HP)
 if (offset == HDE)
        WriteLog("TOM: Horizontal Display End written by %s: %u\n", whoName[who], data);
 if (offset == HP)