![]() |
![]() OCAU News - Wiki - QuickLinks - Pix - Sponsors |
|
|||||||
| Notices |
|
Sign up for a free OCAU account and this ad will go away! Search our forums with Google: |
![]() |
|
|
Thread Tools |
|
|
#1 |
|
Member
Join Date: Aug 2001
Location: melbourne
Posts: 2,724
|
I've been mystified for some time by the architecture of the Atari 2600.
It's using a 6507 processor, which is a 6502, with some address lines, IRQ, NMI, SO and a few other pins sawn off - giving it 8K address space. a 6532 RIOT chip provides IO and 128 bytes of RAM, from $0080 through 00ff (the lower 128 bytes is where the TIO (Video chip) registers reside. Now, on a 6502, the stack is stored in page 1 of memory ($0100-$01FF) - so by all rights there is no stack present for JSR, or other operands that use the stack (like PHP) This contradicts with my citing of 2600 code, which (naturally) needs JSR to call subroutines. Therefore there must be a stack - HOW?? The only way I can think that the processor can have it's stack in page 1 is if the RAM in the RIOT chip is not properly decoded, and is imaged at $0180-$01FF. Does anyone here know if this is the case? - or am I barking up the wrong tree? Callan
__________________
Wanted: Commodore 1571, and/or 1541/II disk drives |
|
|
|
| Join OCAU to remove this ad! |
|
|
#2 |
|
Member
Join Date: Sep 2005
Location: Launceston TAS
Posts: 551
|
I.... I.... wut?!
*Leaves thread*
__________________
Intel i5 2500k @ 4ghz || NZXT Havik 140 || Asrock z68 Entreme3 Gen 3 || Leadtek 3gb GTX580 || 8GB G.Skill Ripjaws WD 1TB SATA || WD 300GB SATA || Thermaltake HX750watt || Coolermaster HAF 922 |
|
|
|
|
|
#3 |
|
Member
Join Date: Apr 2002
Location: brisbane
Posts: 27,114
|
you're overthinking it - Atari 2600 = Space Invaders and River Raid.
![]() yeah no idea, maybe ask those programming types in the programming section.
__________________
this is who we are. |
|
|
|
|
|
#4 |
|
Member
Join Date: Jan 2008
Location: Ballajura, WA, 6066
Posts: 196
|
I think they'd stack quite well once you remove the cartridges.
__________________
Successful Trades: Statts, solid.egg, Comma, murcielago, TX3, mindstormr, scodye, MetalPhreak, snoopy, gs.mrwolf, downforce, kemitri, mcfee03, OZeight, Scum, terrastrife, 123realtalk, Fedevor |
|
|
|
|
|
#5 |
|
Member
Join Date: Jun 2001
Location: Newcastle, NSW
Posts: 795
|
Mate I'd head over to AtariAge and ask there, there's some incredibly knowledgeable people over there.
|
|
|
|
|
|
#6 | |
|
Member
Join Date: Aug 2001
Location: melbourne
Posts: 2,724
|
Quote:
Actually, I'm getting close to working it out. It has to do with the RAM not being "ram" as we know it, but as part of a 6532 RIOT chip (Ram/IO) chip - and how it has some "kinda" chip-select pins that do double-duty as address lines. There is some cross-wiring between the 6507 and 6532 address lines, and these pins, that probably do the trick. I suspect it was a not uncommon trick for using the 6532, but haven't found out any examples in old MOS documentation. Good suggestion, tho - if I can't nut it out, I'll drop a question there. Callan
__________________
Wanted: Commodore 1571, and/or 1541/II disk drives |
|
|
|
|
|
|
#7 |
|
Member
Join Date: Mar 2006
Location: Launceston
Posts: 13
|
Good on ya Callan, your the da man! we need more ppl like you!
atari 2600 my first console growing up, fond memories! |
|
|
|
|
|
#8 |
|
Member
Join Date: Dec 2001
Posts: 443
|
Callan,
Did you resolve how this works? I was under the impression that the RIOT memory was seen as both Page 0 and Page 1 to the 6507 Since the stackpointer starts at 7F and decrements as stuff gets shoved onto the stack, as long as you don't push too much* on the stack, you shouldn't be clobbering your real data. *Too much in the scheme of 128 bytes is actually quite small Last edited by Heywood; 22nd August 2012 at 3:57 PM. Reason: Originally had FF instead of 7F - It may be the same thing is the the MSB of the address byte is ignored... |
|
|
|
![]() |
| Bookmarks |
|
Sign up for a free OCAU account and this ad will go away! |
| Thread Tools | |
|
|