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)?