Search found 528 matches

by Movax12
Sat Nov 28, 2015 9:08 am
Forum: NESdev
Topic: How do I do in CA65 things I do in ASM6?
Replies: 88
Views: 31517

Re: How do I do in CA65 things I do in ASM6?

I was using symbols to keep track of what macros were doing...it seems I can make the symbols global and access them with ::, but that definitely sounds like a bug to me. Not sure if this was mentioned exactly: You can create scopes that are for your macro and related macros, like: .scope mysuperma...
by Movax12
Fri Nov 13, 2015 5:13 am
Forum: NESdev
Topic: How do I do in CA65 things I do in ASM6?
Replies: 88
Views: 31517

Re: How do I do in CA65 things I do in ASM6?

tokumaru wrote:I see... so the scope is probably being opened and closed before the include itself is executed
I think this is basically what is happening.
by Movax12
Fri Nov 13, 2015 4:34 am
Forum: NESdev
Topic: How do I do in CA65 things I do in ASM6?
Replies: 88
Views: 31517

Re: How do I do in CA65 things I do in ASM6?

Hope that makes sense. Actually... I'm pretty confused! I couldn't find anything about resZP or resBSS, not in the documentation you liked to nor in the SMB High Level Disassembly files... What am I missing? These are separate macros just used as an example. They use .struct and track RAM usage. I ...
by Movax12
Wed Nov 11, 2015 3:02 pm
Forum: NESdev
Topic: How do I do in CA65 things I do in ASM6?
Replies: 88
Views: 31517

Re: How do I do in CA65 things I do in ASM6?

Some documentation for the "highlevel macros" https://www.assembla.com/spaces/ca65hl/wiki As far as reserving RAM, you can use .struct with macros to define your variables yourself, as constants at assemble time. This is not the intended use, but I do it. resZP baz .word ; or, multiple declarations ...
by Movax12
Mon Nov 09, 2015 11:05 am
Forum: NESdev
Topic: How do I do in CA65 things I do in ASM6?
Replies: 88
Views: 31517

Re: How do I do in CA65 things I do in ASM6?

Here's one option: .struct foo padding .res 10 ; or whatever other size bar .byte ; ... .endstruct Just to add, I'm pretty sure you can omit the name: .struct foo .res 10 ; or whatever other size, or expression you want here (if it is constant at assemble time) bar .byte ; ... .endstruct
by Movax12
Sat Nov 07, 2015 1:46 pm
Forum: NESdev
Topic: Optimizing important code parts
Replies: 16
Views: 6504

Re: Optimizing important code parts

Macros aren't library calls. Personally I don't like ADD and SUB macros because I don't want to get in the habit of using them and missing opportunities to optimize where the carry flag is already in the correct state. But macros can be super helpful.
by Movax12
Tue Oct 13, 2015 5:51 am
Forum: General Stuff
Topic: Good place to start learning C?
Replies: 24
Views: 4811

Re: Good place to start learning C?

Maybe just as important as learning the C language, one should adopt a style for how you space out source code and name variables, etc. Figure out what works for you and be consistent.
Search google: http://www.google.com/search?q=C+progra ... tyle+guide
by Movax12
Thu Oct 08, 2015 9:05 am
Forum: NESdev
Topic: CC65 nes.cfg define = yes without occupying ROM space
Replies: 15
Views: 2926

Re: CC65 nes.cfg define = yes without occupying ROM space

I'm still asking myself why you should ever use an ".inc" file for general purpose constants instead of just exporting them, so that every other file that needs it imports it. In assembly, you can use your include file to define macros and symbols, without code. You could treat a file like that sim...
by Movax12
Wed Oct 07, 2015 7:54 pm
Forum: General Stuff
Topic: Looking for certain Atari 2600 games
Replies: 34
Views: 7475

Re: Looking for certain Atari 2600 games

I think the idea of comparing bits can be blamed on Sega's marketing team, along with things like "Blast Processing". When I was a kid, I remember no one really knowing why "16-bit" was better, but if it was double the NES, so it must be better! Welcome to the next level!
by Movax12
Sun Sep 27, 2015 4:48 pm
Forum: Newbie Help Center
Topic: Looking to maybe start a project
Replies: 23
Views: 7510

Re: Looking to maybe start a project

I have been working on SMB myself recently The only thing I don't have figured out is the 'maze' code that's in some of the castles. Might help: This is using "high level" assembly code via ca65 macros. Personally I think it is clearer. If you can figure this out it should help with the assembly in...
by Movax12
Tue Sep 22, 2015 9:33 am
Forum: NESdev
Topic: Stack-based VRAM update system
Replies: 25
Views: 6827

Re: Stack-based VRAM update system

tokumaru wrote:
Movax12 wrote:Looking at this after some sleep, not sure if I was clear.
It was pretty clear to me. :D Did I say anything that sounded like I didn't get it?
Not really, but I wasn't sure if I got it after reading it in the morning.
by Movax12
Tue Sep 22, 2015 2:31 am
Forum: NESdev
Topic: Stack-based VRAM update system
Replies: 25
Views: 6827

Re: Stack-based VRAM update system

I wanted it to be easy to hook anything into NMI. I load $0100 and up with the addresses of task I want to complete (minus 1), set the SP and RTS to the first routine. Looking at this after some sleep, not sure if I was clear. During "game logic" I can call a macro that adds a new routine to this l...
by Movax12
Mon Sep 21, 2015 8:38 pm
Forum: NESdev
Topic: Stack-based VRAM update system
Replies: 25
Views: 6827

Re: Stack-based VRAM update system

Reminds me of how I add routines to NMI. I wanted it to be easy to hook anything into NMI. I load $0100 and up with the addresses of task I want to complete (minus 1), set the SP and RTS to the first routine. The next RTS will load the next task, and whatever the last task is, its RTS will jump to t...
by Movax12
Sun Sep 13, 2015 8:11 am
Forum: SNESdev
Topic: Sound driver fun
Replies: 43
Views: 20791

Re: Sound driver fun

Wordpad.exe can handle both types of newlines.
by Movax12
Tue Sep 08, 2015 3:39 am
Forum: General Stuff
Topic: Dracula = "The Count" in "Castlevania"
Replies: 65
Views: 10779

Re: Dracula = "The Count" in "Castlevania"

Game companies didn't care. Nintendo cared. Some things could have been removed arbitrarily without a solid reason.