F11 Shortcut Key RGB / Composite for Tandy

* F11: CGA <-> HGC (PCXT) * RGB <-> Composite (Tandy)
This commit is contained in:
Aitor Gómez
2023-01-20 10:08:45 +01:00
parent c063a5635c
commit 1f8db74ec0
6 changed files with 26 additions and 25 deletions

20
PCXT.sv
View File

@@ -1424,7 +1424,7 @@ module emu
always_comb
begin
if (swap_video)
if (swap_video & ~tandy_mode)
HBlank_VGA = HBlank_del[color ? 12 : 13];
@@ -1571,14 +1571,14 @@ module emu
);
assign VGA_R_AUX = swap_video ? VGA_R_hgc : VGA_R_cga;
assign VGA_G_AUX = swap_video ? VGA_G_hgc : VGA_G_cga;
assign VGA_B_AUX = swap_video ? VGA_B_hgc : VGA_B_cga;
assign VGA_HS = swap_video ? VGA_HS_hgc : VGA_HS_cga;
assign VGA_VS = swap_video ? VGA_VS_hgc : VGA_VS_cga;
assign VGA_DE = swap_video ? VGA_DE_hgc : VGA_DE_cga;
assign gamma_bus = swap_video ? gamma_bus_hgc : gamma_bus_cga;
assign CE_PIXEL = swap_video ? CE_PIXEL_hgc : CE_PIXEL_cga;
assign VGA_R_AUX = swap_video & ~tandy_mode ? VGA_R_hgc : VGA_R_cga;
assign VGA_G_AUX = swap_video & ~tandy_mode ? VGA_G_hgc : VGA_G_cga;
assign VGA_B_AUX = swap_video & ~tandy_mode ? VGA_B_hgc : VGA_B_cga;
assign VGA_HS = swap_video & ~tandy_mode ? VGA_HS_hgc : VGA_HS_cga;
assign VGA_VS = swap_video & ~tandy_mode ? VGA_VS_hgc : VGA_VS_cga;
assign VGA_DE = swap_video & ~tandy_mode ? VGA_DE_hgc : VGA_DE_cga;
assign gamma_bus = swap_video & ~tandy_mode ? gamma_bus_hgc : gamma_bus_cga;
assign CE_PIXEL = swap_video & ~tandy_mode ? CE_PIXEL_hgc : CE_PIXEL_cga;
@@ -1674,7 +1674,7 @@ module emu
.rotate ( 2'd0 ),
.toggle ( 1'b0 ),
.fast_scroll( 1'b0 ),
.border ( swap_video ? 1'b0 : border_video_ff ),
.border ( swap_video & ~tandy_mode ? 1'b0 : border_video_ff ),
.vram_din ( 8'h0 ),
.vram_dout ( ),

View File

@@ -23,7 +23,8 @@ The [Graphics Gremlin project](https://github.com/schlae/graphics-gremlin) from
* Support for IBM Tandy 1000
* Support for IBM PCXT 5160 and clones (CGA graphics)
* Main memory 640Kb + 384Kb UMB memory
* Simultaneous video Hercules Graphics Card, F11 -> Swap Video Output (Only with PCXT model)
* Simulated Composite Video, F11 -> Swap Video Output with RGB for Tandy model
* Simultaneous video Hercules Graphics Card, F11 -> Swap Video Output with CGA for PCXT model
* Enable/Disable of CGA and Hercules I/O ports (Only with PCXT model)
* 1st Graphics Card selection from System & BIOS (Only with PCXT model)
* EMS memory up to 2Mb

View File

@@ -20,6 +20,6 @@
(MicroCoreLabs) (TubeTime)
F11: Swap Video Output HGC or CGA (Only PCXT model)
F11: CGA <-> HGC (PCXT) * RGB <-> Composite (Tandy)
F12: Pause & Credits Win + F12: Menu OSD

View File

@@ -217,7 +217,7 @@ module KFPS2KB #(
//
always_ff @(posedge clock, posedge reset) begin
if (reset) begin
swap_video <= video_output;
swap_video <= tandy_video ? 1'b0 : video_output;
irq <= 1'b0;
keycode <= 8'h00;
break_flag <= 1'b0;
@@ -252,8 +252,8 @@ module KFPS2KB #(
keycode <= 8'h00;
break_flag <= 1'b1;
end
else if (register == 8'h78 & ~tandy_video) begin
// F11 -> Swap video (CGA <-> Hercules)
else if (register == 8'h78) begin
// F11: CGA <-> Hercules (PCXT), RGB <-> Composite (Tandy)
irq <= 1'b0;
keycode <= 8'h00;
break_flag <= 1'b0;

View File

@@ -898,16 +898,16 @@ end
wire[3:0] video_cga;
wire video_hgc;
assign VGA_R = swap_video ? R_HGC : R_CGA;
assign VGA_G = swap_video ? G_HGC : G_CGA;
assign VGA_B = swap_video ? B_HGC : B_CGA;
assign VGA_HSYNC = swap_video ? HSYNC_HGC : HSYNC_CGA;
assign VGA_VSYNC = swap_video ? VSYNC_HGC : VSYNC_CGA;
assign VGA_R = swap_video & ~tandy_video ? R_HGC : R_CGA;
assign VGA_G = swap_video & ~tandy_video ? G_HGC : G_CGA;
assign VGA_B = swap_video & ~tandy_video ? B_HGC : B_CGA;
assign VGA_HSYNC = swap_video & ~tandy_video ? HSYNC_HGC : HSYNC_CGA;
assign VGA_VSYNC = swap_video & ~tandy_video ? VSYNC_HGC : VSYNC_CGA;
assign VGA_HBlank = swap_video ? HBLANK_HGC : HBLANK_CGA;
assign VGA_VBlank = swap_video ? VBLANK_HGC : VBLANK_CGA;
assign VGA_HBlank = swap_video & ~tandy_video ? HBLANK_HGC : HBLANK_CGA;
assign VGA_VBlank = swap_video & ~tandy_video ? VBLANK_HGC : VBLANK_CGA;
assign de_o = swap_video ? de_o_hgc : de_o_cga;
assign de_o = swap_video & ~tandy_video ? de_o_hgc : de_o_cga;
wire HGC_VRAM_ENABLE;
wire [18:0] HGC_VRAM_ADDR;
@@ -1002,7 +1002,7 @@ end
.clkdiv(clkdiv),
.video(video_cga),
.hsync(VGA_HSYNC),
.composite(composite),
.composite(tandy_video ? swap_video ? ~composite : composite : composite),
.red(R_CGA),
.green(G_CGA),
.blue(B_CGA)

File diff suppressed because one or more lines are too long