Search found 215 matches

by Garth
Thu Jan 19, 2017 1:26 pm
Forum: General Stuff
Topic: Making a game console from parts like 6502,z80 etc possible
Replies: 94
Views: 20543

Re: Making a game console from parts like 6502,z80 etc possi

Adam, I originally got that info from WDC, and I don't remember if it was in paper literature or on their website which keeps getting changed and not all of the info is there anymore. Samuel Falvo repeats it at http://forum.6502.org/viewtopic.php?p=190#p190 and says it was published in the January, ...
by Garth
Wed Jan 18, 2017 11:41 pm
Forum: General Stuff
Topic: Making a game console from parts like 6502,z80 etc possible
Replies: 94
Views: 20543

Re: Making a game console from parts like 6502,z80 etc possi

I hope replying is ok if I only read the first page and only scanned the rest. As Memblers said, there are several on the 6502. org fourm (http://forum.6502.org/) who are strong at programmable logic (FPGAs, which are field-programmable gate arrays, suitable for even making your own microprocessor, ...
by Garth
Wed Jan 18, 2017 10:35 pm
Forum: Newbie Help Center
Topic: Reset handler/reset vector confusion?
Replies: 51
Views: 16019

Re: Reset handler/reset vector confusion?

Regarding the macro allowing varying numbers of input parameters to set or clear flags: Once that list of flags grows enough, you loose the space you save by not clearing the RAM in a loop. That's if it's practical to keep them together, for loop indexing. You might want to keep them separate though...
by Garth
Wed Jan 18, 2017 2:17 pm
Forum: Newbie Help Center
Topic: Reset handler/reset vector confusion?
Replies: 51
Views: 16019

Re: Reset handler/reset vector confusion?

You can create macros like this in ca65 too. I do it all the time. I'm not familiar with ca65. Does it allow making macros that don't require a given number of input parameters? (just to confirm.) Most assemblers require that every macro invocation use the exact number of parameters specified in th...
by Garth
Wed Jan 18, 2017 12:25 pm
Forum: Newbie Help Center
Topic: Reset handler/reset vector confusion?
Replies: 51
Views: 16019

Re: Reset handler/reset vector confusion?

The beginning of the program should initialize most variables [1] whether that's the reset routine or a program that is started after the reset routine runs. Initializing does not mean zeroing them all. Some will need to be flags that start out set, not clear. Some variables need to contain addresse...
by Garth
Fri Jan 13, 2017 2:46 pm
Forum: General Stuff
Topic: How organized are your PC files?
Replies: 17
Views: 4400

Re: How organized are your PC files?

I'm rather OCD about it, so they're pretty organized but I'm never happy with it. To reply to rainwarrior's post without quoting: Rather O.T.; but I keep thinking about this as I aim toward making up some sort of simple file system to implement with tiny flash modules in a 6502 computer, a system wh...
by Garth
Sat Dec 31, 2016 1:16 pm
Forum: Newbie Help Center
Topic: Check whether there is a value in the array
Replies: 4
Views: 1762

Re: Check whether there is a value in the array

I want to check if the number or not in an array how i can done? This sentence does not really make sense. It sounds like you want to see if a particular number is in the array; but your code looks like you just want to copy the array. To just copy it, assuming it's ok to go in the reverse order to...
by Garth
Wed Dec 21, 2016 1:14 pm
Forum: General Stuff
Topic: Advice on entry level oscilloscopes
Replies: 11
Views: 5834

Re: Advice on entry level oscilloscopes

The following is from the oscilloscope section of the " Basic Workbench Equipment " chapter of my 6502 primer . An oscilloscope is not an absolute necessity, but it's awfully good to have. If you can afford one, then it's a necessity! :D Basic new ones seem to start around $350. It needs t...
by Garth
Tue Dec 20, 2016 2:35 pm
Forum: Newbie Help Center
Topic: What is the Processor Status, and why is it important?
Replies: 12
Views: 4196

Re: What is the Processor Status, and why is it important?

rainwarrior wrote:A PHP / PLP bookending an IRQ routine won't clear the flag, though. The IRQ itself will set I, so such a PLP can only set the flag, not clear it.
Ah, you're right. Limit it only to SEI and CLI. I edited my first post above.
by Garth
Tue Dec 20, 2016 2:13 pm
Forum: Newbie Help Center
Topic: What is the Processor Status, and why is it important?
Replies: 12
Views: 4196

Re: What is the Processor Status, and why is it important?

I re-able interrupts in the HuC6280 inside of interrupt routines. I just set flags to indicate that what level of interrupt is already processing (in which case if another of the same level call happens, it just bails out each time until the flag is clear). It's the only way I can juggle three inte...
by Garth
Mon Dec 19, 2016 8:52 pm
Forum: Newbie Help Center
Topic: What is the Processor Status, and why is it important?
Replies: 12
Views: 4196

Re: What is the Processor Status, and why is it important?

Since the interrupt sequence pushes the processor status register, and that will normally include the I interrupt-disable bit clear, do not bracket the ISR with PHP and PLP (nor SEI and CLI). Why? Because these will then have the effect of re-enabling interrupts before the RTI; and if another interr...
by Garth
Sat Dec 17, 2016 9:36 pm
Forum: Newbie Help Center
Topic: Random Stupid Questions I Think Of
Replies: 20
Views: 8396

Re: Random Stupid Questions I Think Of

4. Are there any situations when programming the NES where (indirect,x) addressing would come in handy? (ZP,X) gets used a lot in virtual stacks, where the virtual stack (a data stack, separate from the return stack) is in ZP, and X is the index into it, and stack cells often have addresses. This i...
by Garth
Sat Dec 17, 2016 9:15 pm
Forum: Newbie Help Center
Topic: Help with NMI and Game Logic
Replies: 25
Views: 7562

Re: Help with NMI and Game Logic

You can gan go 129 bytes forward and 126 bytes backward. It should be -127 - 128 but for whatever reason the people who designed the 6502 fucked up with the microcode. I believe this is also responsible why the address pushed onto the stack when jumping to a subroutine is off by 1. The 6502 does no...
by Garth
Sat Dec 17, 2016 7:13 pm
Forum: Newbie Help Center
Topic: Calling Convention
Replies: 5
Views: 2665

Re: Calling Convention

In my 6502 stacks treatise, chapter 14 is on local variables and environments at http://wilsonminesco.com/stacks/loc_vars.html, and, following naturally, is chapter 15 on recursion at http://wilsonminesco.com/stacks/recurse.html . You can do it!
by Garth
Sat Dec 17, 2016 6:43 pm
Forum: Newbie Help Center
Topic: IF/ELSE in assembly
Replies: 3
Views: 2435

Re: IF/ELSE in assembly

There are different ways to handle this. But to start, note that there's an automatic, implied, built-in compare-to-0 in every instructions that loads or affects A, X, or Y; so there's no need for CMP #0 after LDA. Also, if it's a chain of comparisons against successive numbers, you can increment or...