[sebhc] Emulator fix

Steven Parker sp11 at hotmail.com
Sat May 1 18:16:56 CDT 2004

>I found the port address that is causing the problem. According to the log
>file, it's I/O address 0373 (251 or 0xFB),  the code says it's related to
>the console being connected via the H8-5 card:
>Log File:  "***Port 373 is not implemented.***"

I'm guessing the tape s/w is polling ports to find the terminal.  It's been 
a while since I played with any tape s/w but I seem to recall it waits for 
you to hit a key, right?  So the fix would be to simulate the port by 
returning a value that would look like the usart has empty buffers and an 
un-asserted DSR ("nobody home").

Ideally, the emulator should do this (simulate idle or unconnected device) 
for all ports that might be associated with common devices.  And perhaps 
accesses to any other port could simply be logged but not stop execution (as 
it would not stop a real CPU).  Just return a fixed value (like zero).

>Simply commenting out the bNotImplemented Line so
>that the output goes no where didn't seem to help.

I would have expected it to keep the CPU going, at least - did it?  But 
returning an unitialized value may have confused the polling routine.  Try 

//  Ports 372 and 373 were the console USART ports if the console was 
//  via the H8-5's serial I/O port.  Not used.
//  2004.05.01.sp - Checked by tape software, so simulate in idle status.

    case 0372:
        nData = 0;
    case 0373:

Then, down at the end of the routine, to keep it from halting on 
unimplemented inputs entirely (but still log them and display the status 

//  2004.05.01.sp - Continue execution anyway (as a real CPU would)
        nData = 0;
//      Sleep(5000);
//      SetEvent(theApp.m_IPC.hShutdown);

Let me know if that fixes it!


- Steven

MSN Toolbar provides one-click access to Hotmail from any Web page – FREE 
download! http://toolbar.msn.com/go/onm00200413ave/direct/01/

Delivered by the SEBHC Mailing List

More information about the Sebhc mailing list