-
Notifications
You must be signed in to change notification settings - Fork 24
Fix scroll tracking during falls in climber #321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
38ebd0a
Fix scroll tracking during falls (#318)
jonathanpeppers 5700e83
Merge branch 'main' into fix/climber-scroll-during-fall
jonathanpeppers 0c37252
Merge remote-tracking branch 'origin/main' into fix/climber-scroll-du…
jonathanpeppers ffae489
Address review: remove duplicate player_screen_y assignment
jonathanpeppers File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| local outPath = "C:/src/dotnes" | ||
| local f = io.open(outPath .. "/climb_test.txt", "w") | ||
|
|
||
| emu.addEventCallback(function() | ||
| local fc = emu.getState()["ppu.frameCount"] | ||
|
|
||
| -- Climb up aggressively: alternate UP and A to find ladders and jump | ||
| if fc > 120 then | ||
| if fc % 30 < 15 then | ||
| emu.setInput(0, {up = true}) | ||
| else | ||
| emu.setInput(0, {a = true, right = true}) | ||
| end | ||
| end | ||
|
|
||
| -- Log state every 300 frames | ||
| if fc % 300 == 0 and fc > 0 then | ||
| local sp_lo = emu.read(0x22, emu.memType.nesInternalRam) | ||
| local sp_hi = emu.read(0x23, emu.memType.nesInternalRam) | ||
| local floor = emu.read(0x03C9, emu.memType.nesInternalRam) | ||
| local state = emu.read(0x03D1, emu.memType.nesInternalRam) | ||
| local pc = emu.getState()["cpu.pc"] | ||
| f:write(string.format("Frame %5d: floor=%d state=%d sp=$%02X%02X pc=$%04X\n", fc, floor, state, sp_hi, sp_lo, pc)) | ||
| end | ||
|
|
||
| if fc >= 18000 then | ||
| f:close() | ||
| emu.stop(0) | ||
| end | ||
| end, emu.eventType.endFrame) |
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| ------------------------------------------------------ | ||
| Loading rom: climber.nes | ||
| File CRC32: 0xEDEF0A85 | ||
| ------------------------------------------------------ | ||
| [DB] Initialized - 10655 games in DB | ||
| PRG CRC32: 0xD4C12182 | ||
| PRG+CHR CRC32: 0x13322F19 | ||
| [iNes] Mapper: 0 Sub: 0 | ||
| [iNes] PRG ROM: 32 KB | ||
| [iNes] CHR ROM: 8 KB | ||
| [iNes] Mirroring: Horizontal | ||
| [iNes] Battery: No | ||
| [DB] Game not found in database |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
src/dotnes.tests/TranspilerTests.Write.climber.verified.bin
Binary file not shown.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.