Skip to content

Commit

Permalink
DMD: doc cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
vbousquet committed Oct 7, 2024
1 parent bd68f13 commit 390274f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/dmd.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The table below gives the main information (PWM FPS / Display FPS / PWM pattern)

| Name | PWM FPS / Disp.FPS | PWM pattern | Emulation comments |
|-------------------------------------------------------------|------------------------|-------------|----------------------------------------------------------------|
|[WPC](#wpc) | **122.1** / 40.7 | 3 frames | |
|[WPC](#wpc) | **122.1** / 40.7 | 2/3 frames | |
|[WPC Phantom Haus](#wpc) | 61.05 / 30.1 | 2 frames | |
|[Data East 128x16](#data-east-128x16) | 177.5 / **59.2** | 2u row | |
|[Data East 128x32](#data-east-128x32-segastern-whitestar) | 234.2 / **78.1** | 2u row | |
Expand Down
9 changes: 4 additions & 5 deletions src/wpc/wpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,10 +409,9 @@ MACHINE_DRIVER_START(wpc_95S)
MDRV_IMPORT_FROM(wmssnd_dcs2)
MACHINE_DRIVER_END

// The FIRQ line is wired to 3 sources:
// The FIRQ line is wired to 2 sources:
// - the WPC FIRQ output, which is triggered by its internal high res timer
// - the sound board FIRQ output
// - the programmable DMD FIRQ output (raise when a given row is reached, clear when the FIRS row is defined)
// - the programmable DMD FIRQ output (raised when a choosen row is reached, cleared when the FIRQ row is defined)
static void update_firq() {
cpu_set_irq_line(WPC_CPUNO, M6809_FIRQ_LINE, (wpclocals.wpcFIRQ | dmdlocals.firq) ? HOLD_LINE : CLEAR_LINE);
}
Expand Down Expand Up @@ -1572,15 +1571,15 @@ static VIDEO_START(wpc_dmd) {
// VBlank divider. All of this was deduced from the pre WPC-95 schematics.
// lucky1 measured on a real machine 122.1Hz which validates it.
//
// Most WPC games uses a 3 frame PWM pattern to create 0/33/66/100 shades.
// WPC games uses either a 2 or 3 frame PWM pattern to create 0/50/100 or 0/33/66/100 shades.
// For Phantom Haus, the DMD is bigger with 64 rows instead of 32, therefore
// the rasterizer timings are 2MHz / (128*64*2*2) = 61.04Hz. The PWM pattern
// used is therefore limited to 2 frames (30.5Hz) with 0/50/100 shades to avoid
// flickering.
//
// CPU may ask the DMD board to raise FIRQ when a given row is reached.
// The FIRQ is then acked (pulled down) by writing again the requested FIRQ row
// to the corresponding register (if >31, it disables DMD FIRQ).
// to the corresponding register (game code use 0xFF to disables DMD FIRQ).
static void wpc_dmd_hsync(int param) {
dmdlocals.row = (dmdlocals.row + 1) % dmdlocals.pwm_state.height; // FIXME Phantom Haus uses the same AV card than other WPC95 but with a 64 row display, therefore the CPU must tell the rasterizer that it is 64 row high somewhere we don't know
if (dmdlocals.row == 0) { // VSYNC
Expand Down

0 comments on commit 390274f

Please sign in to comment.