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

Add Feature - BSX Loading #89

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 10 additions & 1 deletion dist/Cores/agg23.SNES/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"data": {
"magic": "APF_VER_1",
"data_slots": [
{
{
"name": "Cartridge",
"id": 0,
"required": true,
Expand All @@ -19,7 +19,16 @@
"extensions": ["sav", "srm"],
"address": "0x20000000",
"size_maximum": "0x20000"
},
{
"name": "Bios",
"id": 1,
"required": true,
"filename": "bios.rom",
"extensions": ["rom"],
"address": "0x10000000"
}

]
}
}
11 changes: 11 additions & 0 deletions dist/Cores/agg23.SNES/interact.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,17 @@
"writeonly": true,
"defaultval": 0,
"value": 1
},
{
"name": "SuperFX Fastrom",
"id": 17,
"type": "check",
"enabled": true,
"address": "0x88",
"persist": true,
"writeonly": true,
"defaultval": 1,
"value": 1
},
{
"name": "Use Multitap",
Expand Down
3 changes: 2 additions & 1 deletion src/fpga/ap_core.qsf
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,7 @@ set_global_assignment -name SYSTEMVERILOG_FILE core/rtl/mister_top/sync_fifo.sv
set_global_assignment -name MIF_FILE core/rtl/chip/DSP/dsp11b23410_p.mif
set_global_assignment -name MIF_FILE core/rtl/chip/DSP/dsp11b23410_d.mif
set_global_assignment -name MIF_FILE core/rtl/chip/CX4/drom.mif
set_global_assignment -name MIF_FILE core/rtl/chip/BSX/bsx121-124.mif
set_global_assignment -name SYSTEMVERILOG_FILE core/rtl/mister_top/sound_i2s.sv
set_global_assignment -name SYSTEMVERILOG_FILE core/rtl/mister_top/rom_parser.sv
set_global_assignment -name SYSTEMVERILOG_FILE core/rtl/mister_top/data_unloader.sv
Expand Down Expand Up @@ -792,4 +793,4 @@ set_global_assignment -name QIP_FILE core/mf_pllbase_pal.qip
set_global_assignment -name SIP_FILE core/mf_pllbase_pal.sip
set_parameter -name PAL_PLL '0 -entity core_top
set_global_assignment -name SLD_FILE db/stp1_auto_stripped.stp
set_instance_assignment -name PARTITION_HIERARCHY root_partition -to | -section_id Top
set_instance_assignment -name PARTITION_HIERARCHY root_partition -to | -section_id Top
10 changes: 9 additions & 1 deletion src/fpga/core/core_top.sv
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,9 @@ module core_top (
end
32'h84: begin
gsu_turbo_enabled <= bridge_wr_data[0];
end
32'h88: begin
gsu_fastrom_enabled <= bridge_wr_data[0];
end
32'h100: begin
multitap_enabled <= bridge_wr_data[0];
Expand Down Expand Up @@ -679,6 +682,7 @@ module core_top (

reg cpu_turbo_enabled = 0;
reg gsu_turbo_enabled = 0;
reg gsu_fastrom_enabled = 1;

reg multitap_enabled = 0;
reg lightgun_enabled = 0;
Expand All @@ -695,6 +699,7 @@ module core_top (

wire cpu_turbo_enabled_s;
wire gsu_turbo_enabled_s;
wire gsu_fastrom_enabled_s;

wire multitap_enabled_s;
wire lightgun_enabled_s;
Expand All @@ -707,12 +712,13 @@ module core_top (
wire blend_enabled_s;

synch_3 #(
.WIDTH(25)
.WIDTH(26)
) settings_s (
{
reset_button,
cpu_turbo_enabled,
gsu_turbo_enabled,
gsu_fastrom_enabled,
multitap_enabled,
lightgun_enabled,
lightgun_type,
Expand All @@ -726,6 +732,7 @@ module core_top (
reset_button_s,
cpu_turbo_enabled_s,
gsu_turbo_enabled_s,
gsu_fastrom_enabled_s,
multitap_enabled_s,
lightgun_enabled_s,
lightgun_type_s,
Expand Down Expand Up @@ -771,6 +778,7 @@ module core_top (
// Settings
.cpu_turbo_enabled(cpu_turbo_enabled_s),
.gsu_turbo_enabled(gsu_turbo_enabled_s),
.gsu_fastrom_enabled(gsu_fastrom_enabled_s),

.multitap_enabled(multitap_enabled_s),
.lightgun_enabled(lightgun_enabled_s),
Expand Down
4 changes: 1 addition & 3 deletions src/fpga/core/rtl/65C816/AddrGen.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,7 @@ begin
end if;
end process;

InnerDS <= S when ABSCtrl = "11" and (AALCtrl(2) = '1' or AAHCtrl(2) = '1') else
D when e6502 = '0' else
D(15 downto 8) & x"00";
InnerDS <= S when ABSCtrl = "11" and (AALCtrl(2) = '1' or AAHCtrl(2) = '1') else D;

NewDL <= std_logic_vector(unsigned("0" & InnerDS(7 downto 0)) + unsigned("0" & D_IN));
NewAAHWithCarry <= std_logic_vector(unsigned(NewAAH) + ("00000000"&SavedCarry));
Expand Down
4,102 changes: 2,051 additions & 2,051 deletions src/fpga/core/rtl/65C816/MCode.vhd

Large diffs are not rendered by default.

7 changes: 2 additions & 5 deletions src/fpga/core/rtl/65C816/P65816_pkg.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package P65816_pkg is

type MicroInst_r is record
stateCtrl : std_logic_vector(2 downto 0);
addrBus : std_logic_vector(2 downto 0);
addrBus : std_logic_vector(3 downto 0);
addrInc : std_logic_vector(1 downto 0);
loadP : std_logic_vector(2 downto 0);
loadT : std_logic_vector(1 downto 0);
Expand All @@ -33,7 +33,7 @@ package P65816_pkg is
type MCode_r is record
ALU_CTRL : ALUCtrl_r;
STATE_CTRL : std_logic_vector(2 downto 0);
ADDR_BUS : std_logic_vector(2 downto 0);
ADDR_BUS : std_logic_vector(3 downto 0);
ADDR_INC : std_logic_vector(1 downto 0);
IND_CTRL : std_logic_vector(1 downto 0);
ADDR_CTRL : std_logic_vector(7 downto 0);
Expand All @@ -49,9 +49,6 @@ package P65816_pkg is
VA : std_logic_vector(1 downto 0);
end record;

type addrIncTab_t is array(0 to 3) of unsigned(15 downto 0);
constant INC_TAB: addrIncTab_t := (x"0000", x"0001", x"0002", x"0003");

end P65816_pkg;

package body P65816_pkg is
Expand Down
Loading