replica 1 firmware now available

19 posts / 0 new
Last post
Offline
Last seen: 9 months 19 hours ago
Joined: Dec 20 2003 - 10:38
Posts: 249
replica 1 firmware now available

I have finished making the firmware available for all to use, modify, and hack away. This is now free but not for commercial use.

here's the link:

firmware

Enjoy,

Vince

supertrone's picture
Offline
Last seen: 15 years 2 weeks ago
Joined: Dec 20 2003 - 10:38
Posts: 5
assembler errors

I have been trying to assemble the video firmware with AVRstudio4 but keep getting the following errors:

(1427): error: Undefined symbol: i2cstat
(1427): error: Invalid register
(2328): error: jmp k: Unsupported instruction on ATmega8
(2405): error: Undefined symbol: i2cstat
(2405): error: Invalid register
(2439): error: Undefined symbol: i2cstat
(2439): error: Invalid register
(2618): error: jmp k: Unsupported instruction on ATmega8
The numbers in parenthesis are line numbers in the source, any help out there would be great.
regards,
Nathan Trone

Offline
Last seen: 9 years 11 months ago
Joined: Sep 22 2008 - 07:00
Posts: 7
Did you ever get it working?

Did you ever get it working?

I just downloaded the firmware and tried to compile the Video firmware in AVRStudio4 too. I get the error message "error: Illegal argument type or count" on the following lines in "R1 Video Rev C.asm":

1427: ldi i2cstat,0x00
2405: st Y,i2cstat
2439: ldi i2cstat,0x80

It was also a colon (":") instead of a semicolon (";") in one of the comment lines, so the code has obviously been modified and published without being tested.

Anyone have a fix? I don't have much experience with Atmel assembly (yet).

Are there any pre-compiled HEX files available for download?

Offline
Last seen: 9 months 19 hours ago
Joined: Dec 20 2003 - 10:38
Posts: 249
The code posted was directly

The code posted was directly from working code. I've had compatibility issues with different revisions of studio 4.I'll see if I can upload that last known version.

Vince

Offline
Last seen: 15 years 2 months ago
Joined: Aug 26 2008 - 10:59
Posts: 3
thanks for help

thanks for help

Offline
Last seen: 8 years 1 month ago
Joined: Jan 29 2008 - 06:55
Posts: 44
Code is broken

There are three issues with this code. I haven't burned a device to test it yet, but I did get it to compile.

One set of errors involve i2cstat. The way it is used implies it is a register. I noticed r22 isn't used so I added the following line:

.def i2cstat = r22

There is no jmp instruction in the ATmega8. I changed the two instances of jmp to rjmp.

Finally this code will never work as is.

Once the empty data is declared after the following line:

.ORG 0x900
emptydata:

You get to:

rjmp RESET ; Reset handler at $000
;------------------------------------------------------------------------------

RESET:
main:

The above places the reset vector a ways past 0x900 when it should be at 0x000.

I moved this to the beginning:

.ORG 0x000
rjmp RESET ; Reset handler at $000

.ORG 0x100
line1data:

I'm not an AVR expert but it is clear to me this code is broken. I'll post once I try burning a device and testing it in my replica1.

Mike

Offline
Last seen: 8 years 1 month ago
Joined: Jan 29 2008 - 06:55
Posts: 44
I've been poking around with

I've been poking around with the simulator. I noticed the initilization code puts blanks in the first two lines were the comments mention it will put @s in all 24 x 40 lines.

I'm not dissing the code or authors but it's going to be hard to work with this.

Mike

Offline
Last seen: 8 years 1 month ago
Joined: Jan 29 2008 - 06:55
Posts: 44
I changed the code to put bla

I changed the code to put blanks initially in all 24 x 40 lines and it seems to work the same as what is supplied on the Replica 1.

My next issue is mouser tells me a ATmega8-16pu is the same as an ATmega8-16pc. I have two pu parts, they don't work. I can program the original -pc Vince supplied with either my code or the original code read from the device and both work. The -pu parts don't work.

So there is a difference in the parts but with my mods the code seems to work with the original part.

Mike

