stupid question

For discussing the 65xx hardware itself or electronics projects.
User avatar
GARTHWILSON
Forum Moderator
Posts: 8774
Joined: 30 Aug 2002
Location: Southern California
Contact:

Post by GARTHWILSON »

Quote:
where is the info on zero page/stack usage by certain opcodes?
I don't know of anywhere that lists that info is all in one place.

There will be hardware stack (in page 1) usage on the interrupts (BRK plus IRQ and NMI, and I believe RST too although what it stores is not normally something you ever need to read back so it's ok if it is lost) and RTI, then the counterparts JSR and RTS for subroutines and related tricks. Then add PHA, PLA, PHX, PLX, PHY, and PLY. This for the '02. The '816 has additional ones along the same lines, plus stack-relative addressing. I don't think you're using the '816 yet though, right?

Page 0 is used by all the op codes that use a one-byte operand that's an address.

I'm probably forgetting something but hopefully this is a pretty good summary.
ElEctric_EyE
Posts: 3260
Joined: 02 Mar 2009
Location: OH, USA

Post by ElEctric_EyE »

No. Not using 65816 yet, heh. (Even if I were I'd want to make it address 4GB!)

Thanks for the info!
User avatar
BigDumbDinosaur
Posts: 9428
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: stupid question

Post by BigDumbDinosaur »

ElEctric_EyE wrote:
I guess the question boils down to, can the WDC65C02 run without RAM, if it is just addressing I/O?
This may have already been answered, but as long as you don't have any interrupts (requires a stack), subroutines (also requires a stack), storage needs or any indirect addressing modes, the answer would be yes. The question I would ask though is why build something that way? You'd be needlessly limiting what the system can do.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
ElEctric_EyE
Posts: 3260
Joined: 02 Mar 2009
Location: OH, USA

Post by ElEctric_EyE »

Minimalism my friend, minimalism. I'm trying to do alot with four IC's: EEPROM copy to SRAM, switching CPU speeds, trying to init a display I am unfamiliar with, and of course bank switch a 2Mx8 10nS SRAM. With the building blocks I learned from my 1st and 2nd iterations of the PWA, I tried to "do it all" at once, unsuccessfully... If I temporarily get rid of RAM (and associated wiring/socket adapter pinouts, etc), I have only CPU, FPGA, and EEPROM to deal with. Absolute bare minimum @1.25MHz!


Edit: Added "unsuccessful" & bank switch
Last edited by ElEctric_EyE on Fri Aug 27, 2010 3:27 am, edited 2 times in total.
kc5tja
Posts: 1706
Joined: 04 Jan 2003

Re: stupid question

Post by kc5tja »

BigDumbDinosaur wrote:
ElEctric_EyE wrote:
I guess the question boils down to, can the WDC65C02 run without RAM, if it is just addressing I/O?
This may have already been answered, but as long as you don't have any interrupts (requires a stack), subroutines (also requires a stack), storage needs or any indirect addressing modes, the answer would be yes. The question I would ask though is why build something that way? You'd be needlessly limiting what the system can do.
This is something which is more practical with a Z-80, since it has a larger set of registers. In fact, I remember a Radio-Electronics magazine article back in the early 80s which used a Z-80 in precisely this way to save the cost of a RAM chip.

The 6502, though? Unless you're doing something utterly trivial like reading from one port, shifting, and writing back to another port, I can't see it serving any real purpose. You're better off using a microcontroller for such applications.
User avatar
GARTHWILSON
Forum Moderator
Posts: 8774
Joined: 30 Aug 2002
Location: Southern California
Contact:

Post by GARTHWILSON »

That's what the 6532 RIOT (RAM, I/O, and Timer) was for. If you didn't need much RAM, you could eliminate another IC and maybe reduce the number of ICs in the address decoding to zero.
ElEctric_EyE
Posts: 3260
Joined: 02 Mar 2009
Location: OH, USA

Re: stupid question

Post by ElEctric_EyE »

kc5tja wrote:
BigDumbDinosaur wrote:
ElEctric_EyE wrote:
I guess the question boils down to, can the WDC65C02 run without RAM, if it is just addressing I/O?
This may have already been answered, but as long as you don't have any interrupts (requires a stack), subroutines (also requires a stack), storage needs or any indirect addressing modes, the answer would be yes. The question I would ask though is why build something that way? You'd be needlessly limiting what the system can do.
This is something which is more practical with a Z-80, since it has a larger set of registers. In fact, I remember a Radio-Electronics magazine article back in the early 80s which used a Z-80 in precisely this way to save the cost of a RAM chip.

The 6502, though? Unless you're doing something utterly trivial like reading from one port, shifting, and writing back to another port, I can't see it serving any real purpose. You're better off using a microcontroller for such applications.
I'm not one for typing very lengthy paragraphs, so I apologize I didn't mention in the original post of this thread that I was troubleshooting. Attempting to make the 6502 execute code with the least amount of IC's to initialize a TFT display.

I appreciate your inputs though! Makes me think...
User avatar
BigDumbDinosaur
Posts: 9428
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Post by BigDumbDinosaur »

GARTHWILSON wrote:
That's what the 6532 RIOT (RAM, I/O, and Timer) was for. If you didn't need much RAM, you could eliminate another IC and maybe reduce the number of ICs in the address decoding to zero.
Forgot about those. Are they still around?
x86?  We ain't got no x86.  We don't NEED no stinking x86!
faybs
Posts: 106
Joined: 16 Oct 2006

Post by faybs »

BigDumbDinosaur wrote:
GARTHWILSON wrote:
That's what the 6532 RIOT (RAM, I/O, and Timer) was for. If you didn't need much RAM, you could eliminate another IC and maybe reduce the number of ICs in the address decoding to zero.
Forgot about those. Are they still around?
Dunno if they have any left in stock, but here you go: http://www.jameco.com/webapp/wcs/stores ... ctId=43297
Dimitri
Posts: 142
Joined: 08 Mar 2010
Contact:

Post by Dimitri »

Was the 6532 ever made into a CMOS version capable of handling higher speeds then the typical 1-2Mhz?

Dimitri
User avatar
GARTHWILSON
Forum Moderator
Posts: 8774
Joined: 30 Aug 2002
Location: Southern California
Contact:

Post by GARTHWILSON »

Quote:
Was the 6532 ever made into a CMOS version capable of handling higher speeds then the typical 1-2Mhz?
I don't think so.
Dimitri
Posts: 142
Joined: 08 Mar 2010
Contact:

Post by Dimitri »

I searched online and did not find anything, but thought I'd ask.

Dimitri
Post Reply