Skip to content
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

[Logic] Cheats | APU enhancement | BSRAM save/load - PAL - 1:1/8:7 aspect ratio support #88

Open
wants to merge 46 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
60f6f98
[Cheats] Rebase from last origin/ to latest master
fjpolo Jun 5, 2024
e6df743
[Cheats] Firmware takes care of cheat number
fjpolo Jun 5, 2024
61a7419
[Cheats] Scale up to 4 cheats. Seems scalable, with some more logic i…
fjpolo Jun 5, 2024
50514b7
[Cheats] Update cheats.md
fjpolo Jun 5, 2024
e017e8d
[Cheats] Fix possible bug 🐛
fjpolo Jun 5, 2024
e863e36
[Cheats] Fix Slave Formal Verification
fjpolo Jun 5, 2024
70a8e42
[Cheats] Remove unnecessary assume()
fjpolo Jun 6, 2024
c8090a4
Merge branch 'fjpolo/wbCheats' into fjpolo/development
fjpolo Jun 15, 2024
81c3845
REbase branch
fjpolo Jun 23, 2024
c80e91f
Remove firmware/
fjpolo Jun 23, 2024
4584c4d
- Fix bug
fjpolo Jun 23, 2024
dcf4ed3
Merge branch 'fjpolo/APUEnhancement' into fjpolo/development
fjpolo Jun 23, 2024
dc116ff
- Fix project files
fjpolo Jun 24, 2024
00ad11b
Fix VRC6 Sawtooth saturation
fjpolo Jun 24, 2024
c59a188
Finally fix TriangleChan_enhanced!!!!!
fjpolo Jun 25, 2024
300d748
🐛: Fix volume bug
fjpolo Jun 25, 2024
276635c
Update changelog
fjpolo Jun 25, 2024
af97c6b
Adjust volume levels
fjpolo Jun 25, 2024
7311833
Adjust Ch1's volume
fjpolo Jun 25, 2024
27bff9a
Merge branch 'fjpolo/APUEnhancement' into fjpolo/development
fjpolo Jun 25, 2024
1ed8999
Delete test/results.xml
fjpolo Jun 25, 2024
ceb0b4b
Delete test/sim_build/cmds.f
fjpolo Jun 25, 2024
89f7402
Delete test/sim_build/sim.vvp
fjpolo Jun 25, 2024
a23d0a4
Delete nestang_nano20k.gprj.user
fjpolo Jun 25, 2024
5349034
Merge branch 'fjpolo/APUEnhancement' into fjpolo/development
fjpolo Jun 25, 2024
2cf823d
Disable APU Enhancement for MMC3 (mapper4)
fjpolo Jul 2, 2024
c3cced0
Merge branch 'fjpolo/APUEnhancement' into fjpolo/development
fjpolo Jul 2, 2024
d3b325b
Disable APU Enhancement for Mapper69 (Batman return of the Joker) bec…
fjpolo Jul 2, 2024
9aa30fd
Merge branch 'fjpolo/APUEnhancement' into fjpolo/development
fjpolo Jul 2, 2024
81ee5aa
Add save_bsram register and logic
fjpolo Jul 1, 2024
f64cb75
Fix logic
fjpolo Jul 1, 2024
d7bbe69
Fix last commit
fjpolo Jul 1, 2024
12068ae
fix address
fjpolo Jul 2, 2024
fd08cd9
Intermediate commit
fjpolo Jul 8, 2024
e59d07a
Add PAL support
fjpolo Jul 8, 2024
c56710b
Support 1:1 and 8:7 aspect ratio
fjpolo Jul 8, 2024
31c429a
Merge branch 'fjpolo/HDMI_scale' into fjpolo/development
fjpolo Jul 8, 2024
2b76772
[Timer Interrrupts]
fjpolo Jul 13, 2024
ef6a33a
🐛🔧: mem_wdata was being save outside reg_bsram bounds
fjpolo Jul 13, 2024
fc7e45f
[BSRAM]
fjpolo Jul 18, 2024
b681cc5
[APU]
fjpolo Jul 31, 2024
e5b28ca
[APU]
fjpolo Jul 31, 2024
66d7e4f
[APU]
fjpolo Jul 31, 2024
d3c25f8
[APU]
fjpolo Jul 31, 2024
18edec8
[APU]
fjpolo Jul 31, 2024
21e96d5
[APU]
fjpolo Sep 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changes

[25.06.2024]
- Add APU enhancement on top of cheat engine

[20.03.2024]
- Add CHANGELOG.md
- Set device in nestang_nano20k.gprj
Expand Down
35 changes: 35 additions & 0 deletions doc/cheats.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Cheat Wizard

## Format

This new module accepts `*.cwz` binary files with the following format:

