Search found 183 matches

by Garth
Wed Feb 06, 2019 9:37 pm
Forum: NESdev
Topic: When have you used a language (C, etc.) instead of asm?
Replies: 13
Views: 7098

Re: When have you used a language (C, etc.) instead of asm?

For context: I've learned a good amount about writing a game in assembly, so I'm wondering if I should consider writing any parts of a game in a higher level language. Beyond what others have said, you can dramatically raise the level of assembly language by using macros, making the source code muc...
by Garth
Thu Jan 10, 2019 3:10 pm
Forum: General Stuff
Topic: Imagine haveing a 7mhz 6502
Replies: 26
Views: 10479

Re: Imagine haveing a 7mhz 6502

Imagine haveing a 7mhz 6502 For many years, all of them being made have been guaranteed for at least 14MHz, and the off-the-shelf ones usually top out around 25MHz, if the supporting parts can work at that speed. See WDC's data sheet at http://6502.org/documents/datasheets/wdc/wdc_w65c02s_oct_8_201...
by Garth
Thu Jan 03, 2019 11:43 am
Forum: NESdev
Topic: ASM indentation style
Replies: 22
Views: 7417

Re: ASM indentation style

IF_GE ; Is the value above 127? [Shouldn't that say "above 61"?] I think my reasoning was that at that place in the code we don't know which direction we've offset in. It could probably be reworked a bit, since I'm checking for direction twice, but I've left it that way for now since it works... :P...
by Garth
Thu Jan 03, 2019 12:45 am
Forum: NESdev
Topic: ASM indentation style
Replies: 22
Views: 7417

Re: ASM indentation style

I sort of follow what I'm used to from other languages just because it makes things easier for me to read and wrap my head around. I'm not super consistent with it but for me that's not really the point. I just want to be able to read and understand what I'm doing with the code, so with that I usua...
by Garth
Sat Dec 29, 2018 6:22 pm
Forum: NESdev
Topic: ASM indentation style
Replies: 22
Views: 7417

Re: ASM indentation style

I agree with many of the points above (although not all). I indent to make conditionals and loops obvious, and also things like what's between a PHA and PLA for example. I always indent at least three spaces. One or two spaces are just enough to make it look like you just got really sloppy at vertic...
by Garth
Sat Dec 08, 2018 10:39 pm
Forum: Newbie Help Center
Topic: A thread where I'm going to ask some math questions
Replies: 40
Views: 15012

Re: A thread where I'm going to ask some math questions

We had basically the same conversation on 6502.org, at http://forum.6502.org/viewtopic.php?f=2&t=5317 . Various code suggestions were made there.
by Garth
Mon Oct 29, 2018 12:01 pm
Forum: NESdev
Topic: I got obsessed with thinking about hex to decimal algorithms
Replies: 9
Views: 5960

Re: I got obsessed with thinking about hex to decimal algori

Not really sure the 65816 has anything to offer over a 6502.. True, but for this specific purpose, both the 65816 and an authentic 6502 have something to offer over the slightly cut-down 6502 in the 2A03: the ALU reacts to sed . I didn't comment on this earlier because I figured it was regarding th...
by Garth
Mon Oct 15, 2018 1:39 am
Forum: Newbie Help Center
Topic: Strategy for managing register values
Replies: 20
Views: 5938

Re: Strategy for managing register values

I've never had the problem mentioned in the head post, knock on wood. In fact, for me, macros have prevented loads of bugs and saved me a lot of time. I sense that in many cases others make very poor use of macros though. I'd have to see a lot of examples in order to identify a pattern of what's hap...
by Garth
Fri Oct 05, 2018 7:44 pm
Forum: Newbie Help Center
Topic: Simulating floating point
Replies: 13
Views: 3514

Re: Simulating floating point

May I broaden the scope to scaled-integer ? Because fixed-point is just a limited subset of scaled-integer arithmetic. The first half of the front page of the section of my website section on large look-up tables is an article about scaled-integer, showing how to do things with it that most people d...
by Garth
Fri Oct 05, 2018 7:31 pm
Forum: Newbie Help Center
Topic: Local variables - performance vs comfort
Replies: 7
Views: 6473

Re: Local variables - performance vs comfort

2. Slow and more comfortable - Use hardware stack, which is so-so for A register, but quite slow for anything else as it would require lda mem, pha, pla, sta mem for every variable You don't need to constantly be pulling stuff off the stack and putting it back on. Nor are you limited to just the by...
by Garth
Thu Sep 06, 2018 10:52 pm
Forum: NESdev
Topic: should the I flag be set while processing an interupt?
Replies: 4
Views: 3238

Re: should the I flag be set while processing an interupt?

See the 6502 interrupts article at http://wilsonminesco.com/6502interrupts/ , especially starting with 1.3 at the subtitle "GETTING TO THE NUTS AND BOLTS." Oh, and uh... Enjoy my outdated cartoons.
by Garth
Mon Aug 20, 2018 2:58 pm
Forum: NESdev
Topic: What is the practical use of indexed indirect addressing?
Replies: 32
Views: 8447

Re: What is the practical use of indexed indirect addressing

But why would you ever need to use indexed indirect addressing with the X register? What practical purpose does this serve? There has to be some situation where this feature would prove useful, otherwise I'd assume it wouldn't be featured in the processor design. Have you ever used indexed indirect...
by Garth
Wed Apr 25, 2018 10:39 pm
Forum: General Stuff
Topic: Favorite Linux Distros
Replies: 36
Views: 9050

Re: Favorite Linux Distros

There are a few other minor irritations, like when I click on a .pdf and it sometimes asks me if I want to open it with my text editor. If by "click on" you mean follow a link in a web browser, I think that's related to web servers that mistakenly serve things other than newline-separated ASCII or ...
by Garth
Wed Apr 25, 2018 10:37 pm
Forum: General Stuff
Topic: Favorite Linux Distros
Replies: 36
Views: 9050

Re: Favorite Linux Distros

Have you tried sudo apt autoremove to purge unused packages, particularly old linux-image versions? I'll look into it. Thanks. Is that the whole command? Is there anything I have to be careful of? This didn't work, but it seemed to be because I have 14.04, not 16.04 which our son who's the Linux ex...