Third and final attempt at the Altair project

Vintage Events and off topic talk

Postby vbriel » Feb Sat 13, 2010 8:38 am

Ok, I had more errors than I thought :shock: I decided to change over and use a 8080 program that tests each and every instruction and halts on any errors. I've made quick progress this way! Here's the instruction group I have finished:

JUMP instructions and FLAGS
ACCUMULATOR IMMEDIATE instructions
CALLS AND RETURNS
"MOV","INR",AND "DCR" instructions

I am down to the biggest test to debug, the arithmetic instructions. This will take a little while since many of the 8080 commands are arithmetic. Once I have this done, I'm going back to basic and see if it loads all the way.

Vince
User avatar
vbriel
Site Admin
 
Posts: 1184
Joined: Jul Tue 19, 2005 12:10 pm
Location: Ohio

Postby vbriel » Feb Tue 16, 2010 7:29 pm

OK, I'm closer. I almost get BASIC to load, but it comes up with OV error just before I get the prompt. I'm double checking all the flags and how they set with each instruction. My question is this:

Can somebody tell me if the aux carry (half carry) flag on the 8080 is only used for the DAA opcode? I can't get it to match Altair32 emulator with SBB opcode. Then I read somewhere that the half carry flag is only used on the DAA opcode. I need this confirmed.

Thanks,

Vince
User avatar
vbriel
Site Admin
 
Posts: 1184
Joined: Jul Tue 19, 2005 12:10 pm
Location: Ohio

Aux Carry

Postby jmmm » Feb Tue 16, 2010 7:47 pm

Dear Vince,

Here is a link to an 8080 data book that lists all the instructions individually and which flags they use or modify in Ch. 4:

http://www.datasheetarchive.com/pdf-dat ... 279578.pdf

It seems like almost all the arithmetic instructions are modifying the AC. I hope this helps. I am really looking forward to this new kit.

JMMM
jmmm
 
Posts: 10
Joined: Apr Thu 24, 2008 6:12 am

Postby xprt » Feb Wed 17, 2010 6:13 pm

Hi Vince,
Actually you should refer to the 8080 Assembly Language Programming Manual. It has detailed descriptions of each instruction. It says DAA is the only instruction that uses the auxiliary carry. SBB does not use auxiliary carry but does set or clear it.

Here's a link: http://www.tech-systems-labs.com/booksdata/8080-asbly-pro.pdf
xprt
 
Posts: 23
Joined: Jun Sun 15, 2008 8:05 pm

Postby vbriel » Feb Thu 18, 2010 5:48 am

Yeah, and that set or clear could affect DAA, since it looks at the HC flag to calculate the lower nibble. I've been looking at what Altair32 does with its HC flag on SBB and comparing it to the manual (I have the 8080 programming manual). It doesn't seem to follow what the manual states would set the HC flag. I can't even find a pattern that matches what the book says with the emulator.

The good news is, I scanned a web site that has a break down of 4K basic and it doesn't appear to use DAA. So, now I will begin the ugly task of stepping through basic line by line until I find where it errors out. I can use Rich Cini's Altair32 as a comparison to do this. It's a lot of work but I did something to make life easier.

Yesterday I installed a Breakpoint feature. I can set the address switches to stop when running when it hits the address on the switches! This means that I can now have set stop and start points while debugging it running BASIC. So, if I get 1000 steps into BASIC and have to stop, I find a unique address to stop at, then record that address. When I start up again, I just enter that address before I run and it will stop when it hits it.

I should know something by next weekend. This weekend I won't get anything done.

Vince
User avatar
vbriel
Site Admin
 
Posts: 1184
Joined: Jul Tue 19, 2005 12:10 pm
Location: Ohio

Postby vbriel » Feb Tue 23, 2010 2:39 pm

IT WORKS!!! More updates to come, but I debugged it to where BASIC loads correctly, now I have some more debugging to do but I'm getting there. I can do small programs!

This project is going forward!

Vince
User avatar
vbriel
Site Admin
 
Posts: 1184
Joined: Jul Tue 19, 2005 12:10 pm
Location: Ohio

Postby vbriel » Feb Sat 27, 2010 6:52 am

Ok, making progress, I think I'm running about 80%~ of regular speed altair. Still have I think just 1 bug left for 4K to work out.

I never knew 4K BASIC had no string variables, you have to use 8K! Wow, well, I'm going to maybe see if I can squeeze both into the propeller chip to download depending on power up switches. Gotta have a full BASIC to work with if you want.

Here's my bug, just so you know what I'm dealing with:

If I type:

A=1
A=A+1

I get an ?OV ERROR

if I type this:

A=2
A=A+1

