What's new

Nes

hap

New member
No sound yet, I'll have to practice and familiarize with directsound first, or anything to do with directx for that matter.

I've been Zelda playing, and gotten quite far. First time that I actually played a game in it for the sake of fun, and not looking for glitches. :p
 

aprentice

Moderator
hap said:
No sound yet, I'll have to practice and familiarize with directsound first, or anything to do with directx for that matter.

I've been Zelda playing, and gotten quite far. First time that I actually played a game in it for the sake of fun, and not looking for glitches. :p

if you figure out directsound get back to us, i've had some difficulty setting it up and understanding it period...
 

hap

New member
I've been fiddling around with directsound and managed to make it pop and click. For testing, I've added it to my Chip8 emu. It doesn't write to the buffer while playing though, I'll implement that when emulating the NES soundchip (unneccesary for Chip8).

http://hap.samor.nl/ .. check Fish 'N' Chips

*edit* changed url (and again)
 
Last edited:

hap

New member
progress since 1.0:

- much more compact binary.h, without speed decrease
- faster rendering: speed increase of about 50%, and over 100% when colour emphasis bits are used
- support for iNES mappers 11,32,33,34,40,71,119,185, improved #4
- improved input: support for 2 controllers, some fixes
- support for battery backed sram (goes into the 'battery' folder)

it's still alpha though :(
 

smcd

Active member
hap: it's still more than me, i'm still hacking away at chip 8 (trying to do recompilation/translation :p)
 

aprentice

Moderator
first signs of life (not sure why it looks like crap though)

nes_demo.gif
 

hap

New member
Looks great for first signs. If it was 4 coloured pixels, 4 black pixels, 4 coloured pixels, 4 black pixels, ... then I'd have a clue, but it's not, so I don't :p

What does Zelda Simulator (PD) look like ? And do any NROM (mapper 0) commercial games show their title screens ? (Super Mario Bros, Ice Climber, Millipede, Pacman, Xevious, etc.)

*edit* oh, you're probably using directdraw stretch, so that's why I was a bit confused. Anyway, I think the problems lies at your function that fetches pixels out of the tiles.
 
Last edited:

aprentice

Moderator
hap said:
Looks great for first signs. If it was 4 coloured pixels, 4 black pixels, 4 coloured pixels, 4 black pixels, ... then I'd have a clue, but it's not, so I don't :p

What does Zelda Simulator (PD) look like ? And do any NROM (mapper 0) commercial games show their title screens ? (Super Mario Bros, Ice Climber, Millipede, Pacman, Xevious, etc.)

*edit* oh, you're probably using directdraw stretch, so that's why I was a bit confused. Anyway, I think the problems lies at your function that fetches pixels out of the tiles.

I looked over the tile fetching code many times, can't seem to find any problems with it, maybe theres something about the palette that i'm not emulating, basically, i get the 2 bits out the attribute table and from the pattern table, then i look up the pixel byte in 0x3F00 and then use my palette array to come up with a color, am i missing anything?

amiga2.gif


zelda_pd.gif
 
Last edited:

hap

New member
With the vertical blockiness, it looks like you're always fetching data from the first tileline, eg. scanline 0 to 7 fetches pixels from tileline 0 instead of tileline 0 to 7.

Your palette description sounds ok, though keep in mind that if the fetched pattern table bits are both zero, you should use the background colour (0x3f00), and not the colour specified by the attribute bits.
 

aprentice

Moderator
hap said:
With the vertical blockiness, it looks like you're always fetching data from the first tileline, eg. scanline 0 to 7 fetches pixels from tileline 0 instead of tileline 0 to 7.

Your palette description sounds ok, though keep in mind that if the fetched pattern table bits are both zero, you should use the background colour (0x3f00), and not the colour specified by the attribute bits.

good eye hap, i wasnt factoring in the tileline like you said, thanks dude ;)
no commercial games run yet, focusing on the demos for the time. I think im fetching the attribute byte wrong, hmm

zelda_pd2.gif
 
Last edited:

hap

New member
So I take it you've fixed attribute byte calculation ?

Next up: UNROM and CNROM ? (mapper 2 and 3, very easy), and you'll have tons more games to test :p
 

aprentice

Moderator
hap said:
So I take it you've fixed attribute byte calculation ?
nope but i made it look a little bit better lol

Next up: UNROM and CNROM ? (mapper 2 and 3, very easy), and you'll have tons more games to test :p

super mario bros mapper 0 doesnt even work yet so adding mappers definately isnt the next move :p I'm not sure what i need to do emulationwise to get it to work yet..
 

hap

New member
Well, this is how I had it before I implemented scrolling (when you implement scrolling, you'll have to do some dramatic changes to your PPU emulator). Scratch your forehead a few times and you'll understand:
ppu.at=(ppu_memmap->cur_name[ppu.control1&BIN_00000011][0x3c0+(ppu.x>>5|(ppu.y>>2&BIN_11111000))]>>((ppu.x>>3&2)|(ppu.y>>2&4)))&3;

Have you implemented 0x2002.7 ? Many games, including SMB, check the status register for a vblank before they start doing anything significant. Also, the first module you'll want to have perfect emulation of is the CPU, so I'll attach some test programs. NesStress is not very accurate when it comes down to PPU testing though. You'll need to emulate the joypad before you can run these.

*edit* nestest seems friendly towards no-joypad-emulation:
"This test program, when run on "automation", (i.e. set your program counter
to 0c000h) will perform all tests in sequence and shove the results of
the tests into locations 02h and 03h."
 
Last edited:

aprentice

Moderator
hap said:
Have you implemented 0x2002.7 ? Many games, including SMB, check the status register for a vblank before they start doing anything significant. Also, the first module you'll want to have perfect emulation of is the CPU, so I'll attach some test programs. NesStress is not very accurate when it comes down to PPU testing though. You'll need to emulate the joypad before you can run these.

*edit* nestest seems friendly towards no-joypad-emulation:
"This test program, when run on "automation", (i.e. set your program counter
to 0c000h) will perform all tests in sequence and shove the results of
the tests into locations 02h and 03h."

yep, 0x2002.7 was one of the first things i did :p none of those demos run on my emu atm
 

aprentice

Moderator
hap

what did you have emulated when commercial games like super mario bros started to run? I havent done sprite 0 and some little things but i feel i have enough that it should run. any ideas?
 

Top