- 128 bits (16 bytes) per cheat
- Four bytes correspond to compare enabled/disabled
- Next 4 bytes correspond to address
- Next 4 bytes correspond to compare value
- Next 4 bytes correspond to replace value

Example for `Battletoads.nes`

```
00000001 00000320 00000000 00000004
00000001 000023a2 000000d6 00000024
00000001 000026b5 00000001 00000000
00000001 00004fba 00000008 0000002f
...
```

You'll need to use a hex editor to create the file.

## How to use

# Enable cheats

Navigate to `2)Options->Cheats->Cheats Enabled:` and press `A` to enable or disable.

## Load a cheat file

Navigate to `2)Options->Cheats->Load cheat file` and press `A` to open the file explorer view. Choose the `.cwz` file for your game and press `A`, you'll see the message `Cheats loaded!` if the file was correctly loaded.

After enabling cheats and loading them, you can load a `ROM` and cheats will be applied.
Binary file added doc/images/wishbone_b4_piplined_singleAccess.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions doc/wishbone.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Pipelined Wishbone B4 Bus

## About

- `iosys` is wishbone master
- No `FIFO` implemented
- No arbiter implemented
- 128bit wide bus for `cheat_wizard`

- Slaves
- `wishbone_slaves.sh`

## Read

<img src="images/wishbone_b4_piplined_singleReadCycle.JPG" width=400>

## Write

<img src="images/wishbone_b4_piplined_singleWriteCycle.JPG" width=400>

## References

- [Wishbone bus](https://en.wikipedia.org/wiki/Wishbone_(computer_bus))
- [Wishbone B4 Specifications](https://cdn.opencores.org/downloads/wbspec_b4.pdf)
- [zipcpu](https://zipcpu.com/)
- [Building a simple bus](https://zipcpu.com/zipcpu/2017/05/23/simplebus.html)
- [Building a Simple Wishbone Master](https://zipcpu.com/blog/2017/06/08/simple-wb-master.html)
- [Building a Simple Wishbone Slave](https://zipcpu.com/zipcpu/2017/05/29/simple-wishbone.html)
- [Building Formal Assumptions to Describe Wishbone Behaviour](https://zipcpu.com/zipcpu/2017/11/07/wb-formal.html)
- [Building a very simple wishbone interconnect](https://zipcpu.com/blog/2017/06/22/simple-wb-interconnect.html)
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
NESTang - an FPGA NES implemented with Tang Nano 20K, Primer 25K

What's new in v0.11:

- Add a menu item to switch between snestang and nestang cores. Just put the .bin core files in /cores directory.

See installation.pdf for instructions, including how to wire the SNES/NES controllers.

Visit https://github.com/nand2mario/nestang for more instructions.
Binary file not shown.
Binary file not shown.
3 changes: 3 additions & 0 deletions nestang_nano20k.gprj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<File path="src/apu.v" type="file.verilog" enable="1"/>
<File path="src/autofire.v" type="file.verilog" enable="1"/>
<File path="src/cart.sv" type="file.verilog" enable="1"/>
<File path="src/cheat_wizard.v" type="file.verilog" enable="1"/>
<File path="src/compat.v" type="file.verilog" enable="1"/>
<File path="src/controller_ds2.sv" type="file.verilog" enable="1"/>
<File path="src/controller_snes.v" type="file.verilog" enable="1"/>
Expand Down Expand Up @@ -43,6 +44,7 @@
<File path="src/mappers/Namco.sv" type="file.verilog" enable="1"/>
<File path="src/mappers/Sachen.sv" type="file.verilog" enable="1"/>
<File path="src/mappers/Sunsoft.sv" type="file.verilog" enable="1"/>
<File path="src/mappers/VRC.sv" type="file.verilog" enable="1"/>
<File path="src/mappers/generic.sv" type="file.verilog" enable="1"/>
<File path="src/mappers/iir_filter.v" type="file.verilog" enable="1"/>
<File path="src/mappers/misc.sv" type="file.verilog" enable="1"/>
Expand All @@ -61,6 +63,7 @@
<File path="src/uart_tx_V2.v" type="file.verilog" enable="1"/>
<File path="src/usb_hid_host.v" type="file.verilog" enable="1"/>
<File path="src/usb_hid_host_rom.v" type="file.verilog" enable="1"/>
<File path="src/wishbone_slaves.vh" type="file.verilog" enable="1"/>
<File path="src/nano20k/nestang.cst" type="file.cst" enable="1"/>
<File path="src/nano20k/nestang.sdc" type="file.sdc" enable="1"/>
<File path="src/nes.gao" type="file.gao" enable="0"/>
Expand Down
9 changes: 9 additions & 0 deletions src/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
wishbone_slave/
wishbone_slave_bound/
wishbone_slave_prf/
wishbone_slave_cvr/

cheat_wizard/
cheat_wizard_bound/
cheat_wizard_prf/
cheat_wizard_cvr/
Loading