This page is a mirror of Tepples' nesdev forum mirror (URL TBD).
Last updated on Oct-18-2019 Download

greetings + a couple of questions

greetings + a couple of questions
by on (#38239)
Hi. Turns out this nick was registered a while but I never bothered using it.

Some background: I recently started a little nes project that I felt like making when playing thrust on c64. Originally it WAS going to be on the c64 but I didn't have to look past the scrolling h/w it used to figure out I wanted another system. The physics / level / most of the sprites are all implemented so it's mainly just putting together levels now. It's a 40kb NROM.

The main question is that c64 thrust had single color terrains with alternating lines of transparent / solid color. I don't really know if a regular TV hooked up to the nes would spoil it because of the whole composite blur issue. c64 could output to a RGB monitor so I don't really know what would happen on a typical NTSC TV. I don't have hardware to test with so I judge it myself, nor do I know anything about exactly how NTSC effects specific patterns on screen. Anyone here with the technical insight to give me an idea?

here's what it looks like now. I could just turn the terrain until single lines and it'll fit just as well.

http://img401.imageshack.us/img401/343/rom02jt0.png
http://img525.imageshack.us/img525/8378/rom03zy7.png

Also, I've played around with the sound a bit, particularly noise (for the thrusting sound) and it works like I'd expect, but a while after noise playback I start to hear these artefacts. Crackles, buzzing, noises apart from what I'd like to hear. I only see a few registers, I don't know what I'm doing wrong here. When it plays intially, it sounds right, then the artefacts come shortly after. Any ideas on this too?

Also, apart from waiting for 2 vblanks at reset are there any other pitfalls for real hardware support?

Thanks for reading
Re: greetings + a couple of questions
by on (#38246)
smkd wrote:
The main question is that c64 thrust had single color terrains with alternating lines of transparent / solid color. I don't really know if a regular TV hooked up to the nes would spoil it because of the whole composite blur issue. c64 could output to a RGB monitor so I don't really know what would happen on a typical NTSC TV. I don't have hardware to test with so I judge it myself, nor do I know anything about exactly how NTSC effects specific patterns on screen. Anyone here with the technical insight to give me an idea?

Although NTSC does special things to color and luminance horizontally, it has little effect vertically. At least used to. Many modern TVs use a so-called "comb" filter (often a vertical 1-2-1 weighted FIR lowpass filter) to help separate out color information. (Comb filters assume that color information changes little scanline to scanline; by doing so they can slightly improve the luma-chroma crosstalk that has plagued NTSC since the beginning).

So alternating colored and black scanlines will 1- on an old TV, look fine; 2- on a new TV, reduce the TV's ability to deal with sharp color transitions.

Re: hardware support: if you use the DPCM channel, be careful with the joypad reads.

by on (#38250)
NTSC artifacts shouldn't affect horizontal lines much. For lines in other directions, as long as there's plenty of contrast in luma (brightness), it should look OK on a TV. Have you tried running your rom in Nestopia with the NTSC filter turned on?

As for your sound problem, you'll have to provide a sample (e.g. in .ogg or .nes or .nsf format) so that we can understand what you're talking about.

by on (#38265)
Hey there.

For the sound, post what you wrote to the noise control regs if you have it on hand. If you're not using the hardware effects (length counter and decay) you will probably only want to write to $400D and $400F one time, and never again. I'm just guessing at a cause here.

As for running on real hardware: assume nothing (initialize everything). On an emulator you can assume all of RAM, VRAM, registers, and even mappers will be cleared out and zeroed. On the real system there will be a kind of patterned random data.

The game looks incredible. I've wanted a game like that. Solar Jetman is one game that has similar physics. There's also an Atari VCS port of Thrust that is really impressive.

by on (#38280)
For quick and dirty NTSC testing, give Nestopia a try. It has a pretty good NTSC simulation filter.

[edit]
Hi, tepples, didn't see your reply there. :P

by on (#38283)
I completely forgot about the NTSC filter, I never bother with any video options. I tried it and the horizontal lines seem pretty much untouched, the contrast between each successive line is really sharp. The edges of the lines were affected though but it's not a big deal.

The noise issue was fixed, the sound routine was asbolutely tragic (moreso) and some reorganizing fixed any artefacts. Now I have a proper thrusting noise and explosion, which makes me wish I had a second noise channel to work with because when an enemy explodes, thrusting is cut off for a little bit. I got shooting sounds in there now, the sweep unit is pretty handy for the pitch slide.

@Memblers: Thanks, I haven't played solar jetman before but the shooting and physics look mostly the same. The graphics I'm using are garbage in comparison but it fits the theme I'm basing it on atleast. I should try the 2600 port sometime, I'd like to see how they pull it off with limitations I read about.

by on (#38308)
smkd wrote:
Now I have a proper thrusting noise and explosion, which makes me wish I had a second noise channel to work with because when an enemy explodes, thrusting is cut off for a little bit.

It's the nature of the beast. Could you make an acceptable thrust sound on the other channels, or possibly put explosion on DPCM like Bomberman does?

by on (#38320)
If the explosions are loud and short (even triangle+noise for explosion, for example), I'd think the sound interruption would be less noticeable. DPCM may be a good idea, perhaps another option would be to make the thrust sound a looped DPCM sample. I imagine that could sound either really good or really bad, depending on the the loop.

I always liked the thrust sound in arcade Asteroids.

by on (#38339)
I tried the DPCM idea and I think it actually turned out OK. The thrust is now running on the DPCM channel and just plays a looped string of random numbers. The 'muffled hiss' sound of the channel actually enhances it in my opinion, better than what I would've heard out of a second noise channel. This leaves the noise free for explosions, so it turned out nicely. Thanks for the suggestions. Square #2 and triangle are vacant, but I'm probably just going to assign enemy shooting and shield to them.