[sebhc] Emulator fix

Mark Garlanger garlangr at verizon.net
Sat May 1 20:26:55 CDT 2004

Hi Steven,

The emulator was first complaining about write attempts to that address. The
change I had made before just let that write drop those bits. In the read
codeI had commented out the setting of bNotImplemented line, and reading
both addresses would just return 0. With those changes it didn't halt it but
it didn't seem to do anything after that. Making the changes you proposed
below to the port read code didn't seem to change the end result - still not
doing anything after that (at least that I could tell).
Part of the problem could be that I don't know what I'm doing with the H8.
I never had an H8, I did have an H89 but only used disks - CP/M and HDOS.
And the last time I used the H89 was probably in 1989 or 1990...

The emulator seems to continue processing (the MON led stays off), but the
H19 doesn't provide anything and I don't see anything that implies something
is being accomplished. The only thing I know to do is hit reset and load
another program.

I would really like to get the H17 supported, so I can try with disk images
instead of tapes.


----- Original Message ----- 
From: "Steven Parker" <sp11 at hotmail.com>
To: <sebhc at sebhc.org>
Sent: Saturday, May 01, 2004 6:16 PM
Subject: [sebhc] Emulator fix

> >I found the port address that is causing the problem. According to the
> >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
> 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
> 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
> this:
> //  Ports 372 and 373 were the console USART ports if the console was
> connected
> //  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;
>         break;
>     case 0373:
>         break;
> 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
> window):
> //  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!
> Cheers,
> - 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

Delivered by the SEBHC Mailing List

More information about the Sebhc mailing list