Stockly.com Forums

Stockly.com Forums (http://www.stockly.com/forums/index.php)
-   Altair 680 (http://www.stockly.com/forums/forumdisplay.php?f=25)
-   -   6800 Details (http://www.stockly.com/forums/showthread.php?t=502)

joewing 09-01-2007 02:54 AM

6800 Details
 
Hello!
I've implemented an Altair 680 on a Spartan-3E FPGA, unfortunately
getting BASIC to load is giving me difficulties. I've found two versions
of BASIC online and tried both with little success. I think my problem is
the setting of the flag registers.
Anyway, I guess my question is, do the TBA and TAB instructions affect
the flag registers? Also, what is the proper behavior for CPX, ROR, ASR,
and LSR?

For a little background, I'm using a Spartan-3E starter kit attached
to a VT-320. I'm using 16k of RAM (which is loaded on reset with BASIC)
all implemented in the FPGA. If anyone's interested in the source (all
Verilog), I'd be more than happy to provide it.

Thanks!

Grant Stockly 09-01-2007 03:00 AM

Did you find this site from the S record header? :) One of the two versions probably came from me. I got the KCACR basic off of a real cassette tape. I've tested/verified two versions and released them out on the web.

I know this sounds stupid since you're obviously smart enough do the FPGA work... but have you been jumping to 0000? Are you sure your memory image is good? I can e-mail you mine.

Can you run the 6800 ACIA monitor? I can send you the binary file for that if you want.

Grant

joewing 09-01-2007 03:08 AM

I found this site searching for information about the Altair 680 actually :)
One of the two versions of BASIC I'm using came from this site. It gets to
the point where displays the version info (and the RAM size, though
incorrectly) and then just does bizzare things.

The ACIA monitor runs perfectly... not sure where I found that...,
I'm actually tempted to try VTL-2, though I haven't found a S file for
that (I wrote a nice little C program to turn S files into Verilog).
I have a PDF document with the VTL-2 assembly listing in it, but typing
all that in would be painful.

joewing 09-02-2007 02:51 AM

Here's a picture of it running, still fighting with this guy :)
It dies after the PRINT.

http://joewing.net/basic.jpg

Grant Stockly 09-02-2007 07:55 AM

Thanks for keeping me updated! Are you using a public core or your own? Have you made a test series for it and verified all of the opcodes and status bits?

The next step should be a vga core to emulate a terminal. There is a GREAT project out there that I tried on my Spartan 3 kit. It is a complete System09 on the board. VGA, PS2, monitor, etc. If you want I can try to find the site.

It ran out of the box on the Digilent board.

joewing 09-03-2007 03:48 AM

I'm using my own core. I've developed a fairly large test for it, though
there are still several instructions that need to be exercised more.
I got it to finally display the proper amount of free memory, though
it still doesn't want to work right... More testing :)
Of course the problem for a few things is that I don't know what the proper
behavior should be. The two 6800 instruction set listings I have been
using disagree on a few details:
ftp://ftp.comlab.ox.ac.uk/pub/Cards/txt/6800.txt
and
http://www.electronics.dit.ie/staff/...structions.htm

For example, one says CPX sets the carry flag, the other says it doesn't
(of course one also gives the same opcode for TAB and TBA).
Once I get everything working with the VT-320, PS/2 and VGA capabilities
certainly would be fun :)

Anyway, that System09 project looks pretty cool, I may have to load that
up and give it a try.

Grant Stockly 09-03-2007 05:16 AM

Do you have the motorola manual? That should have the best information in it I would think...


I wonder if the basic would run on a 6809?

joewing 09-03-2007 10:37 PM

I finally found the manual online here:
http://bitsavers.org/pdf/motorola/M6...lMan_Mar75.pdf

The problem was that for push I was decrementing the stack pointer before
saving the value (and doing the opposite for pull). I fixed that and now it
works!

http://joewing.net/basic2.jpg

herby1620 10-14-2007 07:05 AM

Altair 680 Basic locations?
 
I see that the KC cassette version of the 680 basic code is "out there". Has anyone posted a version of the S1/S9 code as a text file?? Does Microsoft know about this? Do they care?? I don't see anywhere where links are shown.

I'd be very interested in this. I've (somewhere) got one of the cassettes (long ago, it is buried now, I suspect) and want to adapt it to a different ACIA based monitor. As I remember it, the "instruction manual" was a small sheet of paper (less than letter size) printed on both sides.

I never built a KC tape box. I had an ASR33 teletype and then a floppy disk (all 100k of it!).

The other basic (Uiterwyk's) that is BCD based (more accurate, slower) I long ago typed in the source. Interesting how you find out about how basic works inside. The Microsoft (Altair 680) one used tokens, the Uiterwyk one always re-scanned the text (slower).

Grant Stockly 10-14-2007 07:47 AM

2 Attachment(s)
I made that text file that is floating around. :) Recovered it off of the tape myself.

Basic uses the ACIA ROM to do serial I/O. It also uses the KCACR ROM for tape I/O. You should be able to just write your own ROMs or change the call locations for those ROM calls.

Download the attached files for the two versions of KCACR basic. These files are ready to be transmitted as is to the ACIA monitor ROM in the 680.


All times are GMT. The time now is 07:02 PM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.