Skip to content

Commit

Permalink
fix (#36): Rename setting to square pixels. Choose between 8:7 DAR an…
Browse files Browse the repository at this point in the history
…d "4:3" (64:49) DAR
  • Loading branch information
agg23 committed Dec 11, 2022
1 parent c72026d commit d614379
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ BSX ROMs must be patched to run without BIOS. The BSX BIOS is not currently supp

### Video

* `Use 4:3 Video` - The internal resolution of the SNES is a 8:7 aspect ratio, which is much taller than the 4:3 CRTs that were used at the time. Some games are designed to be displayed at 8:7, and others at 4:3. The `Use 4:3 Video` option is provided to switch to a 4:3 aspect ratio.
* `Square Pixels` - The internal resolution of the SNES is a 8:7 pixel aspect ratio (wide pixels), which roughly corresponds to what users would see on 4:3 display aspect ratio CRTs. Some games are designed to be displayed at 8:7 PAR (the core's default), and others at 1:1 PAR (square pixels). The `Square Pixels` option is provided to switch to a 1:1 pixel aspect ratio
* `Pseudo Transparency` - Enable blending of adjacent pixels, used in some games to simulate transparency

### Turbo
Expand Down
2 changes: 1 addition & 1 deletion dist/Cores/agg23.SNES/core.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"description": "Super Nintendo and Super Famicom. Nintendo's second major home console",
"author": "agg23",
"url": "https://github.com/agg23/openfpga-snes",
"version": "0.4.1",
"version": "0.4.2",
"date_release": "2022-12-10"
},
"framework": {
Expand Down
6 changes: 3 additions & 3 deletions dist/Cores/agg23.SNES/interact.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"magic": "APF_VER_1",
"variables": [
{
"name": "Reset core",
"name": "Reset Core",
"id": 10,
"type": "action",
"enabled": true,
Expand Down Expand Up @@ -106,8 +106,8 @@
}
},
{
"name": "Use 4:3 video",
"id": 40,
"name": "Square Pixels",
"id": 42,
"type": "check",
"enabled": true,
"address": "0x200",
Expand Down
8 changes: 4 additions & 4 deletions dist/Cores/agg23.SNES/video.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
{
"width": 512,
"height": 224,
"aspect_w": 32,
"aspect_h": 21,
"aspect_w": 8,
"aspect_h": 7,
"rotation": 0,
"mirror": 0
},
Expand All @@ -29,8 +29,8 @@
{
"width": 512,
"height": 240,
"aspect_w": 64,
"aspect_h": 45,
"aspect_w": 16,
"aspect_h": 15,
"rotation": 0,
"mirror": 0
}
Expand Down
12 changes: 6 additions & 6 deletions src/fpga/core/core_top.sv
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ module core_top (
joystick_deadzone <= bridge_wr_data[7:0];
end
32'h200: begin
use_4_3_video <= bridge_wr_data[0];
use_square_pixels <= bridge_wr_data[0];
end
32'h204: begin
blend_enabled <= bridge_wr_data[0];
Expand Down Expand Up @@ -687,7 +687,7 @@ module core_top (
reg [7:0] joystick_deadzone;
reg mouse_enabled;

reg use_4_3_video = 0;
reg use_square_pixels = 0;
reg blend_enabled = 0;

// Settings sync
Expand All @@ -703,7 +703,7 @@ module core_top (
wire [7:0] joystick_deadzone_s;
wire mouse_enabled_s;

wire use_4_3_video_s;
wire use_square_pixels_s;
wire blend_enabled_s;

synch_3 #(
Expand All @@ -719,7 +719,7 @@ module core_top (
dpad_aim_speed,
joystick_deadzone,
mouse_enabled,
use_4_3_video,
use_square_pixels,
blend_enabled
},
{
Expand All @@ -732,7 +732,7 @@ module core_top (
dpad_aim_speed_s,
joystick_deadzone_s,
mouse_enabled_s,
use_4_3_video_s,
use_square_pixels_s,
blend_enabled_s
},
clk_sys_21_48
Expand Down Expand Up @@ -967,7 +967,7 @@ module core_top (

if (~de_out && prev_de) begin
// Write video slot
rgb <= {9'b0, ~latched_snap_index[0], use_4_3_video_s, 10'b0, 3'b0};
rgb <= {9'b0, ~latched_snap_index[0], use_square_pixels_s, 10'b0, 3'b0};
end else if (de_out) begin
de <= 1;
rgb <= rgb_out;
Expand Down

0 comments on commit d614379

Please sign in to comment.