Search found 186 matches

by HihiDanni
Mon May 29, 2017 9:58 am
Forum: SNESdev
Topic: Alternative assembler recommendations?
Replies: 42
Views: 12983

Re: Alternative assembler recommendations?

Thanks for the clarification. Thinking about this some more, I might wrap some of this stuff into a macro which would be both human- and tool-friendly.
by HihiDanni
Mon May 29, 2017 9:29 am
Forum: SNESdev
Topic: Alternative assembler recommendations?
Replies: 42
Views: 12983

Re: Alternative assembler recommendations?

The use of ".export foo := *" implies there is some kind of wildcard here, hence I assumed it to be some kind of namespace. Which is really what I want - the ability to mass export/import labels for definition files. At this rate the best thing I can think of is to put ROM data definitions...
by HihiDanni
Mon May 29, 2017 8:06 am
Forum: SNESdev
Topic: Alternative assembler recommendations?
Replies: 42
Views: 12983

Re: Alternative assembler recommendations?

.define lw(v) .loword(v) .define bank(v) .lobyte(.bank(v)) Macro_LoadVRAM #lw Tileset, #bank Tileset, #$0000, #$8000 (YMMV whether this is actually any better.) It's surprisingly elegant! You can use export foo := * instead of .export foo + foo: . (Or, you can make your own macro to simplify the ex...
by HihiDanni
Sun May 28, 2017 12:58 pm
Forum: SNESdev
Topic: Alternative assembler recommendations?
Replies: 42
Views: 12983

Re: Alternative assembler recommendations?

Passing Tileset to the macro was the previous way of doing things. Perhaps I should make two versions of macros, make the first one always use immediates, and the second one called Indirect. But now that I think about it, all the macros are doing are setting a few register values before jumping to t...
by HihiDanni
Sun May 28, 2017 12:44 pm
Forum: SNESdev
Topic: Alternative assembler recommendations?
Replies: 42
Views: 12983

Re: Alternative assembler recommendations?

Okay, I have successfully ported my engine over to ca65! Thanks for the help! Already this has several advantages: - My project now has a proper structure with each source file being its own module, with all the modules linked together after assembly. - I no longer need to maintain a spreadsheet of ...
by HihiDanni
Sat May 27, 2017 10:32 am
Forum: SNESdev
Topic: PCX2SNES (somehow) incorectly generates palette colors
Replies: 13
Views: 4627

Re: PCX2SNES (somehow) incorectly generates palette colors

GIMP is not a particularly great choice for pixel art. Right now I'm thinking the best way to go about this is to export from Aseprite without worrying too much about quantizing the colors, then double-checking and correcting them after the conversion using a raw SNES palette editor.
by HihiDanni
Sat May 27, 2017 8:26 am
Forum: SNESdev
Topic: Alternative assembler recommendations?
Replies: 42
Views: 12983

Re: Alternative assembler recommendations?

Alright, I have a couple questions currently: - How do I force 24-bit addressing? I need this for the SPC upload routines in order to support uploading data from different data banks while still having access to the upload src/dest/size variables. - How is the checksum and complement computed? This ...
by HihiDanni
Tue May 23, 2017 2:41 pm
Forum: SNESdev
Topic: PCX2SNES (somehow) incorectly generates palette colors
Replies: 13
Views: 4627

Re: PCX2SNES (somehow) incorectly generates palette colors

Isn't pcx2snes really old? I've been using gfx2snes (which is also kind of buggy I think). This reminds me that I'm glad I made my own palette editor so I can fix the colors post conversion but now that I think about it, I display those colors on-screen by multiplying the channel value by 8... But I...
by HihiDanni
Sun May 21, 2017 2:15 pm
Forum: SNESdev
Topic: Alternative assembler recommendations?
Replies: 42
Views: 12983

Re: Alternative assembler recommendations?

Optiroc wrote:I use the ".loword" directive to get the correct bytes into the vector tables, like so.
Aha! .loword is used as function syntax. Thanks for the help with the linker configuration as well - it looks like I'm set to go ahead and start porting the actual code now!
by HihiDanni
Sun May 21, 2017 9:16 am
Forum: SNESdev
Topic: Some basic questions...
Replies: 55
Views: 17017

Re: Some basic questions...

Exactly. CPU code execution cuts into potential DMA time, and DMA cuts into potential CPU time. The more time you spend in your NMI routine, the less time you have for computing everything else in the following frame. But if you're out of CPU time in one frame you're probably not going to be doing a...
by HihiDanni
Sat May 20, 2017 8:18 pm
Forum: SNESdev
Topic: Alternative assembler recommendations?
Replies: 42
Views: 12983

Re: Alternative assembler recommendations?

AWJ wrote:I haven't used ca65 for SNES development, but I think you want to use .addr, not .word.
It's an interrupt vector, they must specifically be word-sized, unless you know of a way to force it to use just the lower 16 bits. Otherwise I might use tepples' suggestion despite looking kind of hackish.
by HihiDanni
Sat May 20, 2017 6:31 pm
Forum: SNESdev
Topic: Alternative assembler recommendations?
Replies: 42
Views: 12983

Re: Alternative assembler recommendations?

I tried modifying the basic LoROM template on the wiki to be HiROM like the linked example, but I get a range error where the vectors are defined. Specifically, it seems to take issue to the reset symbol: .word $ff, $ff, 0, 0, 0, 0, 0, 0 .word $ff, $ff, 0, 0, 0, 0, reset, 0 I'm guessing reset is bei...
by HihiDanni
Sat May 20, 2017 6:44 am
Forum: SNESdev
Topic: Alternative assembler recommendations?
Replies: 42
Views: 12983

Re: Alternative assembler recommendations?

The game already runs at HiROM, unless you're talking about assembler differences here. Anyway, I am already seeing two ca65 techniques that I could really use that I hadn't even touched on previously: ability to define stack size within the memory map definition, and the ability to export symbols t...
by HihiDanni
Fri May 19, 2017 8:27 pm
Forum: SNESdev
Topic: Alternative assembler recommendations?
Replies: 42
Views: 12983

Re: Alternative assembler recommendations?

I'll take a look at both assemblers tomorrow. It's a bit frustrating that the ca65 template assumes a LoROM configuration so I might need to play around with it some.

One more useful feature that I forgot to mention: The ability to generate a symbol file for debugging purposes.
by HihiDanni
Fri May 19, 2017 5:24 pm
Forum: SNESdev
Topic: Alternative assembler recommendations?
Replies: 42
Views: 12983

Alternative assembler recommendations?

Currently my SNES framework is using WLA-DX as its assembler. Technically there isn't anything wrong with this assembler that is straight up preventing me from finishing the framework, but it feels messy and I've had to deal with several workarounds to bugs in its functionality: - Macros are fragile...