Skip to content

Commit

Permalink
DMD: generic PWM support, Data East 128x32 support, Alvin G support, …
Browse files Browse the repository at this point in the history
…GTS3 & WPC cleanups,
  • Loading branch information
vbousquet committed Sep 1, 2024
1 parent a90b566 commit 5449df7
Show file tree
Hide file tree
Showing 19 changed files with 498 additions and 487 deletions.
10 changes: 10 additions & 0 deletions src/vidhrdw/crtc6845.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,17 @@ int crtc6845_start_address_r(int offset)
{
return crtc6845[offset].start_addr;
}
//Return rasterization size
int crtc6845_get_rasterized_height(int offset)
{
// height in scanlines is the number of displayed character line * number of scanlines per character
return crtc6845[offset].vert_disp * (crtc6845[offset].max_ras_addr + 1);
}

int crtc6845_get_rasterized_width(int offset)
{
return crtc6845[offset].horiz_disp;
}



Expand Down
4 changes: 4 additions & 0 deletions src/vidhrdw/crtc6845.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ WRITE_HANDLER( crtc6845_register_w );
//Return current video start address
int crtc6845_start_address_r(int offset);

//Return rasterization size
int crtc6845_get_rasterized_height(int offset);
int crtc6845_get_rasterized_width(int offset);

/*Convenience handlers*/
READ_HANDLER( crtc6845_register_0_r );
WRITE_HANDLER( crtc6845_address_0_w );
Expand Down
6 changes: 3 additions & 3 deletions src/wpc/alvg.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ void UpdateLampCol(void) {
Second, it writes the lamp column data first, then the lamp data itself.
The other games write the lamp data first, then the lamp column data. - */
WRITE_HANDLER(u14_porta_w) {
if (core_gameData->hw.gameSpecific1)
if (core_gameData->hw.gameSpecific1 == 1)
alvglocals.lampColumn = (alvglocals.lampColumn&0x0f01) | ((data & 0x7f)<<1);
else {
alvglocals.lampColumn = (alvglocals.lampColumn&0x0f80) | (data & 0x7f);
Expand All @@ -403,7 +403,7 @@ WRITE_HANDLER(u14_porta_w) {
//printf("LAMP STROBE(1-7): data = %x\n",data&0x7f);
}
WRITE_HANDLER(u14_portb_w) {
if (core_gameData->hw.gameSpecific1)
if (core_gameData->hw.gameSpecific1 == 1)
alvglocals.lampColumn = (alvglocals.lampColumn&0x00fe) | ((data & 0x0f)<<8) | ((data & 0x10)>>4);
else {
alvglocals.lampColumn = (alvglocals.lampColumn&0x007f) | ((data & 0x1f)<<7);
Expand All @@ -413,7 +413,7 @@ WRITE_HANDLER(u14_portb_w) {
}
WRITE_HANDLER(u14_portc_w) {
alvglocals.lampRow = data;
if (core_gameData->hw.gameSpecific1)
if (core_gameData->hw.gameSpecific1 == 1)
UpdateLampCol();
//printf("LAMP RETURN: data = %x\n",data);
}
Expand Down
Loading

0 comments on commit 5449df7

Please sign in to comment.