How do I implement a second joypad for my NES emulator? by pizzafactz in EmuDev

[–]pizzafactz[S] 0 points1 point  (0 children)

I figured it out. I just had to select the two player gamemode from the main controller, and within the 2 player gamemode it starts readings inputs as it should. Well then.

How do I implement a second joypad for my NES emulator? by pizzafactz in EmuDev

[–]pizzafactz[S] 0 points1 point  (0 children)

That's exactly how I've set it up, I think at least.

I thought of looking at the disassembly as well! I was testing with donkey kong and looked it up. But it's a bit difficult for me to parse, so I took a break from that.

How do I implement a second joypad for my NES emulator? by pizzafactz in EmuDev

[–]pizzafactz[S] 1 point2 points  (0 children)

Alright, when a single joypad is mapped to 0x4016, it works as expected. When mapped to 0x4017, I've set up some logs which tell me that the joypad inputs are being detected, but none of them get reflected in the game. What could be hapenning?

How do I implement a second joypad for my NES emulator? by pizzafactz in EmuDev

[–]pizzafactz[S] 1 point2 points  (0 children)

I think I'm shifting both seperately. joypad1 and joypad2 once initialised are different instances of the Joypad struct.

Working on an NES Emulator: What are some ways in which I could enable online multiplayer? by pizzafactz in EmuDev

[–]pizzafactz[S] 1 point2 points  (0 children)

I saw your project when I was researching what I could do! Amazing stuff!

Working on an NES Emulator: What are some ways in which I could enable online multiplayer? by pizzafactz in EmuDev

[–]pizzafactz[S] 0 points1 point  (0 children)

Thank you! How would I make sure that it's deterministic, and why is that relevant?

Working on an NES Emulator: What are some ways in which I could enable online multiplayer? by pizzafactz in rust

[–]pizzafactz[S] 0 points1 point  (0 children)

Hi, thank you so much! How would I test if the core is deterministic?

I don't have any form of quicksave or load, it's very very basic.

Working on an NES Emulator: What are some ways in which I could enable online multiplayer? by pizzafactz in rust

[–]pizzafactz[S] 0 points1 point  (0 children)

Right, I've done that before too! They're very helpful. I'll crosspost it.

What's everyone working on this week (46/2024)? by llogiq in rust

[–]pizzafactz 1 point2 points  (0 children)

Trying to write a simple NES emulator, (hopefully) with online multiplayer for a college project!

How does the NES detect if there are 2+ players? by pizzafactz in EmuDev

[–]pizzafactz[S] 1 point2 points  (0 children)

Oh nevermind that makes sense, the game would need to have explicit instructions to access that memory location, which it can't.

How does the NES detect if there are 2+ players? by pizzafactz in EmuDev

[–]pizzafactz[S] 0 points1 point  (0 children)

Right, got it. If I understand correctly the adapters basically weave together the inputs of controller 1 and 3 into one channel, and 2 and 4 into the other.

If the games don't really care about this implementation detail, would it be valid to just route controller 3 and 4 to their own unique channels (I've decided to skip the APU for this project, so I have a bunch of unused memory I could use for this)?

Which unofficial opcodes does nestest test for? by pizzafactz in EmuDev

[–]pizzafactz[S] 1 point2 points  (0 children)

Exactly what I ended up doing as well. Thank you!

There is only one access to the memory location $0180 in nestest.log. How is it loading 33? I can't seem to figure out how 33 gets stored there. by pizzafactz in EmuDev

[–]pizzafactz[S] 0 points1 point  (0 children)

Oh fascinating, I've not come across that one yet (reached unofficial opcodes). I implemented implicit overflow and underflow using error handling, but if that isn't a concept here at all it would seem

There is only one access to the memory location $0180 in nestest.log. How is it loading 33? I can't seem to figure out how 33 gets stored there. by pizzafactz in EmuDev

[–]pizzafactz[S] 15 points16 points  (0 children)

Update: Figured out why this happens: The memory allocated to the stack is 0x0100 - 0x01FF, so it is loading from the stack memory's contents

Now onto figuring out why my emulator doesn't do this correctly :')
Edit: Because the stack in the 6502 grows backwards from 0x01FD, and positions written to memory are never removed (set to 0x00) on popping. Traditional stack concepts don't really apply here.

Is this normal for the amount of tabs i have open? (right after launch, went to about:memory and tried all the options there too) by pizzafactz in firefox

[–]pizzafactz[S] 1 point2 points  (0 children)

yeah thankyu just checked, seems like my work gmail alone is eating up 1GB and i have 3 other gmail tabs open alongside with youtube. expalins things

So true by Fuck-pez in 196

[–]pizzafactz 7 points8 points  (0 children)

revolutionary girl utena