Offline
Last seen: 8 years 1 month ago
Joined: Jan 29 2008 - 06:55
Posts: 44
Figured it out. I forgot to p

Figured it out. I forgot to program the fuses to select the external crystal. I now have a working image in a -16pu part.

Mike

Offline
Last seen: 9 months 19 hours ago
Joined: Dec 20 2003 - 10:38
Posts: 249
Have you put the circuit toge

Have you put the circuit together to make sure it is working for you? Someday if I every find time, I'll post the final version with the flashing @ for the cursor that starts at the top like it is suppose to.

Vince

Offline
Last seen: 8 years 1 month ago
Joined: Jan 29 2008 - 06:55
Posts: 44
If you're asking if it works

If you're asking if it works in a replica 1 then the answer is yes.

Mike

Offline
Last seen: 8 years 1 month ago
Joined: Jan 29 2008 - 06:55
Posts: 44
Fixed Vertical Sync

Here is a version that mimics the NTSC standard for vertical sync. It greatly improved the display on an LCD monitor.

http://home.comcast.net/~mffortuna/R1%20Video%20Rev%20C_fixed.asm

Mike

supertrone's picture
Offline
Last seen: 15 years 2 weeks ago
Joined: Dec 20 2003 - 10:38
Posts: 5
I finally managed to get a ch

I finally managed to get a chip to program and verify , thanks for the fixed code Mike! I have been trying to build a wire wrap version using Tom Owad's book and the online schematics. Pin 15 SH/LD appears to be unconnected in the schematics, is this correct? Hooked up like that I'm getting diagonal lines on my monitor (with the brightness turned way up) unless I hit the clear button which produces a blank screen. I appears the to me Atmel IC is producing sync signals but the video isn't getting shifted out. Has anybody else wire wrapped one of these out there? By the way I recently saw Vince in "Welcome to Macintosh", way to go Vince!

Offline
Last seen: 8 years 1 month ago
Joined: Jan 29 2008 - 06:55
Posts: 44
I can't find my CD with the R

I can't find my CD with the Replica SE schematics but I'm 99.9% sure you need to hook PB0 from the Atmega to the SH/LD pin 15.

Mike

Offline
Last seen: 8 years 1 month ago
Joined: Jan 29 2008 - 06:55
Posts: 44
I found my CD while looking f

I found my CD while looking for something else. Yes you need to hook Atmega PB0 to pin 15.

supertrone's picture
Offline
Last seen: 15 years 2 weeks ago
Joined: Dec 20 2003 - 10:38
Posts: 5
I hooked up PB0 to pin 15 as

I hooked up PB0 to pin 15 as suggested but it still isn't functioning properly, would you mind uploading the SE schematic?

Offline
Last seen: 8 years 1 month ago
Joined: Jan 29 2008 - 06:55
Posts: 44
Vince hasn't published it onl

Vince hasn't published it online so I don't feel comfortable posting it. You can ask him if it is OK.

One other thing to check is make sure you have the SUT_CKSEL fuse set correctly. I have it set to:

ext crystal/resonator high freq; start-up time: 16K CK + 64ms

Offline
Last seen: 9 months 19 hours ago
Joined: Dec 20 2003 - 10:38
Posts: 249
PB0 goes to pin 15 on the shi

PB0 goes to pin 15 on the shift register. Check your fuse programming bits. EXTERNAL CRYSTAL, mike has the correct setting. I do wirewrap from time to time, just go back and check each wire, one at a time.

I'll try and get the SE schematics up on my site soon.

Vince

Offline
Last seen: 6 years 9 months ago
Joined: Apr 15 2017 - 06:15
Posts: 1
Re: replica 1 firmware now available

Hi

I'm a first year electric engineering student. I was born in the Windows desktop era and I got really interested in understanding how a real 8-bit computer works.
I'm thinking of trying to build an Apple 1 by following the tutorial and I'm now checking if it's even theoretically possible. Does anyone here still have the fixed video firmware?

The firmware posted in 2005 is badly broken and the fixed one, that was posted here about a decade ago, has been removed from the server. The keyboard firmware seems to be building without any problems.

Cheers

Log in or register to post comments