at67 emulator

Using, learning, programming and modding the Gigatron and anything related.
Forum rules
Be nice. No drama.
at67
Posts: 123
Joined: 14 May 2018, 08:29

Re: at67 emulator

Post by at67 » 05 Feb 2020, 15:12

dwesti wrote:
05 Feb 2020, 15:01
Do you plan to add breakpoints for debugger ?
There are already breakpoints for both VCPU and Native.

Press CTRL-F6 -> Press CTRL-D

Click on any instruction, (the red X clears all breakpoints, CTRL-M switches between VCPU and Native once you have pressed CTRL-D).

You can also add breakpoints to your VCPU ASM code with _breakpoint_, just use it as if it was a label next to the instruction you want to break on.

When you load that source file into the emulator, the Debugger will automatically start in breakpoint mode.

CTRL-F7 runs to next breakpoint, CTRL-F8 single steps, CTRL-F9 runs until watch variables changes, it's all in the help screen.

There are a few quirks, it's a work in progress, i.e. it can be hard to break on code waiting on input, debugger can timeout, but right now it mostly works.

frabuk
Posts: 9
Joined: 06 Mar 2020, 21:16

Re: at67 emulator

Post by frabuk » 12 Apr 2020, 22:05

Hi,

first of all thank you! Great software.

I compiled your emulator under linux. However I was not able to start the Terminal in order to talk to the serial port. I’m getting cannot open /dev/ttyS3 error and the emulator turns black. I want to toy around with serial I/O in the emulator. Is this possible? Or is the terminal mode only used to connect real hardware?

Thanks again!

Christoph

at67
Posts: 123
Joined: 14 May 2018, 08:29

Re: at67 emulator

Post by at67 » 13 Apr 2020, 03:19

frabuk wrote:
12 Apr 2020, 22:05
first of all thank you! Great software.
:)
frabuk wrote:
12 Apr 2020, 22:05
I compiled your emulator under linux. However I was not able to start the Terminal in order to talk to the serial port. I’m getting cannot open /dev/ttyS3 error and the emulator turns black. I want to toy around with serial I/O in the emulator. Is this possible? Or is the terminal mode only used to connect real hardware?
Terminal mode is purely for talking to real Gigatron hardware through a USB to Serial interface, (one of the many Arduino solutions posted in the forums and in GitHub), the black screen is being caused by a timeout. I have never actually tested the Terminal mode under Linux with real hardware as I run Linux through a VM and could never get it's serial ports to work, in theory it should work as long as the name of your serial device is correct and you have correctly setup and configured one of the Arduino PC to Gigatron interfaces.

If you mean experimenting with the Gigatron's Vertical Blank software serial communications, what is it you are actually trying to do? If you are running the correct ROM version, the emulator should be presenting the correct data stream as real hardware would.

frabuk
Posts: 9
Joined: 06 Mar 2020, 21:16

Re: at67 emulator

Post by frabuk » 13 Apr 2020, 12:28

If you mean experimenting with the Gigatron's Vertical Blank software serial communications, what is it you are actually trying to do? If you are running the correct ROM version, the emulator should be presenting the correct data stream as real hardware would.
I succesfully loaded Micorchess on my hardware gigatron and i thought if i could write the Microchess output also to serial out i could parse that on the arduino. And maybe have two instances of Micorochess playing each other until they becom sentient ;-) Or have the gigatron play another chess software via Internet Relay Chat. Something in that vein ...

User avatar
marcelk
Posts: 490
Joined: 13 May 2018, 08:26

Re: at67 emulator

Post by marcelk » 13 Apr 2020, 13:03

The wrapper around Microchess draws the text on the video display. Although Microchess itself is 6502 code, the screen drawing is done by a vCPU function _PrintChar. It shouldn't be too hard to extend this code with a call to SYS_SendSerial1_v3_80 and send that byte out.

On the Arduino, you make sure you're in terminal mode ('T' command). In thise mode it catches these bytes and sends them back over USB to your computer. (Instead of writing them into the Arduino's EPROM, which is what happens outside terminal mode).

Microchess is primitive. Special moves such as castling, promotion and en-passant aren't supported. Instead you quit the program and edit the board. In our case you end up in a wozmon when you quit. After editing you jump back into the program. That is how it was done on the KIM-1, except that we use wozmon instead of the KIM monitor. The Microchess manual is on Peter Jenning's site: http://www.benlo.com/microchess/Kim-1Microchess.html . Wozmon manuals are everywhere on the Internet. I like this one: https://www.sbprojects.net/projects/apple1/wozmon.php

Post Reply