Search found 223 matches

by za909
Sun Oct 22, 2017 10:50 pm
Forum: NESdev
Topic: Best way to pass arguments
Replies: 7
Views: 2345

Best way to pass arguments

I've recently found that passing arguments can prove to be somewhat troublesome depending on what you have in mind. Obviously, one might go for a route where each CPU register holds one of the arguments assuming there are up to 3 arguments. Some situations might call for a method that only uses 'A' ...
by za909
Tue Oct 17, 2017 1:42 pm
Forum: General Stuff
Topic: Those "This is totally stupid but it works" moments?
Replies: 10
Views: 2721

Those "This is totally stupid but it works" moments?

Sometimes I wonder if anyone else feels like that when finding a solution to a certain problem during development (be it NES or otherwise). Like this instance where I had a bunch of things to comment out, but no "block comments" in ASM6: .if 1 = 0 .db 0,3,6,9,12,16,19,22 .db 25,28,31,34,37,40,43,46 ...
by za909
Sat Oct 07, 2017 6:17 am
Forum: NESdev
Topic: Noise length counter polling
Replies: 5
Views: 2267

Re: Noise length counter polling

14 914 CPU cycles 14 914 APU cycles. I did mean CPU cycles. Since the write immediately decrements the length counter of the channel in question, only 2 frame counter steps out of the 5 have to occur before the length counter gets clocked again, which amounts to 7456.5 APU cycles. I'm not exactly s...
by za909
Fri Oct 06, 2017 8:35 am
Forum: NESdev
Topic: Noise length counter polling
Replies: 5
Views: 2267

Noise length counter polling

Here's an idea that may or may not be useful, but I thought it would be worth sharing here. So the frame counter allows for clocking the length counters at a ~96Hz rate with the 5-step mode selected, and writing to $4017 clocks all the hardware timer units. By writing $18 to $400F and then $C0 to $4...
by za909
Thu Aug 24, 2017 12:09 pm
Forum: NESdev
Topic: How common is it to use V flag after adc, sbc, cmp, vs. bit?
Replies: 33
Views: 8268

Re: How common is it to use V flag after adc, sbc, cmp, vs.

The effect of BIT is probably why I use it the most. The way I handle the math doesn't really need the V flag because most of the time I add signed 16-bit values to unsigned 16-bit values... so I still only ever need the carry for that (though I have to interpret the carry differently based on the s...
by za909
Thu Jul 13, 2017 2:25 am
Forum: NES Music
Topic: Mindboggingly simple way to control legato (ftm inside)
Replies: 19
Views: 9823

Re: Mindboggingly simple way to control legato (ftm inside)

I've always tried to address this from both directions: My engines can either have a length counter-like timer in software to stop the sound, or a "stop the sound when less than X frames of duration are left for this note". It makes things as opened up as I need them to be.
by za909
Wed Jul 12, 2017 6:54 am
Forum: NES Music
Topic: Namco 163 techniques (ftm inside)
Replies: 4
Views: 3804

Re: Namco 163 techniques (ftm inside)

In a game (provided that the sampling rate is not too high), any N163 channel could be easily used to play 4-bit PCM data with volume control by having the channel set to a 4-step wavetable, with all steps of that wavetable always being equal. To avoid potential noise coming from the little time del...
by za909
Sun Jul 02, 2017 9:39 am
Forum: NESdev
Topic: NES program running without cartridge
Replies: 14
Views: 4391

NES program running without cartridge

I've had this crazy idea of "could an NES game cartridge be removable without the game crashing?". I realize the space issue would be huge, since there would only be a bit above 1.5k of code that could be housed by the RAM, while still leaving some zero page and stack space for variables. But the bi...
by za909
Fri Jun 23, 2017 5:45 pm
Forum: NES Music
Topic: More NSF Requests
Replies: 3080
Views: 1219622

Re: More NSF Requests

Great job, especially because now we can listen to the samples without any NMI or OAM DMA cutting into the sound like in-game.
by za909
Tue Jun 20, 2017 12:38 am
Forum: GBDev
Topic: Concept for actually making VIN useful - "MBC-5B"
Replies: 23
Views: 9142

Re: Concept for actually making VIN useful - "MBC-5B"

If you want easy wiring the SN76489 could also be useful, you only need one register for it (some bits of the data written determine which channel receives the lower bits and whether it's a volume or period register write)
by za909
Sat Jun 10, 2017 3:08 pm
Forum: NES Music
Topic: 256-byte "music generator"
Replies: 7
Views: 5905

256-byte "music generator"

I was inspired by the "A Mind is Born" 256-byte demo on the C64 to try and put something interesting in the same amount of space for the NES. Not counting the stupid required system init things it does fit into 256 bytes and there's a TON of ways to improve on this but this was just a proof of conce...
by za909
Fri Jun 09, 2017 9:53 am
Forum: NES Music
Topic: Practical use of 75% duty cycle?
Replies: 5
Views: 3610

Re: Practical use of 75% duty cycle?

There is a practical use if you want phasing effects to behave differently. For example playing the same note, but with slightly offset pitch on two channels using 25% and 75% pulse-width results in a high-pass filter-sort of PWM effect instead of the usual phasing (it's recommended to retrigger the...
by za909
Sat May 27, 2017 2:05 pm
Forum: NES Graphics
Topic: My "Kat" shmup game graphics
Replies: 5
Views: 4141

My "Kat" shmup game graphics

I'm slowly getting into creating some of the assets for my game (8k CHR-ROM only) and I'd like to get some criticism and ideas on how to improve myself. Generally I practice with art I receive/commission or find on the internet by using them as a base for "pixelization" as far as the mugshot and the...
by za909
Fri Mar 31, 2017 6:39 am
Forum: Newbie Help Center
Topic: NES Programming Tutorial : Interrupts
Replies: 3
Views: 2854

Re: NES Programming Tutorial : Interrupts

Two things that stood out to me:
- $2007 is the PPU_DATA register, your table makes it look like it is part of the mirorred address space.
- The iNES header is 16 bytes, not 256 (but the rest of the tutorial with the ROM addresses actually considers it 16 bytes).
by za909
Wed Mar 29, 2017 3:25 am
Forum: NESdev
Topic: Sine Wave Raster Effect with DMC
Replies: 2
Views: 1457

Sine Wave Raster Effect with DMC

For one of my stages in my game with lava at the bottom, I'd like to create a sine wave movement pattern to make things look more interesting. However, my game is small and is based on very simple cart hardware so I use the DMC for raster effects. I know that I need to do this with timed code becaus...