DIY Atom (Some ROM, RAM, 6502 and a Propellor)

discussion of games, software, hardware & emulators relating to the Acorn Atom
User avatar
Elminster
Posts: 1632
Joined: Wed Jun 20, 2012 8:09 am
Location: Essex, UK

DIY Atom (Some ROM, RAM, 6502 and a Propellor)

Postby Elminster » Fri Jul 28, 2017 2:07 pm

As mentioned on the ICE-T thread I am messing about with bits that sort of make an Atom.

Without an ICE-T I have been tracing using a DSLogic Pro on the 16 address channels, and comparing with the F000 disassemble , Atomulator, a generic memeory map and a calculator.

What I basically have is an EPROM with C000 to FFFF ATOS MOS, and a large piece of SRAM taking up the rest of the lower address space.

Tracing it through and it just gets to checking the VIAs before printing the first character of the POST message. And then just loops forever at waiting for &B801 (Data Reg A) to respond. So bearing in mind what is actually at B801 is SRAM can I just fudge it into thinking it has responded? And then pull the data from 8000 and stick down a serial connection?

From my understanding B800 is the optional 6522, and I dont actually want to use it, now I remember reading somewhere these are tied low or high with resisters when not used.

Roland's New ATOM Thread
What about the 'mystery' resistors R39/40/41 -> D1/D2/D3



In my Atom-in-PC board I left them out as these resistors are only relevant if there is no 6522 via installed. On the Atom-in-PC the 6522 is always installed so the resistors are not needed. I used this design philosophy with my new Atom design. But now I realize that in this Atom the 6522 might be left out, so yes, it's better to add these resistors


So D1-D3 are tied low with 4k7 resistors.

What are D0,D4-D7 are they NC when no 6522 fitted? Thining about it B800-B80F are they are SRAM are probably not initailed so could be any old rubbish in there. According to Atomic Manual they should be set to 0. I am asusming that is true regardless of whether it is fitted or not. It is certianly set to 0 on Atomulator, but assume that is emulating a 6522 anyway.

ATOMIC manual OCR a bit up the creak, will add a screenshot instead

AtomVia.png


I am assuming as people have built complete ATOMs and GODIL replacements there are probably some other sources I havent come across yet. Explaining this. (I havent tried to work out what the ATOM in FPGA code does!)

Might have to stick the Saleae 8ch only the data line to try to grab what value &B801 is actually set to.
Last edited by Elminster on Fri Jul 28, 2017 9:28 pm, edited 1 time in total.

User avatar
Elminster
Posts: 1632
Joined: Wed Jun 20, 2012 8:09 am
Location: Essex, UK

Re: DIY Atom (Some ROM, RAM and a 6502)

Postby Elminster » Fri Jul 28, 2017 2:19 pm

if interested this is the trace when it hits the Via Subroutine after calling OSWRCH, hand annotated for my own understanding!

Code: Select all

FE54: FE -> MSB addr -> JSR #FEFB
FEFB: 48 - PHA - Push A% to stack
01FB: <A% store in stack>
FEFC: C9
FEFD: 02 - CMP 02
FEFE: F0 - BEQ
FEFF: 27 - Branch 27 addrs. If eq 2. Not carry on (#FF27)
FF00: C9 - CMP (immediate)
FF01: 03 - CMP 03
FF02: F0 - BEQ
FF03: 34 - Branch 34 addrs if eq 3. Not carry on. (#FF38)
FF04: C5 - CMP (zp)
FF05: FE - CMP $00FE (= A in stimulator)
00FE: <look at value>
FF06: F0 - BEQ
FF07: 2E - If A% = $00FE then branch forward 2e addrs (#FF36). Not carry on.
FF08: AD - LDA (abs)
FF09: OC - LSB addr
FF0A: B8 - MSB addr -> LDA (#B80C) - Via Address = Must be non Zero
FF0B: 29 - AND
FF0C: 0E -> AND OE (0 AND 0E = 0)
FF0D: F0 - BEQ
FF0E: 27 - Branch if zero forward 0x27 addrs. (#FF36)
FF0F: 68 - PLA - Pull back of A% from stack, mashed up in #FF08
01FA: <pull from stack>
01FB: <pull from stack>
FF10 2C - BIT (cap memory with A%)
FF11 01 - LSB
FF12 B8 - MSB -> BIT #B801
B801: <read value>
FF13: 30 - BMI (Branch on Minus)
FF14: #FB -> BMI FB
FF15: Starts reading ahead, dump it
Loop back to FF10 forever due to FF14

User avatar
hoglet
Posts: 6393
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: DIY Atom (Some ROM, RAM and a 6502)

Postby hoglet » Fri Jul 28, 2017 2:20 pm

What you are seeing is good, i.e. it means a lot is working.

What's happening is the Atom MOS is thinking a printer is present and active, and is sending output to that as well, and hanging because the handshake is not happening.

I'd just bypass the whole "Send to printer" code, by setting location #FEFB to #60 (RTS).

You'll hit a similar issue with the "Wait for VSync" code, because you don't have a 6847 and 8255 present. That can be fixed in the same way by setting #FE66 and #FE6B to #60.

That should get you as far as

Code: Select all

ACORN ATOM

>

being written into screen memory.

Dave

User avatar
Elminster
Posts: 1632
Joined: Wed Jun 20, 2012 8:09 am
Location: Essex, UK

Re: DIY Atom (Some ROM, RAM and a 6502)

Postby Elminster » Fri Jul 28, 2017 2:21 pm

Fantastic thanks. I suspected something like that but was not sure on how best to resolve it.

User avatar
Elminster
Posts: 1632
Joined: Wed Jun 20, 2012 8:09 am
Location: Essex, UK

Re: DIY Atom (Some ROM, RAM and a 6502)

Postby Elminster » Fri Jul 28, 2017 9:27 pm

Hurray it works (although in a limited way, only took 4 6502 resets to get a readable (ish) message)

Using L-Star so I have fudge the original Apple PIA code. on a Propellor. which expect serial screen data in pretty much one location, but it sort of posts a message. Just need to sort the timing out and/or do the code in a different way.

Further than I thought I would get as I knew nothing about the ATOM (all beeb and electron here), trying to build a 6502 computer, or parallax propellor when I started (well not sure I know much more as I hacked a lot of Jac L-Stat code, but I am happy).

Atom_post_msg2.png
(18.38 KiB) Not downloaded yet


Return to “acorn atom”

Who is online

Users browsing this forum: No registered users and 1 guest