ejona86 / taus

Tetris - Actually Useful Statistics and other mods

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Garbage

user2222222222 opened this issue · comments

There seems to be an initialization issue with Garbage which Soljanka has mentioned in a prior issue.
My problem is that player two always (every time) starts with 0000 in the upper left corner of the playfield which lowers down the screen as blocks are cleared.
Most emulators don't seem to have this problem, but mine does and I can't change it.

However, I can duplicate the problem with FCEUX, so I thought someone might be interested or willing to take a look at it.

Start a 2P garbage game with FCEUS and pause. Open the Hex Editor to 0x0500 which is where player 2 playfield begins. Change the first four bytes at 0x0500 from EF EF EF EF to 00 00 00 00. Unpause the game and drop one block for player 2 to refresh the playfield and P2 will have four blue 0 blocks in the upper left. This is what I see every time I start a game.

The playfield should be initialized to EF, but for some reason, for me and Soljanka, it isn't every time. Do you have a great idea of how P2's field could be initialized correctly every time? Do you know where P1 is initialized? It looks like they might be back to back. If P1 is always being initialized correctly and it's just P2 with the problem, maybe the initialization loop could just be extended to continue into the P2 playfield.

It would be super cool to have this fixed. Thanks!

image

I spent a lot of time messing with it. It turns out it doesn't happen every time. It almost seemed random, but I kept messing with it till I figured it out. It happens whenever player 2 presses the start button. As long as P2 never presses start, everything is fine. And it only happens when P2 presses Start during gameplay. Now it still happens from the menu, because when P2 presses Start to begin, it's typically still being held after the playfield initializes. That's why it seemed random. So super quick button press to start is always ok because it's released before initialization. But if the main game loop sees Player 2 with Start pressed at any time, $0500 gets set to 00 00 00 00 somehow. And it can be done multiple times. For example, I can press start initially to get the 0000's, clear some lines to get it to lower, then P2 start button again to pause/unpause and drop a piece to refresh which creates another 0000 up in the corner.

I'd appreciate any thoughts. FCEUX doesn't write there when start is pressed: it could be an issue with the emulator. Maybe it's happening all the time, but it will naturally only manifest in the game loop. It doesn't make any sense, but I haven't looked at differences between P1 and P2 Start button logic. Maybe it would be easy to disable P2 Start during gameplay like what had to be done with Japan's Tetris 2?
https://www.romhacking.net/hacks/6906/

It's my emulator.