Skip to content

Commit

Permalink
software composite build
Browse files Browse the repository at this point in the history
  • Loading branch information
xrip committed Feb 27, 2024
1 parent 1977ecd commit b439325
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/tv-software/tv-software.c
Original file line number Diff line number Diff line change
Expand Up @@ -1014,7 +1014,7 @@ static bool __time_critical_func(video_timer_callbackTV)(repeating_timer_t* rt)
}
break;
case GRAPHICSMODE_DEFAULT: {
if (y < graphics_buffer.shift_y || y > graphics_buffer.height+graphics_buffer.shift_y) {
if (y < graphics_buffer.shift_y || y >= graphics_buffer.height+graphics_buffer.shift_y) {
for (int i = 0; i < video_mode.img_W - d_end; i++) {
uint32_t cout32 = conv_color[li][200];
uint8_t* c_4 = &cout32;
Expand Down
12 changes: 10 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,18 @@ static input_bits_t keyboard_bits = { false, false, false, false, false, false,
static input_bits_t gamepad1_bits = { false, false, false, false, false, false, false, false };
static input_bits_t gamepad2_bits = { false, false, false, false, false, false, false, false };

bool swap_ab = false;

void nespad_tick() {
nespad_read();

gamepad1_bits.a = (nespad_state & DPAD_A) != 0;
gamepad1_bits.b = (nespad_state & DPAD_B) != 0;
if (swap_ab) {
gamepad1_bits.a = (nespad_state & DPAD_A) != 0;
gamepad1_bits.b = (nespad_state & DPAD_B) != 0;
} else {
gamepad1_bits.b = (nespad_state & DPAD_A) != 0;
gamepad1_bits.a = (nespad_state & DPAD_B) != 0;
}
gamepad1_bits.select = (nespad_state & DPAD_SELECT) != 0;
gamepad1_bits.start = (nespad_state & DPAD_START) != 0;
gamepad1_bits.up = (nespad_state & DPAD_UP) != 0;
Expand Down Expand Up @@ -538,6 +545,7 @@ bool load() {


const MenuItem menu_items[] = {
{"Swap AB <> BA: %s", ARRAY, &swap_ab, nullptr, 1, {"NO ", "YES"}},
{"Frameskip: %s", ARRAY, &frameskip, nullptr, 1, {"YES", "NO "}},
//{ "Player 1: %s", ARRAY, &player_1_input, 2, { "Keyboard ", "Gamepad 1", "Gamepad 2" }},
//{ "Player 2: %s", ARRAY, &player_2_input, 2, { "Keyboard ", "Gamepad 1", "Gamepad 2" }},
Expand Down

0 comments on commit b439325

Please sign in to comment.