Search found 35 matches

by furrykef
Wed Nov 11, 2015 4:52 am
Forum: NESdev
Topic: Basic ASM question
Replies: 31
Views: 6347

Re: Basic ASM question

I've always felt the nocash 6502 syntax is dumb; to me, at least, it makes the processor seem more irregular and makes it harder to keep track of what is and isn't possible ("What do you mean I can't MOV X,[[foo]+y]?"). Sure, it becomes a bit more familiar for x86 or Z80 programmers, but I...
by furrykef
Sat Nov 07, 2015 5:25 pm
Forum: NESdev
Topic: Optimizing important code parts
Replies: 16
Views: 7438

Re: Optimizing important code parts

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. Y'know what they say: computer cycles are cheap, people cycles are expensive. Just one bug caused by forgetti...
by furrykef
Sat Nov 07, 2015 6:27 am
Forum: NESdev
Topic: Optimizing important code parts
Replies: 16
Views: 7438

Re: Optimizing important code parts

Well then you can write your own "ADD" and "SUB" macros. Although I don't see the point in doing that instead of using the ones already written for you.
by furrykef
Sat Nov 07, 2015 2:49 am
Forum: NESdev
Topic: How to store and draw score
Replies: 12
Views: 3892

Re: How to store and draw score

tokumaru's method of using one byte per digit is called "unpacked BCD", by the way, and it happens to be what I'm using for the clone of Pac-Man I'm currently writing. I simply wrote a routine that adds two BCD numbers together and defined any numbers I was using my code like this: Points2...
by furrykef
Sat Nov 07, 2015 2:35 am
Forum: NESdev
Topic: Optimizing important code parts
Replies: 16
Views: 7438

Re: Optimizing important code parts

This won't help make anything faster, but if you're using ca65, I highly recommend using ".macpack generic" and the macros within. The ADD and SUB macros are less error-prone than writing CLC (or SEC) with ADC and SBC explicitly, and I much prefer writing BLT and BGE to writing BCC and BCS...
by furrykef
Sat Nov 07, 2015 2:21 am
Forum: NESdev
Topic: RAM initialization
Replies: 12
Views: 3872

Re: RAM initialization

I'll add that it's a good idea to explicitly fill all RAM (except for anywhere you're storing persistent data) with a certain value at the start of your program. A lot of people fill it with zero, but I don't like using zero. Initializing RAM to zero is more likely to hide mistakes (caused by failur...
by furrykef
Mon Nov 02, 2015 7:45 pm
Forum: NESdev
Topic: Sprite overflow flag issue [SOLVED]
Replies: 7
Views: 2512

Re: Sprite overflow flag issue [SOLVED]

Yeah, I considered that too. The flag does the job now, though, so might as well stick with that.
by furrykef
Mon Nov 02, 2015 7:32 pm
Forum: NESdev
Topic: Sprite overflow flag issue [SOLVED]
Replies: 7
Views: 2512

Re: Sprite overflow flag issue

Not the first sprite found after the first eight. The next entry in OAM . As is, your OAM order is PacmanL PacmanR BlinkyL BlinkyR blank blank PinkyL PinkyR blank blank InkyL InkyR blank blank ClydeL ClydeR, and because the underlined thing isn't Clyde, that's why it's not predictably being set. Oh...
by furrykef
Mon Nov 02, 2015 6:43 pm
Forum: NESdev
Topic: Sprite overflow flag issue [SOLVED]
Replies: 7
Views: 2512

Sprite overflow flag issue [SOLVED]

OK, first off, let me say I am well aware that the sprite overflow flag is buggy. The problem is that, from my understanding of the bug, my code should be unaffected -- yet the flag is still not being set when it should be. Either my understanding of the bug is incomplete, or there is something else...
by furrykef
Thu Sep 10, 2015 8:14 pm
Forum: NESemdev
Topic: FCEUX overclocking
Replies: 24
Views: 12561

Re: FCEUX overclocking

Considering the huge library of NES games, that really isn't a lot, and most people aren't interested in most of those games. I'm not saying they're not worth supporting if possible, but I think most people really won't mind if a minor emulator feature isn't compatible with those games. It's also on...
by furrykef
Wed Sep 09, 2015 10:52 pm
Forum: NESemdev
Topic: FCEUX overclocking
Replies: 24
Views: 12561

Re: Freeze and then resume DMC activity

Isn't it a given that changing timing specifications is going to break any kind of programming that relies on the spec being unchanged? Just look at early dos games like Bouncing Babies which become unplayable as CPU speeds increase, with certain manufacturers going as far as adding a "turbo&q...
by furrykef
Sat Aug 29, 2015 6:28 am
Forum: SNESdev
Topic: SNES register sizing schemes (65816 M and X)
Replies: 28
Views: 7237

SNES register sizing schemes (65816 M and X)

I'd heard that what a lot of 65816 programmers do is they usually keep the M flag 8-bit and the X flag 16-bit. I found I rarely need 16-bit indexing and started to ponder whether this might be the wrong way around, so last night I rewrote my current projects to default to 16-bit M and 8-bit X. (This...
by furrykef
Mon Oct 27, 2014 6:37 pm
Forum: NESdev
Topic: NESADPCM -- a new library for playing VOX ADPCM audio
Replies: 11
Views: 3472

Re: NESADPCM -- a new library for playing VOX ADPCM audio

Now the demo NSF in the repo uses the new maximum play speed.
by furrykef
Mon Oct 27, 2014 4:11 pm
Forum: NESdev
Topic: NESADPCM -- a new library for playing VOX ADPCM audio
Replies: 11
Views: 3472

Re: NESADPCM -- a new library for playing VOX ADPCM audio

He's right, actually; the NSF spec on the wiki says, "A play routine should normally finish with an RTS instruction, but is not required to do so. A non-returning play will cause problems for NSF players that use the same CPU to control the user interface and to run the NSF, such as NSF players...
by furrykef
Mon Oct 27, 2014 1:31 pm
Forum: NESdev
Topic: NESADPCM -- a new library for playing VOX ADPCM audio
Replies: 11
Views: 3472

Re: NESADPCM -- a new library for playing VOX ADPCM audio

I'm using NSFPlug 2.3 and it sounds the same as on FCEUX for me. NSF wasn't really designed for software-decompressed samples played back through writes to $4011. Perhaps making a .NES file for use in full NES emulators might produce more repeatable results. I just wanted something that I can double...