Search found 12 matches

by Paul_Atreides
Sun Aug 02, 2020 1:26 pm
Forum: NESemdev
Topic: Spurious tones in square channels when they should be muted! (VIDEO INSIDE)
Replies: 1
Views: 1306

Spurious tones in square channels when they should be muted! (VIDEO INSIDE)

Please check this video to know exactly what I mean. https://www.youtube.com/watch?v=FfNUSff1RD4&feature=youtu.be For producing this video, I disabled all channels except square 1. You'll be able to hear how the channel is never completely muted, but outputs a constsant tone which is a direct result...
by Paul_Atreides
Mon Jul 13, 2020 2:11 pm
Forum: NESemdev
Topic: Infinite loop while waiting for VB in Antartic Adventure
Replies: 6
Views: 1814

Re: Infinite loop while waiting for VB in Antartic Adventure

I made some logical changes and now the code does execute further. However, an infinite loop ends up occurring at the same spot. Here you can see what's going on at CPU instruction ~134k. STA shows the content of the PPU status reg, and CTRL shows the value of the PPU control register. As you can ob...
by Paul_Atreides
Sun Jul 12, 2020 2:44 pm
Forum: NESemdev
Topic: Infinite loop while waiting for VB in Antartic Adventure
Replies: 6
Views: 1814

Infinite loop while waiting for VB in Antartic Adventure

First off, the code if you're interested: https://github.com/DiasparCitizen/eNESimo This game is never launching due to an infinite loop while the game is waiting for VB to be set to 1. In the following trace you'll see pretty well what's going on. As a summary: - The CPU loops between F74E and F751...
by Paul_Atreides
Tue May 05, 2020 11:03 pm
Forum: NESemdev
Topic: Mesen - NES Emulator
Replies: 857
Views: 393057

Re: Mesen - NES Emulator

This is a very general question and I'd appreciate it if someone took the time to answer. I'm working on an emulator core and can already correctly emulate some mapper0 games. I'm using OLC's pixel game engine for rendering the frames, but want to progress to something more powerful. I want to integ...
by Paul_Atreides
Fri May 01, 2020 11:03 pm
Forum: NESemdev
Topic: Super Mario Bros freezes when Mario reaches upper screen
Replies: 3
Views: 1415

Re: Super Mario Bros freezes when Mario reaches upper screen

It was a programming issue affecting sprite 0 hit. I was iterating over all sprites in OAM, from 0 -> 63. If sprite at index 0 was hit, I did the following: sprite0Hit = spriteIdx == 0; Which means that, if a scanline was in collision with sprite 0 AND yet another sprite, then the boolean sprite0Hit...
by Paul_Atreides
Thu Apr 30, 2020 1:19 pm
Forum: NESemdev
Topic: Super Mario Bros freezes when Mario reaches upper screen
Replies: 3
Views: 1415

Super Mario Bros freezes when Mario reaches upper screen

I'm in the process of developing my own NES emulator, strictly for learning purposes. It is an enjoyable project! The game is playable, renders OK. However, when the Mario character reaches too high in the screen, the game freezes completely. A way to trigger this error is to climb to the top of a f...
by Paul_Atreides
Sat Apr 18, 2020 11:24 pm
Forum: NESemdev
Topic: Problems rendering Donkey Kong's first frame
Replies: 11
Views: 2192

Re: Problems rendering Donkey Kong's first frame

Quietust wrote:
Sat Apr 18, 2020 3:46 pm


Any particular reason why you weren't using inline functions instead of macros?
Call it professional degeneration.
At work I mainly use C and C++ in C-style (apart from assembly)... :roll:

I'll consider using inline functions, but, from what I'm reading, they're not exactly equivalent.
by Paul_Atreides
Sat Apr 18, 2020 2:20 pm
Forum: NESemdev
Topic: Problems rendering Donkey Kong's first frame
Replies: 11
Views: 2192

Re: Problems rendering Donkey Kong's first frame

Update: I managed to solve the issue. The cause is sort of appalling... I'd been using a macro [ TRANSFER_ADDR_Y() ] which consisted in 3 lines of code, under an if clause without curly brakets. The result is obvious; only the first line of code was being executed conditionally, the other two always...
by Paul_Atreides
Wed Apr 15, 2020 2:24 pm
Forum: NESemdev
Topic: Problems rendering Donkey Kong's first frame
Replies: 11
Views: 2192

Re: Problems rendering Donkey Kong's first frame

An update: There is a whole section in which the CPU writes the value 0x24 (code for the black bg tile) to the nametable: ... ppuWrite()/nametable: write 0x24 @ 0x21d1 ppuWrite()/nametable: write 0x24 @ 0x21d2 ppuWrite()/nametable: write 0x24 @ 0x21d3 ppuWrite()/nametable: write 0x24 @ 0x21d4 ppuWri...
by Paul_Atreides
Tue Apr 14, 2020 12:42 pm
Forum: NESemdev
Topic: Problems rendering Donkey Kong's first frame
Replies: 11
Views: 2192

Re: Problems rendering Donkey Kong's first frame

I've been debugging the donkey kong issue for a while and have found out it is a NAMETABLE issue. My PPU code is correctly rendering what appear to be incorrect nametable values. Black tiles in Donkey Kong are represented by value 0x24. However, starting at address 0x2220, tiles that are supposed to...
by Paul_Atreides
Tue Apr 14, 2020 9:13 am
Forum: NESemdev
Topic: Problems rendering Donkey Kong's first frame
Replies: 11
Views: 2192

Re: Problems rendering Donkey Kong's first frame

Hi, I can at least help with full_palette, refer to https://wiki.nesdev.com/w/index.php/PPU_palettes "The background palette hack" :) In your pixel output function - something like this: if (!RENDERING && (v & 0x3f00) == 0x3f00) { // https://wiki.nesdev.com/w/index.php/PPU_palettes "The background ...
by Paul_Atreides
Mon Apr 13, 2020 9:52 am
Forum: NESemdev
Topic: Problems rendering Donkey Kong's first frame
Replies: 11
Views: 2192

Problems rendering Donkey Kong's first frame

Some weeks ago I came across Javid9x's *excellent* YouTube channel "One Lone Coder", where he's got a pretty interesting series on how to code a NES emulator. I've started my own emulator with the sole purpose of learning and understanding, and, inevitably, I'm facing a not small number of problems....