This works. Certain numbers you can't add to. I'm going to step through this instruction to see what is going on. It takes about 2-4 hours to step through one line of BASIC being performed, so this is really a pain. The end result is I fix each bug as I hit them.

Once 4K is working, I'll move on to 8K. After that, I'll work on speed enhancement features and then the SD card to see if I can get it to load/store programs in memory.

Progress is very good so far. This is the best chance yet to get this project off the ground. I'll see if I can get some video of it running, just so you can see it running.

Vince
User avatar
vbriel
Site Admin
 
Posts: 1184
Joined: Jul Tue 19, 2005 12:10 pm
Location: Ohio

Postby Fippy » Feb Sat 27, 2010 1:40 pm

Just a quick thought about that bug, but bear in mind I haven't looked at the instruction set...

I wonder if it overflows when you try to add to odd numbers, but not even numbers. I recall seeing a similar behavior decades ago on an old 68xx chip where an odd number had a flag set in the status register, and when you tried to add 1 to it, it got upset. The answer was that you had to clear the status flag and then add 2.

Just a thought.
Fippy.
User avatar
Fippy
 
Posts: 23
Joined: Dec Sun 20, 2009 11:36 pm
Location: San Diego, California

Postby vbriel » Feb Sat 27, 2010 4:54 pm

Well, it was a status register on an add and I found it. Now, I'm checking over the BASIC instruction set but it looks like they are all working!

Vince
User avatar
vbriel
Site Admin
 
Posts: 1184
Joined: Jul Tue 19, 2005 12:10 pm
Location: Ohio

Postby vbriel » Feb Sun 28, 2010 12:08 am

Ok, updates are going to start becoming regular. I probably should start a new forum soon since this project is going to be completed before too long.

I have 8K BASIC loaded and working great. I even have some early speed test results. Keep in mind, I haven't even started digging into speedups but I have a few tricks up my sleeve.

Test program:

10 FOR A=1 TO 100
20 FOR B=1 TO 1000:NEXT B
30 PRINT A
40 NEXT A

On Rich Cini's Altair32 tested at 2.04Mhz, this test completes in 3:35. On my system, it takes 5:59, so it is a little slow. These easiest way to speed things up is to increase the crystal from 16 to 20Mhz which I'll do next week. That alone is a 20% increase. I know there is a lot of slop in my code, so I'll be getting that cleaned up which will get it faster too.

The PockeTerm portion of the Altair is running at 9600, later on, I'll bump that up but for right now, it is fine for development. I may add a feature to allow you to use an external serial device instead of the built in terminal but that requires an extra IC to be added.

I should be able to achieve at least 80% speed. My goal is actual speed.

Vince
User avatar
vbriel
Site Admin
 
Posts: 1184
Joined: Jul Tue 19, 2005 12:10 pm
Location: Ohio

Postby Bill Loguidice » Mar Tue 02, 2010 2:30 pm

Speed variations won't cause any compatibility issues, right, it's just how quickly the code itself executes?
User avatar
Bill Loguidice
 
Posts: 35
Joined: Jun Mon 04, 2007 9:05 am
Location: Central New Jersey, USA

Postby vbriel » Mar Tue 02, 2010 3:56 pm

Correct, the speed issue is only a timing issue. I'm looking for a simple Altair monitor program or assembler. If you know of one, point me out so I can try it out.

Vince
User avatar
vbriel
Site Admin
 
Posts: 1184
Joined: Jul Tue 19, 2005 12:10 pm
Location: Ohio

Postby Des » Mar Wed 03, 2010 8:46 pm

Hi Vince

I saw the Altair video, very nice

do you have to have a picture of your full sized version?

I like that idea of fitting the Altair inside a desktop case with another motherboard,

Like with the Imsai Series II:

http://www.imsai.net/products/imsai_series_two.htm
-
Kind Regards
Des
User avatar
Des
 
Posts: 20
Joined: Aug Sun 16, 2009 7:52 pm

Postby vbriel » Mar Wed 03, 2010 9:32 pm

No, I just have my original AltairPC prototype from a few years ago. It's actually in pieces now. The hardware part (panel and pcb) will be easy, the case is the difficult. I need to find a case to hack or find somebody who will make a custom case for a reasonable price.

Vince

By the way, this thred should close now, I have created a new section for the Altair line of clones (Altair 8800 micro, Altair SBC and AltairPC).
User avatar
vbriel
Site Admin
 
Posts: 1184
Joined: Jul Tue 19, 2005 12:10 pm
Location: Ohio

Previous

Return to Venues, projects and off topic stuff - NO SPAM

Who is online

Users browsing this forum: No registered users and 1 guest

cron