Skip to content

Conversation

@PastorL69
Copy link
Member

@PastorL69 PastorL69 commented Nov 3, 2025

Logic is nearly identical to whitestar, except the beginning of a frame detection is different. Looking at the signals there was no clear way to identify the start of a frame. It seems that they fixed this for Whitestar, where ROWDATA clearly shows the beginning of a frame. Unfortunately not the case with DE/Sega.

Display Enable is now used to detect the beginning of a frame instead, but that is measured through checking the length of the GPIO being low.

src/dmd_reader.c Outdated

lcd_width = 128;
lcd_height = 32;
lcd_bitsperpixel = 4; // data east sega is 2bpp
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

must be 2

src/dmd_reader.c Outdated
dmd_pio = pio0;
offset = pio_add_program(dmd_pio, &dmd_reader_desega_program);
dmd_sm = pio_claim_unused_sm(dmd_pio, true);
dmd_reader_whitestar_program_init(dmd_pio, dmd_sm, offset);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dmd_reader_desega_program_init

wait 0 gpio DOTCLK ; falling edge
wait 1 gpio DOTCLK ; raising edge
in null 2 ; padding
;in null 2 ; padding
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this line

in null 2 ; padding
;in null 2 ; padding
in pins 1 ; read pin data
in null 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment "right padding"

wait 0 gpio DOTCLK ; falling edge
wait 1 gpio DOTCLK ; raising edge
in null 3 ; padding
in null 1 ; padding
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment "left padding"

dotloop1:
wait 0 gpio DOTCLK ; falling edge
wait 1 gpio DOTCLK ; raising edge
in null 2 ; padding
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this line

wait 1 gpio DOTCLK ; raising edge
in null 2 ; padding
in pins 1 ; read pin data
in null 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment "right padding"

dotloop2:
wait 0 gpio DOTCLK ; falling edge
wait 1 gpio DOTCLK ; raising edge
in null 3 ; padding
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in null 1. ; left padding

lcd_planesperframe = 2; // in Whitestar, there's a MSB and a LSB plane
lcd_lineoversampling = LINEOVERSAMPLING_WHITESTAR; // in Whitestar each line is sent twice
lcd_mergeplanes = MERGEPLANES_ADDSHIFT; // required for correct 2bpp merge
//lcd_mergeplanes = MERGEPLANES_ADDSHIFT; // required for correct 2bpp merge
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is that removed?

@mkalkbrenner mkalkbrenner merged commit 541c3c4 into PPUC:ppuc Nov 4, 2025
3 checks passed
@PastorL69 PastorL69 deleted the DESega branch November 6, 2025 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants