Search found 211 matches

by Garth
Sun May 30, 2021 7:18 pm
Forum: Newbie Help Center
Topic: Creating a data structure.
Replies: 33
Views: 2177

Re: Creating a data structure.

See the post at http://forums.nesdev.com/viewtopic.php?p=183712#p183712 and following posts, about implementing nestable program flow-control structures through macros in assembly language, not needing labels at all (just as you don't need labels for these things in a higher-level language). In most...
by Garth
Mon May 24, 2021 7:44 pm
Forum: General Stuff
Topic: Becoming an FPGA Engineer
Replies: 48
Views: 5150

Re: Becoming an FPGA Engineer

I started getting into programmable logic (CPLDs though, not FPGAs) in the late 1990's, and Cypress had books and software which I think was free because they wanted us to design their parts into our products. It has been over 20 years; but you might see what they're offering now. The one project I ...
by Garth
Mon May 03, 2021 2:37 pm
Forum: Newbie Help Center
Topic: NMI won't trigger
Replies: 3
Views: 3571

Re: NMI won't trigger

This is not totally related to the question, but from a quick look, I'll comment anyway: You have the line, sei ;Interrupts on The SEI stands for "SEt Interrupt- dis able flag," meaning you're turning maskable interrupts off , not on. (Actually you're turning the sensing of the interrupts off. The i...
by Garth
Thu Apr 15, 2021 10:59 am
Forum: General Stuff
Topic: How to change my password in my profile at forums.nesdev.com ??
Replies: 4
Views: 5080

Re: How to change my password in my profile at forums.nesdev.com ??

Click on your name in the upper-right corner, and chose "User Control Panel" in the drop-down menu. Click on the "Profile" tab. Now go down to "Edit account preferences" on the left. It's your first post though, and you're using wording that many spammers have been using recently. I think you're a s...
by Garth
Fri Mar 19, 2021 8:23 pm
Forum: Newbie Help Center
Topic: Questions about comprehension, hobbies, and tenacity.
Replies: 15
Views: 7580

Re: Questions about comprehension, hobbies, and tenacity.

If there's a mentality of not wanting to be bothered with details but keep moving, that can be a problem. The idea might be to keep productive by not letting details get you down; but there's some kind of curve where being to the right of the peak is just as unproductive as being to the left. I thin...
by Garth
Wed Mar 03, 2021 12:56 pm
Forum: NESdev
Topic: Assembly Source Code Examples: Good Practices?
Replies: 2
Views: 2851

Re: Assembly Source Code Examples: Good Practices?

A good recent topic that should interest you is Making "Good" Assembly Code. Macros, used correctly, can dramatically raise the level of the language, with no penalties in run speed or memory taken.
by Garth
Thu Feb 18, 2021 10:55 pm
Forum: NESdev
Topic: How to organize code? ("good code")
Replies: 18
Views: 7671

Re: How to organize code? ("good code")

hence when you start they will teach you to clear the SEI flag.
Um...SEI is not a flag, but an instruction to SEt the Interrupt-disable flag I.
by Garth
Thu Feb 18, 2021 3:24 am
Forum: NESdev
Topic: How to organize code? ("good code")
Replies: 18
Views: 7671

Re: How to organize code? ("good code")

2. This "RESET:" is called an interrupt? The reset signal is a type of interrupt. The reset routine is not an interrupt, but is instead there to service the interrupt. 4. What are nested NMI? And how would they look like? I can't really think of a good reason to have an NMI interrupt the servicing ...
by Garth
Wed Feb 17, 2021 5:16 pm
Forum: NESdev
Topic: How to organize code? ("good code")
Replies: 18
Views: 7671

Re: How to organize code? ("good code")

Sebastian_L, I think you're confusing "label" with "routine." A label is not a whole routine, or even part of one. It's just a way for the programmer to refer to an address in memory, often a routine's starting address. Interrupt handlers, also called "interrupt-service routines" (ISRs for short) mu...
by Garth
Tue Feb 16, 2021 12:24 pm
Forum: Newbie Help Center
Topic: BRK masking bug and reliability of B pseudoflag
Replies: 35
Views: 12988

Re: BRK masking bug and reliability of B pseudoflag

6502.org's interrupt tutorial states that 65c02 and derivatives should not mask BRKs anymore, so that's something. If you're referring to http://6502.org/tutorials/interrupts.html, the latest is on my own site at http://wilsonminesco.com/6502interrupts/ . I started my own site in 2012 because it wa...
by Garth
Wed Feb 03, 2021 7:15 pm
Forum: Newbie Help Center
Topic: Noob questions about 6502 Assembly
Replies: 27
Views: 12064

Re: Noob questions about 6502 Assembly

Just a quick question about that. I heard that sbc automatically subtracts 1 if the carry is clear (and opposite for Add With Carry). So since the carry is cleared right before sbc #1, wouldn't it already subtract 1. So does placing #1 right there do? Yes, simple mistake. Normally you'll use SEC be...
by Garth
Tue Feb 02, 2021 12:49 pm
Forum: Newbie Help Center
Topic: Noob questions about 6502 Assembly
Replies: 27
Views: 12064

Re: Noob questions about 6502 Assembly

wla-6502 or wla-65816? They are different and have different uses/possible directives. wla-65816, since I'm studying SNES programming. Do yourself the favor (if you haven't already) of getting WDC's excellent 6502/65816 programming manual, " Programming the 65816—Including the 6502, 65C02 and 65802...
by Garth
Mon Feb 01, 2021 1:20 am
Forum: Newbie Help Center
Topic: Noob questions about 6502 Assembly
Replies: 27
Views: 12064

Re: Noob questions about 6502 Assembly

Esns68 wrote:
Mon Feb 01, 2021 12:42 am
Oh my gosh I swear I meant to put $ for address in all of those spots not #, my bad!! Fixed it. Cause I know # means value of and $ means address.
$ means hexadecimal, like 0x___ in C. It can be an address or data. Tokumaru wrote an excellent response though.
by Garth
Sun Jan 31, 2021 10:12 pm
Forum: Other Retro Dev
Topic: Simulated Processor Project similar to 6502
Replies: 1
Views: 16464

Re: Simulated Processor Project similar to 6502

I didn't see anything about how you plan to handle indexing, with or without indirection. Is there a plan for that? (absolute indexed, indirect indexed, indexed indirect) The AnyCPU forum would be a good one to post this on. http://anycpu.org/forum/ Making assembly language easier or more readable a...
by Garth
Wed Jan 20, 2021 12:37 pm
Forum: Newbie Help Center
Topic: A good 6502 physical reference book in 2021.
Replies: 8
Views: 5939

Re: A good 6502 physical reference book in 2021.

It seems that the only book currently available at a reasonable price is "Programming the 65816 including the 6502, 65C02, and 65802". Does anybody have a direct experience with it? Might it be useful to systematically learn the 6502 asm, or is it more like a reference for later? It is definitely t...