Search found 487 matches

by Jarhmander
Sat Dec 22, 2018 9:30 pm
Forum: SNESdev
Topic: GSS hanging on hw, spc quirk?
Replies: 23
Views: 12698

Re: GSS hanging on hw, spc quirk?

There is no exe, as in you need to compile it if you want one. Can I expect that developers of retro console games who use Windows will either have already installed MinGW-w64 and MSYS2 or be willing to install them? My current build process requires Python and GNU Make, and I occasionally get comp...
by Jarhmander
Tue Dec 18, 2018 7:15 pm
Forum: Other Retro Dev
Topic: N64 benchmarks
Replies: 41
Views: 35196

Re: N64 benchmarks

I had tried that with some of the audio codecs, and -Os was something like 20% slower than -O3. I didn't try with MIPS, however something that I observed is that gcc often generates smaller code with -O3 than with -Os, at least when compiling for ARM Cortex-M3 devices. That alone may explain the di...
by Jarhmander
Wed Oct 31, 2018 10:19 pm
Forum: NESdev
Topic: Copying a pointer of a pointer to a pointer
Replies: 14
Views: 6256

Re: Copying a pointer of a pointer to a pointer

Wow, this shows that I should not post minutes before leaving for work... This is correct, and about the best I can think of at the moment: ldy #0 sty zptemp+1 lda index asl a rol zptemp+1 adc arrayOfArray sta zptemp lda arrayOfArray+1 adc zptemp+1 sta zptemp+1 lda (zptemp), y sta array iny lda (zpt...
by Jarhmander
Wed Oct 31, 2018 6:03 am
Forum: NESdev
Topic: Copying a pointer of a pointer to a pointer
Replies: 14
Views: 6256

Re: Copying a pointer of a pointer to a pointer

Your code works as long as index < 128; otherwise, you need something like this: lda arrayOfArray clc adc index sta zptemp lda arrayOfArray+1 adc #0 sta zptemp+1 ldy #0 lda (zptemp), y sta array iny lda (zptemp), y sta array+1 Maybe you know that "index" is small, but cc65 doesn't, so it probably do...
by Jarhmander
Sat Oct 13, 2018 10:26 am
Forum: NESdev
Topic: CC65 Won't boot
Replies: 26
Views: 10710

Re: CC65 Won't boot

... you can use cl65 to assemble and link in one step however. That doesn't save you of making a working linker script though.
by Jarhmander
Mon Sep 24, 2018 12:38 pm
Forum: NESdev
Topic: Detecting button combos / sequences
Replies: 6
Views: 4432

Re: Detecting button combos / sequences

Super Smash Bros. games tend to immediately begin the action associated with the press, but within a certain timeout, if another key is pressed, it changes the animation (and attack). For example, you can do a dash attack or a dash grab (which has a different animation from regular grab starting fro...
by Jarhmander
Thu Sep 20, 2018 5:59 am
Forum: NESdev
Topic: Simple way to calculate memory size from address lines
Replies: 6
Views: 4529

Re: Simple way to calculate memory size from address lines

For the math-inclined, it's easy to see why this method works. First, as tokumaru underlined, simply doing M = 2 N gives the exact answer. By decomposing N into t ens and o nes, we effectively get the equivalent M = 2 T·10 + O , which is M = 2 T·10 ·2 O . In this form, we can see that the tens will ...
by Jarhmander
Wed Sep 19, 2018 11:14 pm
Forum: General Stuff
Topic: Makefile, how to make it react to any content included?
Replies: 42
Views: 15912

Re: Makefile, how to make it react to any content included?

Hmm, this one is quite funny. From cl65's source code, -D and -I are only handed to cc65, not ca65. In the resulting ASFLAGS, substituting --asm-define for -D and --asm-include-dir for -I will make it work, though I don't know if it's really an improvement over just using ca65 at this point? gcc's b...
by Jarhmander
Wed Sep 19, 2018 10:17 pm
Forum: NESdev
Topic: Simple way to calculate memory size from address lines
Replies: 6
Views: 4529

Re: Simple way to calculate memory size from address lines

2 to the [number of bits]th power. Exactly, but what my post is all about is calculating that in your head easily with an easy to use result, because I can tell 26 bits gives 64MB instantly, whereas I cannot tell it's 67108864 bytes as instantly, I would have to put out my cellphone or launch Guile...
by Jarhmander
Wed Sep 19, 2018 10:00 pm
Forum: NESdev
Topic: Simple way to calculate memory size from address lines
Replies: 6
Views: 4529

Simple way to calculate memory size from address lines

Sometime ago I found a way to quickly know the size of a memory region from its address bus size, or anything that is about mapping bits to number of permutations, really. It's very, very stupid and simple, it's nothing ground breaking, and I'm pretty sure some smarty pants around here already know ...
by Jarhmander
Wed Sep 19, 2018 8:05 pm
Forum: General Stuff
Topic: Makefile, how to make it react to any content included?
Replies: 42
Views: 15912

Re: Makefile, how to make it react to any content included?

Have you found what's causing your issue? I'm not sure how the modifications break compilation of "s" files; if anything, I changed how the "c" files are compiled, so it would expect that if I broke something, that must be it. Assembly files are compiled through cl65, and I only made a slight reorde...
by Jarhmander
Mon Sep 17, 2018 8:58 pm
Forum: General Stuff
Topic: Makefile, how to make it react to any content included?
Replies: 42
Views: 15912

Re: Makefile, how to make it react to any content included?

I have found the problem. It's quite simple actually when we see the Makefile in action. gcc and clang both compile "c" files to "o" directly; cc65 cannot. Instead, it outputs an assembly file which can be assembled. Because of this, the generated dep file looks like this: build/src/test.s: src/test...
by Jarhmander
Sun Sep 16, 2018 11:47 am
Forum: NESdev
Topic: Building and testing NES games on a Pinebook
Replies: 2
Views: 3211

Re: Building and testing NES games on a Pinebook

Don't extrapolate too much. Yes, I can happily build cc65 and time(1) it. From my experience, when it's not running graphic-heavy things, it runs quite OK. Graphically, it suffers from either bad drivers or too old graphic chip set (or both?), so fullscreen youtube videos are choppy a bit, and contr...
by Jarhmander
Sun Sep 16, 2018 6:45 am
Forum: General Stuff
Topic: Makefile, how to make it react to any content included?
Replies: 42
Views: 15912

Re: Makefile, how to make it react to any content included?

@Jarhmander I just did a quick test and the d files are created but the makefile doesn't react yet to the deps. Right now it is 2h in the morning so it may be the reason that I cannot find the cause ^^;; I think it may be that my $(DEPS) variable may not contain any value and when it does -include ...
by Jarhmander
Sat Sep 15, 2018 6:28 am
Forum: NESdev
Topic: Noob question about lda and lda #
Replies: 3
Views: 3128

Re: Noob question about lda and lda #

SMALL_NUMBER = $12 BIG_NUMBER = $3456 SOME_ADDRESS: .res 1 lda #SMALL_NUMBER ; SMALL_NUMBER as number lda SMALL_NUMBER ; SMALL_NUMBER as address (in zero page) lda (SMALL_NUMBER, x) ; \ SMALL_NUMBER as address of an address lda (SMALL_NUMBER), y ; / (only possible in zero page) lda #<BIG_NUMBER ; L...