Author SHA1 Message Date
José Manuel Barroso Galindo e58c44e93c Merge e433c8d2c3 into a3373d34b9 2024-04-01 20:22:31 -07:00
shodge12 a3373d34b9 First working csave version...
Note output files do not expand.  Therefore you need a large output file before you select it, turn on record and save.
2024-03-24 17:19:52 -04:00
shodge12 06e91ee2ae Initial Baseline for feature Cassette Write
Fix 1 bit time...
2024-03-23 00:25:55 -04:00
shodge12 f940be1a2b Release 20240318
1. Changed PIA 2 addressing to align with real CoCo3 hardware and end at FF2F.
2. Re-arranged MiSTer drive LUNs to support future auto-boot from SDC drive 0.
3. Added 'Auto Run' feature. You must use slot 2 [SDC]. Take your floopy or HD
   and copy it to a file name of 'boot.vhd'. This will be auto mounted to drive 0
   on the SDC. In the menu, find a new item Auto Run:. It can be set to No, DOS or
   AUTO.BAS. Choosing dos causes the 'DOS' command to be executed on power up. Setting
   the option to 'AUTO.BAS' will cause a 'RUN"AUTO' command to be executed upon powerup.
   Save your settings to cause the changes to be remembered. The Auto Run system re-arms
   upon using the 'Cold Boot' menu item.
4.	Fixed MiSTer / CoCo3 interface preventing the joysticks ever reaching the
	max value of 63. Specifically '>' was changed to '>=' the DTOA values.
	This fixes DonPan and is verified in Diagnostics 2.0.
5.	HiRES[3] is used to enable some of the higher resolution graphics modes
	Gary Becker designed into CoCo3FPGA, and while these are not fully
	supported, the control signals such as HiRES[3] at $FF98 bit 6 affectt
	the graphics engine.  For some reason Color File II manipultes this bit
	and was causing it not to work.  This change requires the SG6 extensions
	to be enabled to set HiRES[3].  So specifically in the Video Settings
	insure CoCo3 LC is set to Yes.  Color File II now works properly.
2024-03-18 18:22:32 -04:00
shodge12 f93784660c Fix PIA2 adrs, added Auto Run
1.	Changed PIA 2 addressing to align with real CoCo3 hardware and end at FF2F.
2.	Removal of 16 bit sound extentions as they overlap speach / sound cart.  This is
	accompanied by a rework of the sound mixing to be more correct.
3.	Re-arranged MiSTer drive LUNs to support future auto-boot from SDC drive 0
4.	Added 'Auto Run' feature.  You must use slot 2 [SDC].  Take your floopy or HD
	and copy it to a file name of 'boot.vhd'.  This will be auto mounted to drive 0
	on the SDC.  In the menu, find a new item Auto Run:.  It can be set to No, DOS or
	AUTO.BAS.  Choosing dos causes the 'DOS' command to be executed on power up.  Setting
	the option to 'AUTO.BAS' will cause a 'RUN"AUTO' command to be executed upon powerup.
	Save your settings to cause the changes to be remembered.  The Auto Run system re-arms
	upon using the 'Cold Boot' menu item.

To Do...
1.	Add Speech / Music cart
2.	Fix Color File II
3.	Fic Castle of Tharoggad
2024-02-16 22:27:15 -05:00
shodge12 49a8aee74d Release 20240205
1.	For cycle accurate 6809, changed PH2 to cpu_cycle_ena. (Improve timing of control register writes)
2.	Changed PIA(s) addressing to allow complete mirror through FF00-FF3F
3.	Corrected usage of SG6 enable (SW5 in orig code) which allows the usage of SG6.  Formerly it was used to
    enable artifacts.  That is no longer true.  For most compatibility it has be relabeled 'CoCo3 LC',
	and it default setting is Yes which is fully compatible with the CoCo3. [setting no allows SG6 mode].
	For some OS9 software this must be set to 'Yes' which is the default.
4.	Added 'Artifact Type' menu in 'Video Settings' menu.  Settings are 'MESS', 'Simple', and 'NONE'.  'MESS'
	is the default and has improved fidelity over 'Simple' which was previously implemented in connection
	with SW5 [see above].  Again, the default should be used.  The artifact emulation can be turned off
	by setting the option to 'NONE'.  The 'Artifact Color Set' choice is only valid for 'MESS' and 'Simple'
	artifact settings.
2024-02-05 21:37:20 -05:00
shodge12 54420d958f Clean up...
Fixed minor change to MESS artifact function. Fixed full color bus not being driven.  Updated docs.  Updated changes.txt.  SDC size return constant changed to $404040.  Cleaned up Video Settings menu and defaults.
2024-02-05 00:42:34 -05:00
shodge12 44ffb00fb2 Added MESS artifacts along with selection
Added working MESS and artifact control.  Updated documentation and menu's although more menu work is needed.
2024-02-04 01:07:32 -05:00
shodge12 115fccc535 Artifact selection now working.
Artifacts=NONE - Works
Artifacts=Simple - Works
Artifacts=MESS - Not so much...
2024-01-29 23:53:14 -05:00
shodge12 fdb2eb533a Multiple Artifact test...
Added new switches 'art' to control artifacts.
2024-01-29 10:55:00 -05:00
shodge12 f20b0295cc First test version....
Bad results....
2024-01-28 14:26:04 -05:00
shodge12 be6069e7a2 Update pll_q17.qip
Fixed incorrect PLL_CFG.QIP entry.  This has been renamed.
2024-01-28 00:48:11 -05:00
shodge12 49428a29a7 Framework Update 1/27/24
Updated framework and tested.
COCO3_Comp spreadsheet added.
2024-01-27 01:10:55 -05:00
26 changed files with 7439 additions and 835 deletions

No files matched your search

BIN
View File
Binary file not shown.
+120 -7
View File
@@ -28,7 +28,6 @@ set_global_assignment -name TIMEQUEST_MULTICORNER_ANALYSIS OFF
set_global_assignment -name OPTIMIZE_POWER_DURING_FITTING OFF
set_global_assignment -name FINAL_PLACEMENT_OPTIMIZATION ALWAYS
set_global_assignment -name FITTER_EFFORT "STANDARD FIT"
set_global_assignment -name OPTIMIZATION_MODE "AGGRESSIVE PERFORMANCE"
set_global_assignment -name ALLOW_POWER_UP_DONT_CARE ON
set_global_assignment -name QII_AUTO_PACKED_REGISTERS NORMAL
set_global_assignment -name ROUTER_LCELL_INSERTION_AND_LOGIC_DUPLICATION ON
@@ -297,8 +296,6 @@ set_global_assignment -name VERILOG_FILE rtl/UART_6551/6551tx.v
set_global_assignment -name VERILOG_FILE rtl/UART_6551/6551rx.v
set_global_assignment -name VHDL_FILE rtl/CPU09/cpu09l_128a.vhd
set_global_assignment -name SYSTEMVERILOG_FILE rtl/coco3fpga.sv
set_global_assignment -name VERILOG_FILE rtl/pll.v
set_global_assignment -name VERILOG_FILE rtl/pll/pll_0002.v
set_global_assignment -name VERILOG_FILE rtl/cassette.v
set_global_assignment -name VERILOG_FILE rtl/rtc.sv
set_global_assignment -name VERILOG_FILE rtl/AMW.v
@@ -319,8 +316,6 @@ set_global_assignment -name VHDL_FILE rtl/rom/coco_rom_8K.vhd
set_global_assignment -name VHDL_FILE rtl/rom/coco_rom_16.vhd
set_global_assignment -name SDC_FILE rtl/CoCo3FPGA.sdc
set_global_assignment -name ENABLE_SIGNALTAP ON
set_global_assignment -name USE_SIGNALTAP_FILE Vsync.stp
set_global_assignment -name SIGNALTAP_FILE Video_Explorer.stp
set_global_assignment -name SIGNALTAP_FILE rom_Exploror.stp1
set_global_assignment -name SOURCE_FILE rom_Exploror.stp1
@@ -329,8 +324,126 @@ set_global_assignment -name SIGNALTAP_FILE AMW.stp
set_global_assignment -name SIGNALTAP_FILE HD.stp
set_global_assignment -name SIGNALTAP_FILE reset.stp
set_global_assignment -name SIGNALTAP_FILE Vsync.stp
set_global_assignment -name ENABLE_SIGNALTAP OFF
set_global_assignment -name ENABLE_SIGNALTAP ON
set_global_assignment -name OPTIMIZATION_MODE "HIGH PERFORMANCE EFFORT"
set_global_assignment -name USE_SIGNALTAP_FILE Video_Explorer.stp
set_global_assignment -name USE_SIGNALTAP_FILE Video_Explorer2.stp
set_global_assignment -name VERILOG_FILE rtl/mc6809glb/mc6809glb.v
set_global_assignment -name SIGNALTAP_FILE Video_Explorer2.stp
set_global_assignment -name SLD_NODE_CREATOR_ID 110 -section_id auto_signaltap_0
set_global_assignment -name SLD_NODE_ENTITY_NAME sld_signaltap -section_id auto_signaltap_0
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_RAM_BLOCK_TYPE=AUTO" -section_id auto_signaltap_0
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_NODE_INFO=805334528" -section_id auto_signaltap_0
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_POWER_UP_TRIGGER=0" -section_id auto_signaltap_0
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_STORAGE_QUALIFIER_INVERSION_MASK_LENGTH=0" -section_id auto_signaltap_0
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_ATTRIBUTE_MEM_MODE=OFF" -section_id auto_signaltap_0
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_STATE_FLOW_USE_GENERATED=0" -section_id auto_signaltap_0
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_STATE_BITS=11" -section_id auto_signaltap_0
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_BUFFER_FULL_STOP=1" -section_id auto_signaltap_0
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_CURRENT_RESOURCE_WIDTH=1" -section_id auto_signaltap_0
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_INCREMENTAL_ROUTING=1" -section_id auto_signaltap_0
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[0] -to auto_signaltap_0|gnd -section_id auto_signaltap_0
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[3] -to auto_signaltap_0|gnd -section_id auto_signaltap_0
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[5] -to auto_signaltap_0|vcc -section_id auto_signaltap_0
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[16] -to auto_signaltap_0|vcc -section_id auto_signaltap_0
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[28] -to auto_signaltap_0|vcc -section_id auto_signaltap_0
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[31] -to auto_signaltap_0|gnd -section_id auto_signaltap_0
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_TRIGGER_LEVEL=3" -section_id auto_signaltap_0
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_TRIGGER_IN_ENABLED=0" -section_id auto_signaltap_0
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_TRIGGER_PIPELINE=0" -section_id auto_signaltap_0
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_COUNTER_PIPELINE=0" -section_id auto_signaltap_0
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_ADVANCED_TRIGGER_ENTITY=basic,1,basic,1,basic,1," -section_id auto_signaltap_0
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_TRIGGER_LEVEL_PIPELINE=1" -section_id auto_signaltap_0
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_ENABLE_ADVANCED_TRIGGER=0" -section_id auto_signaltap_0
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[2] -to auto_signaltap_0|gnd -section_id auto_signaltap_0
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[21] -to auto_signaltap_0|gnd -section_id auto_signaltap_0
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[22] -to auto_signaltap_0|gnd -section_id auto_signaltap_0
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[30] -to auto_signaltap_0|gnd -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_clk -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|clk_sample" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[0] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|CASS_REWIND_RECORD" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[0] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|CASS_REWIND_RECORD" -section_id auto_signaltap_0
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[6] -to auto_signaltap_0|vcc -section_id auto_signaltap_0
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[12] -to auto_signaltap_0|gnd -section_id auto_signaltap_0
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[17] -to auto_signaltap_0|gnd -section_id auto_signaltap_0
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[18] -to auto_signaltap_0|gnd -section_id auto_signaltap_0
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_RAM_PIPELINE=1" -section_id auto_signaltap_0
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_SEGMENT_SIZE=2048" -section_id auto_signaltap_0
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[13] -to auto_signaltap_0|vcc -section_id auto_signaltap_0
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[19] -to auto_signaltap_0|vcc -section_id auto_signaltap_0
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_SAMPLE_DEPTH=2048" -section_id auto_signaltap_0
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[8] -to auto_signaltap_0|gnd -section_id auto_signaltap_0
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[25] -to auto_signaltap_0|vcc -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[1] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|MOTOR_ON" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[2] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[0]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[3] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[1]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[4] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[2]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[5] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[3]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[6] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[4]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[7] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[5]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[8] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[6]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[9] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[7]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[10] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[0]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[11] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[1]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[12] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[2]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[13] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[3]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[14] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[4]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[15] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[5]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[16] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[6]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[17] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[7]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[18] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[8]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[19] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[0]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[20] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[1]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[21] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[2]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[22] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[3]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[23] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[4]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[24] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[5]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[25] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[6]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[26] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[7]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_trigger_in[27] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|look_for_sync" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[1] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|MOTOR_ON" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[2] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[0]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[3] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[1]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[4] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[2]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[5] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[3]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[6] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[4]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[7] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[5]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[8] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[6]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[9] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[7]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[10] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[0]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[11] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[1]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[12] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[2]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[13] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[3]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[14] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[4]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[15] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[5]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[16] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[6]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[17] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[7]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[18] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[8]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[19] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[0]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[20] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[1]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[21] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[2]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[22] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[3]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[23] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[4]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[24] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[5]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[25] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[6]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[26] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[7]" -section_id auto_signaltap_0
set_instance_assignment -name CONNECT_TO_SLD_NODE_ENTITY_PORT acq_data_in[27] -to "emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|look_for_sync" -section_id auto_signaltap_0
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_DATA_BITS=28" -section_id auto_signaltap_0
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_TRIGGER_BITS=28" -section_id auto_signaltap_0
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_STORAGE_QUALIFIER_BITS=28" -section_id auto_signaltap_0
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_INVERSION_MASK=0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" -section_id auto_signaltap_0
set_global_assignment -name SLD_NODE_PARAMETER_ASSIGNMENT "SLD_INVERSION_MASK_LENGTH=277" -section_id auto_signaltap_0
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[1] -to auto_signaltap_0|gnd -section_id auto_signaltap_0
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[4] -to auto_signaltap_0|vcc -section_id auto_signaltap_0
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[7] -to auto_signaltap_0|vcc -section_id auto_signaltap_0
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[9] -to auto_signaltap_0|vcc -section_id auto_signaltap_0
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[10] -to auto_signaltap_0|vcc -section_id auto_signaltap_0
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[11] -to auto_signaltap_0|gnd -section_id auto_signaltap_0
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[14] -to auto_signaltap_0|gnd -section_id auto_signaltap_0
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[15] -to auto_signaltap_0|vcc -section_id auto_signaltap_0
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[20] -to auto_signaltap_0|vcc -section_id auto_signaltap_0
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[23] -to auto_signaltap_0|vcc -section_id auto_signaltap_0
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[24] -to auto_signaltap_0|vcc -section_id auto_signaltap_0
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[26] -to auto_signaltap_0|gnd -section_id auto_signaltap_0
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[27] -to auto_signaltap_0|vcc -section_id auto_signaltap_0
set_instance_assignment -name POST_FIT_CONNECT_TO_SLD_NODE_ENTITY_PORT crc[29] -to auto_signaltap_0|vcc -section_id auto_signaltap_0
set_global_assignment -name SLD_FILE db/Video_Explorer2_auto_stripped.stp
set_instance_assignment -name PARTITION_HIERARCHY root_partition -to | -section_id Top
+39 -31
View File
@@ -194,36 +194,40 @@ localparam CONF_STR = {
"-;",
"OCD,Multi-Pak,(Slot 2) CoCoSDC,(Slot3) ECB /Cart,(Slot 4) Disk;",
"H3-;",
"H3S0,DSK,Load Disk Drive 0;",
"H3S1,DSK,Load Disk Drive 1;",
"H3S2,DSK,Load Disk Drive 2;",
"H3S3,DSK,Load Disk Drive 3;",
"H3S2,DSK,Load Disk Drive 0;",
"H3S3,DSK,Load Disk Drive 1;",
"H3S4,DSK,Load Disk Drive 2;",
"H3S5,DSK,Load Disk Drive 3;",
"H2-;",
"H2F1,CCC,Load Cartridge;",
"H1-;",
// "H1S4,DSKVHD,Load SDC Drive 0;",
// "H1S5,DSKVHD,Load SDC Drive 1;",
"H1S4,DSKVHD,Load SDC Drive 0;",
"H1S5,DSKVHD,Load SDC Drive 1;",
"H1S0,DSKVHD,Load SDC Drive 0;",
"H1S1,DSKVHD,Load SDC Drive 1;",
"H1-;",
"H1S0,DSK,Load OS9 Floppy /d0;",
"H1S1,DSK,Load OS9 Floppy /d1;",
"H1S2,DSK,Load OS9 Floppy /d3;",
"H1S3,DSK,Load OS9 Floppy /d4;",
"H1S2,DSK,Load OS9 Floppy /d0;",
"H1S3,DSK,Load OS9 Floppy /d1;",
"H1S4,DSK,Load OS9 Floppy /d3;",
"H1S5,DSK,Load OS9 Floppy /d4;",
"-;",
"F2,CAS,Load Cassette;",
"TF,Stop & Rewind;",
"OH,Monitor Tape Sound,No,Yes;",
"-;",
"S6,CAS,Save Cassette;",
"OE,Cass Rwd=0 / Rec=1,0,1;",
"-;",
"P1,Video Settings;",
"P1-;",
"P1-, -= Video Settings =-;",
"P1-;",
"P1O89,Aspect ratio,Original,Full Screen,Wide,[ARC1];",
"P1O35,Scandoubler Fx,None,HQ2x,CRT 25%,CRT 50%,CRT 75%;",
"P1OL,Artifact Color,Off - SG4,On - SG6;",
"P1-;",
"P1OL,CoCo3 LC,Yes,No-(SG6=Yes);",
"P1-;",
"P1o56,Artifact Type,MESS,Simple,NONE;",
"P1OI,Artifact Color Set,0,1;",
"-;",
"P2,Debug Menu;",
@@ -232,8 +236,6 @@ localparam CONF_STR = {
"P2-;",
"P2F3,BIN,Load COCO Font;",
"P2OG,Cart Interrupt Disabled,OFF,ON;",
//P2O?,Force Disk 0 DS,Off,On;"
//P2O?,Force Disk 1 DS,Off,On;"
"-;",
"ON,D-Pad Joystick emu,No,Yes;",
"O6,Swap Joysticks,Off,On;",
@@ -243,12 +245,13 @@ localparam CONF_STR = {
"OO,Force Turbo,No,Yes;",
"o02,Turbo Speed,CoCo Ctrl, 0.89 Mhz,1.78 Mhz,2.86 Mhz, 3.58 Mhz,7.16 Mhz,9.54 Mhz;",
"OPR,Memory Size,512K,1M,2M,16M;",
"o89,Auto Run,No,DOS,AUTO.BAS;",
"-;",
"RM,Cold Boot;",
"R0,Reset;",
"J,Button1,Button2;",
"jn,A,B;",
// "v,51;",
"v,51;",
"V,v",`BUILD_DATE
};
@@ -261,9 +264,9 @@ localparam CONF_STR = {
// 0123456789ABCDEFGHIJKLMNOPQRSTUV 0123456789ABCDEFGHIJKLMNOPQRSTUV
//
// R OOOO OOR OO TOOOOOOROOOOOO ooo
// R OOOO OOR OOOTOOOOOOROOOOOO ooo oo oo
//F FF
//S SSSSSS
//S SSSSSSS
//////////////////// CLOCKS ///////////////////
@@ -315,8 +318,8 @@ assign CLK_VIDEO = clk_sys;
wire [64:0] RTC;
// SD - 6 drives [4 fdc and 2 sdc] 512 size blocks [the wd1793 translates to a 256 byte sector size]
hps_io #(.CONF_STR(CONF_STR),.PS2DIV(2400), .VDNUM(6), .BLKSZ(2)) hps_io
// SD - 7 drives [4 fdc, 2 sdc and 1 cass_wr] 512 size blocks [the wd1793 translates to a 256 byte sector size]
hps_io #(.CONF_STR(CONF_STR),.PS2DIV(2400), .VDNUM(7), .BLKSZ(2)) hps_io
(
.clk_sys(clk_sys),
.HPS_BUS(HPS_BUS),
@@ -373,21 +376,21 @@ hps_io #(.CONF_STR(CONF_STR),.PS2DIV(2400), .VDNUM(6), .BLKSZ(2)) hps_io
);
// SD block level interface
wire [5:0] img_mounted;
wire [6:0] img_mounted;
wire img_readonly;
wire [63:0] img_size;
wire [31:0] sd_lba[6];
wire [5:0] sd_blk_cnt[6];
wire [31:0] sd_lba[7];
wire [5:0] sd_blk_cnt[7];
wire [5:0] sd_rd;
wire [5:0] sd_wr;
wire [5:0] sd_ack;
wire [6:0] sd_rd;
wire [6:0] sd_wr;
wire [6:0] sd_ack;
// SD byte level access. Signals for 2-PORT altsyncram.
wire [8:0] sd_buff_addr;
wire [7:0] sd_buff_dout;
wire [7:0] sd_buff_din[6];
wire [7:0] sd_buff_din[7];
wire sd_buff_wr;
@@ -583,6 +586,8 @@ coco3fpga coco3 (
.Mem_Size(Mem_Size),
.AUTO_MODE(Auto_Mode),
.UART_TXD(UART_TXD),
.UART_RXD(UART_RXD),
.UART_RTS(UART_RTS),
@@ -597,13 +602,16 @@ wire [5:0] cocosound;
wire [2:0] turbo_speed = status[34:32];
wire [2:0] assigned_turbo_speed;
wire [1:0] art = status[38:37];
wire [1:0] Auto_Mode = status[41:40];
wire AMW_ACK;
wire cpu_speed = status[11];
//wire cpu_speed = status[11];
wire [1:0] mpi = status[13:12] + 1'b1;
wire video=status[14];
//wire video=status[14];
wire CASS_REW_RECORD=status[14];
wire cartint=status[16];
wire sg4v6 = status[21];
@@ -651,7 +659,7 @@ begin
end
// Set bit 9 to swap serial ports...
wire [9:0] switch = { 4'b1000,sg4v6,cartint,video,mpi,cpu_speed} ;
wire [9:0] switch = { 2'b10,art,sg4v6,cartint,CASS_REW_RECORD,mpi,1'b0};
wire reset = RESET | status[0] | buttons[1];
+301
View File
@@ -0,0 +1,301 @@
<session jtag_chain="DE-SoC on 192.168.2.129 [USB-1]" jtag_device="@2: 5CSEBA6(.|ES)/5CSEMA6/.. (0x02D020DD)" sof_file="">
<display_tree gui_logging_enabled="0">
<display_branch instance="auto_signaltap_0" log="USE_GLOBAL_TEMP" signal_set="USE_GLOBAL_TEMP" trigger="USE_GLOBAL_TEMP"/>
</display_tree>
<instance enabled="true" entity_name="sld_signaltap" is_auto_node="yes" is_expanded="true" name="auto_signaltap_0" source_file="sld_signaltap.vhd">
<node_ip_info instance_id="0" mfg_id="110" node_id="0" version="6"/>
<position_info>
<single attribute="active tab" value="0"/>
<single attribute="data horizontal scroll position" value="0"/>
<single attribute="data vertical scroll position" value="0"/>
<single attribute="setup horizontal scroll position" value="296"/>
<single attribute="setup vertical scroll position" value="2"/>
<single attribute="zoom level denominator" value="1"/>
<single attribute="zoom level numerator" value="1"/>
<single attribute="zoom offset denominator" value="1"/>
<single attribute="zoom offset numerator" value="129024"/>
<multi attribute="timebars" size="0" value=""/>
</position_info>
<signal_set global_temp="1" name="signal_set: 2024/03/24 14:53:29 #0">
<clock name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|clk_sample" polarity="posedge" tap_mode="classic"/>
<config pipeline_level="1" ram_type="AUTO" reserved_data_nodes="0" reserved_storage_qualifier_nodes="0" reserved_trigger_nodes="0" sample_depth="2048" trigger_in_enable="no" trigger_out_enable="no"/>
<top_entity/>
<signal_vec>
<trigger_input_vec>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|CASS_REWIND_RECORD" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|MOTOR_ON" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[0]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[1]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[2]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[3]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[4]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[5]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[6]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[7]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[0]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[1]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[2]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[3]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[4]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[5]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[6]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[7]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[8]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[0]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[1]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[2]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[3]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[4]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[5]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[6]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[7]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|look_for_sync" tap_mode="classic"/>
</trigger_input_vec>
<data_input_vec>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|CASS_REWIND_RECORD" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|MOTOR_ON" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[0]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[1]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[2]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[3]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[4]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[5]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[6]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[7]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[0]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[1]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[2]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[3]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[4]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[5]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[6]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[7]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[8]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[0]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[1]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[2]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[3]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[4]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[5]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[6]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[7]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|look_for_sync" tap_mode="classic"/>
</data_input_vec>
<storage_qualifier_input_vec>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|CASS_REWIND_RECORD" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|MOTOR_ON" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[0]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[1]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[2]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[3]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[4]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[5]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[6]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[7]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[0]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[1]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[2]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[3]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[4]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[5]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[6]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[7]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[8]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[0]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[1]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[2]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[3]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[4]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[5]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[6]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[7]" tap_mode="classic"/>
<wire name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|look_for_sync" tap_mode="classic"/>
</storage_qualifier_input_vec>
</signal_vec>
<presentation>
<unified_setup_data_view>
<node data_index="1" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-0="dont_care" level-1="dont_care" level-2="dont_care" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|MOTOR_ON" pwr_level-0="dont_care" pwr_level-1="dont_care" pwr_level-2="dont_care" pwr_storage-0="dont_care" pwr_storage-1="dont_care" pwr_storage-2="dont_care" storage-0="dont_care" storage-1="dont_care" storage-2="dont_care" storage_index="1" tap_mode="classic" trigger_index="1" type="unknown"/>
<node data_index="0" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-0="dont_care" level-1="dont_care" level-2="dont_care" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|CASS_REWIND_RECORD" pwr_level-0="dont_care" pwr_level-1="dont_care" pwr_level-2="dont_care" pwr_storage-0="dont_care" pwr_storage-1="dont_care" pwr_storage-2="dont_care" storage-0="dont_care" storage-1="dont_care" storage-2="dont_care" storage_index="0" tap_mode="classic" trigger_index="0" type="unknown"/>
<node is_selected="false" level-0="alt_or" level-1="alt_or" level-2="alt_or" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[7..0]" order="msb_to_lsb" storage-0="alt_or" storage-1="alt_or" storage-2="alt_or" type="register">
<node data_index="26" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-0="dont_care" level-1="dont_care" level-2="dont_care" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[7]" pwr_level-0="dont_care" pwr_level-1="dont_care" pwr_level-2="dont_care" pwr_storage-0="dont_care" pwr_storage-1="dont_care" pwr_storage-2="dont_care" storage-0="dont_care" storage-1="dont_care" storage-2="dont_care" storage_index="26" tap_mode="classic" trigger_index="26" type="unknown"/>
<node data_index="25" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-0="dont_care" level-1="dont_care" level-2="dont_care" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[6]" pwr_level-0="dont_care" pwr_level-1="dont_care" pwr_level-2="dont_care" pwr_storage-0="dont_care" pwr_storage-1="dont_care" pwr_storage-2="dont_care" storage-0="dont_care" storage-1="dont_care" storage-2="dont_care" storage_index="25" tap_mode="classic" trigger_index="25" type="unknown"/>
<node data_index="24" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-0="dont_care" level-1="dont_care" level-2="dont_care" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[5]" pwr_level-0="dont_care" pwr_level-1="dont_care" pwr_level-2="dont_care" pwr_storage-0="dont_care" pwr_storage-1="dont_care" pwr_storage-2="dont_care" storage-0="dont_care" storage-1="dont_care" storage-2="dont_care" storage_index="24" tap_mode="classic" trigger_index="24" type="unknown"/>
<node data_index="23" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-0="dont_care" level-1="dont_care" level-2="dont_care" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[4]" pwr_level-0="dont_care" pwr_level-1="dont_care" pwr_level-2="dont_care" pwr_storage-0="dont_care" pwr_storage-1="dont_care" pwr_storage-2="dont_care" storage-0="dont_care" storage-1="dont_care" storage-2="dont_care" storage_index="23" tap_mode="classic" trigger_index="23" type="unknown"/>
<node data_index="22" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-0="dont_care" level-1="dont_care" level-2="dont_care" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[3]" pwr_level-0="dont_care" pwr_level-1="dont_care" pwr_level-2="dont_care" pwr_storage-0="dont_care" pwr_storage-1="dont_care" pwr_storage-2="dont_care" storage-0="dont_care" storage-1="dont_care" storage-2="dont_care" storage_index="22" tap_mode="classic" trigger_index="22" type="unknown"/>
<node data_index="21" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-0="dont_care" level-1="dont_care" level-2="dont_care" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[2]" pwr_level-0="dont_care" pwr_level-1="dont_care" pwr_level-2="dont_care" pwr_storage-0="dont_care" pwr_storage-1="dont_care" pwr_storage-2="dont_care" storage-0="dont_care" storage-1="dont_care" storage-2="dont_care" storage_index="21" tap_mode="classic" trigger_index="21" type="unknown"/>
<node data_index="20" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-0="dont_care" level-1="dont_care" level-2="dont_care" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[1]" pwr_level-0="dont_care" pwr_level-1="dont_care" pwr_level-2="dont_care" pwr_storage-0="dont_care" pwr_storage-1="dont_care" pwr_storage-2="dont_care" storage-0="dont_care" storage-1="dont_care" storage-2="dont_care" storage_index="20" tap_mode="classic" trigger_index="20" type="unknown"/>
<node data_index="19" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-0="dont_care" level-1="dont_care" level-2="dont_care" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[0]" pwr_level-0="dont_care" pwr_level-1="dont_care" pwr_level-2="dont_care" pwr_storage-0="dont_care" pwr_storage-1="dont_care" pwr_storage-2="dont_care" storage-0="dont_care" storage-1="dont_care" storage-2="dont_care" storage_index="19" tap_mode="classic" trigger_index="19" type="unknown"/>
</node>
<node data_index="27" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-0="falling edge" level-1="dont_care" level-2="dont_care" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|look_for_sync" pwr_level-0="dont_care" pwr_level-1="dont_care" pwr_level-2="dont_care" pwr_storage-0="dont_care" pwr_storage-1="dont_care" pwr_storage-2="dont_care" storage-0="dont_care" storage-1="dont_care" storage-2="dont_care" storage_index="27" tap_mode="classic" trigger_index="27" type="unknown"/>
<node is_selected="false" level-0="alt_or" level-1="alt_or" level-2="alt_or" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[8..0]" order="msb_to_lsb" type="register">
<node data_index="18" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[8]" storage_index="18" tap_mode="classic" trigger_index="18" type="unknown"/>
<node data_index="17" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[7]" storage_index="17" tap_mode="classic" trigger_index="17" type="unknown"/>
<node data_index="16" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[6]" storage_index="16" tap_mode="classic" trigger_index="16" type="unknown"/>
<node data_index="15" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[5]" storage_index="15" tap_mode="classic" trigger_index="15" type="unknown"/>
<node data_index="14" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[4]" storage_index="14" tap_mode="classic" trigger_index="14" type="unknown"/>
<node data_index="13" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[3]" storage_index="13" tap_mode="classic" trigger_index="13" type="unknown"/>
<node data_index="12" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[2]" storage_index="12" tap_mode="classic" trigger_index="12" type="unknown"/>
<node data_index="11" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[1]" storage_index="11" tap_mode="classic" trigger_index="11" type="unknown"/>
<node data_index="10" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[0]" storage_index="10" tap_mode="classic" trigger_index="10" type="unknown"/>
</node>
<node is_selected="false" level-0="alt_or" level-1="alt_or" level-2="alt_or" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[7..0]" order="msb_to_lsb" type="register">
<node data_index="9" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-1="low" level-2="high" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[7]" storage_index="9" tap_mode="classic" trigger_index="9" type="unknown"/>
<node data_index="8" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-1="low" level-2="high" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[6]" storage_index="8" tap_mode="classic" trigger_index="8" type="unknown"/>
<node data_index="7" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-1="low" level-2="high" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[5]" storage_index="7" tap_mode="classic" trigger_index="7" type="unknown"/>
<node data_index="6" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-1="low" level-2="high" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[4]" storage_index="6" tap_mode="classic" trigger_index="6" type="unknown"/>
<node data_index="5" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-1="low" level-2="high" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[3]" storage_index="5" tap_mode="classic" trigger_index="5" type="unknown"/>
<node data_index="4" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-1="low" level-2="high" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[2]" storage_index="4" tap_mode="classic" trigger_index="4" type="unknown"/>
<node data_index="3" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-1="low" level-2="high" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[1]" storage_index="3" tap_mode="classic" trigger_index="3" type="unknown"/>
<node data_index="2" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-1="low" level-2="high" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[0]" storage_index="2" tap_mode="classic" trigger_index="2" type="unknown"/>
</node>
</unified_setup_data_view>
<data_view>
<net data_index="1" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-0="dont_care" level-1="dont_care" level-2="dont_care" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|MOTOR_ON" pwr_level-0="dont_care" pwr_level-1="dont_care" pwr_level-2="dont_care" pwr_storage-0="dont_care" pwr_storage-1="dont_care" pwr_storage-2="dont_care" storage-0="dont_care" storage-1="dont_care" storage-2="dont_care" storage_index="1" tap_mode="classic" trigger_index="1" type="unknown"/>
<net data_index="0" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-0="dont_care" level-1="dont_care" level-2="dont_care" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|CASS_REWIND_RECORD" pwr_level-0="dont_care" pwr_level-1="dont_care" pwr_level-2="dont_care" pwr_storage-0="dont_care" pwr_storage-1="dont_care" pwr_storage-2="dont_care" storage-0="dont_care" storage-1="dont_care" storage-2="dont_care" storage_index="0" tap_mode="classic" trigger_index="0" type="unknown"/>
<bus is_selected="false" level-0="alt_or" level-1="alt_or" level-2="alt_or" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[7..0]" order="msb_to_lsb" storage-0="alt_or" storage-1="alt_or" storage-2="alt_or" type="register">
<net data_index="26" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-0="dont_care" level-1="dont_care" level-2="dont_care" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[7]" pwr_level-0="dont_care" pwr_level-1="dont_care" pwr_level-2="dont_care" pwr_storage-0="dont_care" pwr_storage-1="dont_care" pwr_storage-2="dont_care" storage-0="dont_care" storage-1="dont_care" storage-2="dont_care" storage_index="26" tap_mode="classic" trigger_index="26" type="unknown"/>
<net data_index="25" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-0="dont_care" level-1="dont_care" level-2="dont_care" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[6]" pwr_level-0="dont_care" pwr_level-1="dont_care" pwr_level-2="dont_care" pwr_storage-0="dont_care" pwr_storage-1="dont_care" pwr_storage-2="dont_care" storage-0="dont_care" storage-1="dont_care" storage-2="dont_care" storage_index="25" tap_mode="classic" trigger_index="25" type="unknown"/>
<net data_index="24" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-0="dont_care" level-1="dont_care" level-2="dont_care" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[5]" pwr_level-0="dont_care" pwr_level-1="dont_care" pwr_level-2="dont_care" pwr_storage-0="dont_care" pwr_storage-1="dont_care" pwr_storage-2="dont_care" storage-0="dont_care" storage-1="dont_care" storage-2="dont_care" storage_index="24" tap_mode="classic" trigger_index="24" type="unknown"/>
<net data_index="23" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-0="dont_care" level-1="dont_care" level-2="dont_care" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[4]" pwr_level-0="dont_care" pwr_level-1="dont_care" pwr_level-2="dont_care" pwr_storage-0="dont_care" pwr_storage-1="dont_care" pwr_storage-2="dont_care" storage-0="dont_care" storage-1="dont_care" storage-2="dont_care" storage_index="23" tap_mode="classic" trigger_index="23" type="unknown"/>
<net data_index="22" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-0="dont_care" level-1="dont_care" level-2="dont_care" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[3]" pwr_level-0="dont_care" pwr_level-1="dont_care" pwr_level-2="dont_care" pwr_storage-0="dont_care" pwr_storage-1="dont_care" pwr_storage-2="dont_care" storage-0="dont_care" storage-1="dont_care" storage-2="dont_care" storage_index="22" tap_mode="classic" trigger_index="22" type="unknown"/>
<net data_index="21" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-0="dont_care" level-1="dont_care" level-2="dont_care" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[2]" pwr_level-0="dont_care" pwr_level-1="dont_care" pwr_level-2="dont_care" pwr_storage-0="dont_care" pwr_storage-1="dont_care" pwr_storage-2="dont_care" storage-0="dont_care" storage-1="dont_care" storage-2="dont_care" storage_index="21" tap_mode="classic" trigger_index="21" type="unknown"/>
<net data_index="20" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-0="dont_care" level-1="dont_care" level-2="dont_care" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[1]" pwr_level-0="dont_care" pwr_level-1="dont_care" pwr_level-2="dont_care" pwr_storage-0="dont_care" pwr_storage-1="dont_care" pwr_storage-2="dont_care" storage-0="dont_care" storage-1="dont_care" storage-2="dont_care" storage_index="20" tap_mode="classic" trigger_index="20" type="unknown"/>
<net data_index="19" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-0="dont_care" level-1="dont_care" level-2="dont_care" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[0]" pwr_level-0="dont_care" pwr_level-1="dont_care" pwr_level-2="dont_care" pwr_storage-0="dont_care" pwr_storage-1="dont_care" pwr_storage-2="dont_care" storage-0="dont_care" storage-1="dont_care" storage-2="dont_care" storage_index="19" tap_mode="classic" trigger_index="19" type="unknown"/>
</bus>
<net data_index="27" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-0="falling edge" level-1="dont_care" level-2="dont_care" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|look_for_sync" pwr_level-0="dont_care" pwr_level-1="dont_care" pwr_level-2="dont_care" pwr_storage-0="dont_care" pwr_storage-1="dont_care" pwr_storage-2="dont_care" storage-0="dont_care" storage-1="dont_care" storage-2="dont_care" storage_index="27" tap_mode="classic" trigger_index="27" type="unknown"/>
<bus is_selected="false" level-0="alt_or" level-1="alt_or" level-2="alt_or" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[8..0]" order="msb_to_lsb" type="register">
<net data_index="18" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[8]" storage_index="18" tap_mode="classic" trigger_index="18" type="unknown"/>
<net data_index="17" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[7]" storage_index="17" tap_mode="classic" trigger_index="17" type="unknown"/>
<net data_index="16" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[6]" storage_index="16" tap_mode="classic" trigger_index="16" type="unknown"/>
<net data_index="15" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[5]" storage_index="15" tap_mode="classic" trigger_index="15" type="unknown"/>
<net data_index="14" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[4]" storage_index="14" tap_mode="classic" trigger_index="14" type="unknown"/>
<net data_index="13" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[3]" storage_index="13" tap_mode="classic" trigger_index="13" type="unknown"/>
<net data_index="12" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[2]" storage_index="12" tap_mode="classic" trigger_index="12" type="unknown"/>
<net data_index="11" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[1]" storage_index="11" tap_mode="classic" trigger_index="11" type="unknown"/>
<net data_index="10" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[0]" storage_index="10" tap_mode="classic" trigger_index="10" type="unknown"/>
</bus>
<bus is_selected="false" level-0="alt_or" level-1="alt_or" level-2="alt_or" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[7..0]" order="msb_to_lsb" type="register">
<net data_index="9" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-1="low" level-2="high" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[7]" storage_index="9" tap_mode="classic" trigger_index="9" type="unknown"/>
<net data_index="8" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-1="low" level-2="high" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[6]" storage_index="8" tap_mode="classic" trigger_index="8" type="unknown"/>
<net data_index="7" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-1="low" level-2="high" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[5]" storage_index="7" tap_mode="classic" trigger_index="7" type="unknown"/>
<net data_index="6" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-1="low" level-2="high" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[4]" storage_index="6" tap_mode="classic" trigger_index="6" type="unknown"/>
<net data_index="5" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-1="low" level-2="high" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[3]" storage_index="5" tap_mode="classic" trigger_index="5" type="unknown"/>
<net data_index="4" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-1="low" level-2="high" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[2]" storage_index="4" tap_mode="classic" trigger_index="4" type="unknown"/>
<net data_index="3" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-1="low" level-2="high" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[1]" storage_index="3" tap_mode="classic" trigger_index="3" type="unknown"/>
<net data_index="2" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-1="low" level-2="high" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[0]" storage_index="2" tap_mode="classic" trigger_index="2" type="unknown"/>
</bus>
</data_view>
<setup_view>
<net data_index="1" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-0="dont_care" level-1="dont_care" level-2="dont_care" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|MOTOR_ON" pwr_level-0="dont_care" pwr_level-1="dont_care" pwr_level-2="dont_care" pwr_storage-0="dont_care" pwr_storage-1="dont_care" pwr_storage-2="dont_care" storage-0="dont_care" storage-1="dont_care" storage-2="dont_care" storage_index="1" tap_mode="classic" trigger_index="1" type="unknown"/>
<net data_index="0" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-0="dont_care" level-1="dont_care" level-2="dont_care" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|CASS_REWIND_RECORD" pwr_level-0="dont_care" pwr_level-1="dont_care" pwr_level-2="dont_care" pwr_storage-0="dont_care" pwr_storage-1="dont_care" pwr_storage-2="dont_care" storage-0="dont_care" storage-1="dont_care" storage-2="dont_care" storage_index="0" tap_mode="classic" trigger_index="0" type="unknown"/>
<bus is_selected="false" level-0="alt_or" level-1="alt_or" level-2="alt_or" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[7..0]" order="msb_to_lsb" storage-0="alt_or" storage-1="alt_or" storage-2="alt_or" type="register">
<net data_index="26" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-0="dont_care" level-1="dont_care" level-2="dont_care" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[7]" pwr_level-0="dont_care" pwr_level-1="dont_care" pwr_level-2="dont_care" pwr_storage-0="dont_care" pwr_storage-1="dont_care" pwr_storage-2="dont_care" storage-0="dont_care" storage-1="dont_care" storage-2="dont_care" storage_index="26" tap_mode="classic" trigger_index="26" type="unknown"/>
<net data_index="25" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-0="dont_care" level-1="dont_care" level-2="dont_care" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[6]" pwr_level-0="dont_care" pwr_level-1="dont_care" pwr_level-2="dont_care" pwr_storage-0="dont_care" pwr_storage-1="dont_care" pwr_storage-2="dont_care" storage-0="dont_care" storage-1="dont_care" storage-2="dont_care" storage_index="25" tap_mode="classic" trigger_index="25" type="unknown"/>
<net data_index="24" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-0="dont_care" level-1="dont_care" level-2="dont_care" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[5]" pwr_level-0="dont_care" pwr_level-1="dont_care" pwr_level-2="dont_care" pwr_storage-0="dont_care" pwr_storage-1="dont_care" pwr_storage-2="dont_care" storage-0="dont_care" storage-1="dont_care" storage-2="dont_care" storage_index="24" tap_mode="classic" trigger_index="24" type="unknown"/>
<net data_index="23" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-0="dont_care" level-1="dont_care" level-2="dont_care" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[4]" pwr_level-0="dont_care" pwr_level-1="dont_care" pwr_level-2="dont_care" pwr_storage-0="dont_care" pwr_storage-1="dont_care" pwr_storage-2="dont_care" storage-0="dont_care" storage-1="dont_care" storage-2="dont_care" storage_index="23" tap_mode="classic" trigger_index="23" type="unknown"/>
<net data_index="22" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-0="dont_care" level-1="dont_care" level-2="dont_care" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[3]" pwr_level-0="dont_care" pwr_level-1="dont_care" pwr_level-2="dont_care" pwr_storage-0="dont_care" pwr_storage-1="dont_care" pwr_storage-2="dont_care" storage-0="dont_care" storage-1="dont_care" storage-2="dont_care" storage_index="22" tap_mode="classic" trigger_index="22" type="unknown"/>
<net data_index="21" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-0="dont_care" level-1="dont_care" level-2="dont_care" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[2]" pwr_level-0="dont_care" pwr_level-1="dont_care" pwr_level-2="dont_care" pwr_storage-0="dont_care" pwr_storage-1="dont_care" pwr_storage-2="dont_care" storage-0="dont_care" storage-1="dont_care" storage-2="dont_care" storage_index="21" tap_mode="classic" trigger_index="21" type="unknown"/>
<net data_index="20" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-0="dont_care" level-1="dont_care" level-2="dont_care" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[1]" pwr_level-0="dont_care" pwr_level-1="dont_care" pwr_level-2="dont_care" pwr_storage-0="dont_care" pwr_storage-1="dont_care" pwr_storage-2="dont_care" storage-0="dont_care" storage-1="dont_care" storage-2="dont_care" storage_index="20" tap_mode="classic" trigger_index="20" type="unknown"/>
<net data_index="19" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-0="dont_care" level-1="dont_care" level-2="dont_care" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_data_in[0]" pwr_level-0="dont_care" pwr_level-1="dont_care" pwr_level-2="dont_care" pwr_storage-0="dont_care" pwr_storage-1="dont_care" pwr_storage-2="dont_care" storage-0="dont_care" storage-1="dont_care" storage-2="dont_care" storage_index="19" tap_mode="classic" trigger_index="19" type="unknown"/>
</bus>
<net data_index="27" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-0="falling edge" level-1="dont_care" level-2="dont_care" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|look_for_sync" pwr_level-0="dont_care" pwr_level-1="dont_care" pwr_level-2="dont_care" pwr_storage-0="dont_care" pwr_storage-1="dont_care" pwr_storage-2="dont_care" storage-0="dont_care" storage-1="dont_care" storage-2="dont_care" storage_index="27" tap_mode="classic" trigger_index="27" type="unknown"/>
<bus is_selected="false" level-0="alt_or" level-1="alt_or" level-2="alt_or" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[8..0]" order="msb_to_lsb" type="register">
<net data_index="18" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[8]" storage_index="18" tap_mode="classic" trigger_index="18" type="unknown"/>
<net data_index="17" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[7]" storage_index="17" tap_mode="classic" trigger_index="17" type="unknown"/>
<net data_index="16" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[6]" storage_index="16" tap_mode="classic" trigger_index="16" type="unknown"/>
<net data_index="15" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[5]" storage_index="15" tap_mode="classic" trigger_index="15" type="unknown"/>
<net data_index="14" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[4]" storage_index="14" tap_mode="classic" trigger_index="14" type="unknown"/>
<net data_index="13" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[3]" storage_index="13" tap_mode="classic" trigger_index="13" type="unknown"/>
<net data_index="12" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[2]" storage_index="12" tap_mode="classic" trigger_index="12" type="unknown"/>
<net data_index="11" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[1]" storage_index="11" tap_mode="classic" trigger_index="11" type="unknown"/>
<net data_index="10" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|buf_address[0]" storage_index="10" tap_mode="classic" trigger_index="10" type="unknown"/>
</bus>
<bus is_selected="false" level-0="alt_or" level-1="alt_or" level-2="alt_or" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[7..0]" order="msb_to_lsb" type="register">
<net data_index="9" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-1="low" level-2="high" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[7]" storage_index="9" tap_mode="classic" trigger_index="9" type="unknown"/>
<net data_index="8" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-1="low" level-2="high" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[6]" storage_index="8" tap_mode="classic" trigger_index="8" type="unknown"/>
<net data_index="7" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-1="low" level-2="high" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[5]" storage_index="7" tap_mode="classic" trigger_index="7" type="unknown"/>
<net data_index="6" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-1="low" level-2="high" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[4]" storage_index="6" tap_mode="classic" trigger_index="6" type="unknown"/>
<net data_index="5" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-1="low" level-2="high" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[3]" storage_index="5" tap_mode="classic" trigger_index="5" type="unknown"/>
<net data_index="4" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-1="low" level-2="high" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[2]" storage_index="4" tap_mode="classic" trigger_index="4" type="unknown"/>
<net data_index="3" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-1="low" level-2="high" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[1]" storage_index="3" tap_mode="classic" trigger_index="3" type="unknown"/>
<net data_index="2" duplicate_name_allowed="false" is_data_input="true" is_node_valid="true" is_selected="false" is_storage_input="true" is_trigger_input="true" level-1="low" level-2="high" name="emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[0]" storage_index="2" tap_mode="classic" trigger_index="2" type="unknown"/>
</bus>
</setup_view>
<trigger_in_editor/>
<trigger_out_editor/>
</presentation>
<trigger CRC="3B99A6F0" attribute_mem_mode="false" gap_record="true" global_temp="1" name="trigger: 2024/03/24 15:44:31 #0" position="pre" power_up_trigger_mode="false" record_data_gap="true" segment_size="512" storage_mode="off" storage_qualifier_disabled="no" storage_qualifier_port_is_pin="false" storage_qualifier_port_name="auto_stp_external_storage_qualifier" storage_qualifier_port_tap_mode="classic" trigger_type="circular">
<power_up_trigger position="pre" storage_qualifier_disabled="no"/>
<events use_custom_flow_control="no">
<level enabled="yes" name="condition1" type="basic">'emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|look_for_sync' == falling edge
<power_up enabled="yes">
</power_up>
<op_node>
<op_node left="608" selected="1" top="80" type="Advanced Trigger Level Result"/>
</op_node>
</level>
<level enabled="yes" name="condition2" type="basic">'emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[0]' == low &amp;&amp; 'emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[1]' == low &amp;&amp; 'emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[2]' == low &amp;&amp; 'emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[3]' == low &amp;&amp; 'emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[4]' == low &amp;&amp; 'emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[5]' == low &amp;&amp; 'emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[6]' == low &amp;&amp; 'emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[7]' == low
<power_up enabled="yes">
</power_up>
<op_node>
<op_node left="362" top="95" type="Advanced Trigger Level Result"/>
</op_node>
</level>
<level enabled="yes" name="condition3" type="basic">'emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[0]' == high &amp;&amp; 'emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[1]' == high &amp;&amp; 'emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[2]' == high &amp;&amp; 'emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[3]' == high &amp;&amp; 'emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[4]' == high &amp;&amp; 'emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[5]' == high &amp;&amp; 'emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[6]' == high &amp;&amp; 'emu:emu|coco3fpga:coco3|Cassette_Write:CoCo3_Cassette_Write|blk_type[7]' == high
<power_up enabled="yes">
</power_up>
<op_node/>
</level>
<custom_flow_control>
<runtime_configurable comparison_operator="yes" counter_action="no" flag_action="no" logical_operator="yes" numerical_value="yes" state_transition="yes"/>
<flow_expression><![CDATA[state ST1:
trigger;]]>
</flow_expression>
<power_up_flow_expression><![CDATA[state ST1:
trigger;]]>
</power_up_flow_expression>
</custom_flow_control>
</events>
<storage_qualifier_events>
<transitional>1111111111111111111111111111
<pwr_up_transitional>1111111111111111111111111111</pwr_up_transitional>
</transitional>
<storage_qualifier_level type="basic">
<power_up>
</power_up>
<op_node/>
</storage_qualifier_level>
<storage_qualifier_level type="basic">
<power_up>
</power_up>
<op_node/>
</storage_qualifier_level>
<storage_qualifier_level type="basic">
<power_up>
</power_up>
<op_node/>
</storage_qualifier_level>
</storage_qualifier_events>
<log>
<data global_temp="1" name="log: Trig @ 2024/03/24 15:50:41 (0:0:14.0 elapsed)" power_up_mode="false" sample_depth="2048" trigger_position="256">11100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000011100101010101010111100000001110010101010101011110000000111001010101010101111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000111000000000010101000111100011100000000001010100011110001110000000000101010001111000Line truncated
<extradata>1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111T111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111</extradata>
</log>
</trigger>
</signal_set>
</instance>
<mnemonics/>
<static_plugin_mnemonics/>
<global_info>
<single attribute="active instance" value="0"/>
<single attribute="config widget visible" value="1"/>
<single attribute="data log widget visible" value="1"/>
<single attribute="hierarchy widget height" value="96"/>
<single attribute="hierarchy widget visible" value="1"/>
<single attribute="instance widget visible" value="1"/>
<single attribute="jtag widget visible" value="1"/>
<single attribute="lock mode" value="0"/>
<multi attribute="column width" size="23" value="34,34,323,74,68,78,95,96,98,98,88,88,110,101,101,101,101,101,101,101,101,107,78"/>
<multi attribute="frame size" size="2" value="1024,705"/>
<multi attribute="jtag widget size" size="2" value="348,135"/>
</global_info>
</session>
+64 -5
View File
@@ -1,12 +1,71 @@
CTF = Compile Time Feature...
1. Changed PIA 2 addressing to align with real CoCo3 hardware and end at FF2F.
2. Re-arranged MiSTer drive LUNs to support future auto-boot from SDC drive 0.
3. Added 'Auto Run' feature. You must use slot 2 [SDC]. Take your floppy or HD
and copy it to a file name of 'boot.vhd'. This will be auto mounted to drive 0
on the SDC. In the menu, find a new item Auto Run:. It can be set to No, DOS or
AUTO.BAS. Choosing dos causes the 'DOS' command to be executed on power up. Setting
the option to 'AUTO.BAS' will cause a 'RUN"AUTO' command to be executed upon powerup.
Save your settings to cause the changes to be remembered. The Auto Run system re-arms
upon using the 'Cold Boot' menu item.
4. Fixed MiSTer / CoCo3 interface preventing the joysticks ever reaching the
max value of 63. Specifically '>' was changed to '>=' the DTOA values.
This fixes DonPan and is verified in Diagnostics 2.0.
5. HiRES[3] is used to enable some of the higher resolution graphics modes
Gary Becker designed into CoCo3FPGA, and while these are not fully
supported, the control signals such as HiRES[3] at $FF98 bit 6 affectt
the graphics engine. For some reason Color File II manipulates this bit
and was causing it not to work. This change requires the SG6 extensions
to be enabled to set HiRES[3]. So specifically in the Video Settings
insure CoCo3 LC is set to Yes. Color File II now works properly.
1. For cycle accurate 6809, changed PH2 to cpu_cycle_ena. (Improve timing of control register writes)
2. Changed PIA(s) addressing to alow complete mirror through FF00-FF3F
To Do...
1. Add support for cassette save.
2. Add Speech / Music cart
3. Fix Castle of Tharoggod
FYI - If you plan on playing with the build process - there is a new compile time feature
in config.v called CoCo3_Select_GIMEX_RAST. It is inactive and I suggest you leave
it as its is a upcoming change which is not ready.
1. Changed PIA 2 addressing to align with real CoCo3 hardware and end at FF2F.
2. Removal of 16 bit sound extentions as they overlap speach / sound cart. This is
accompanied by a rework of the sound mixing to be more correct.
3. Re-arranged MiSTer drive LUNs to support future auto-boot from SDC drive 0
4. Added 'Auto Run' feature. You must use slot 2 [SDC]. Take your floopy or HD
and copy it to a file name of 'boot.vhd'. This will be auto mounted to drive 0
on the SDC. In the menu, find a new item Auto Run:. It can be set to No, DOS or
AUTO.BAS. Choosing dos causes the 'DOS' command to be executed on power up. Setting
the option to 'AUTO.BAS' will cause a 'RUN"AUTO' command to be executed upon powerup.
Save your settings to cause the changes to be remembered. The Auto Run system re-arms
upon using the 'Cold Boot' menu item.
To Do...
1. Fix assign SDC_EN_CS
2. Add new color dithering...
1. Add Speech / Music cart
2. Fix Color File II
3. Fic Castle of Tharoggad
1. For cycle accurate 6809, changed PH2 to cpu_cycle_ena. (Improve timing of control register writes)
2. Changed PIA(s) addressing to allow complete mirror through FF00-FF3F
3. Corrected usage of SG6 enable (SW5 in orig code) which allows the usage of SG6. Formerly it was used to
enable artifacts. That is no longer true. For most compatibility it has be relabeled 'CoCo3 LC',
and it default setting is Yes which is fully compatible with the CoCo3. [setting no allows SG6 mode].
For some OS9 software this must be set to 'Yes' which is the default.
4. Added 'Artifact Type' menu in 'Video Settings' menu. Settings are 'MESS', 'Simple', and 'NONE'. 'MESS'
is the default and has improved fidelity over 'Simple' which was previously implemented in connection
with SW5 [see above]. Again, the default should be used. The artifact emulation can be turned off
by setting the option to 'NONE'. The 'Artifact Color Set' choice is only valid for 'MESS' and 'Simple'
artifact settings.
To Do...
1. Change PIA 2 addressing to align with real CoCo3 hardware and end at FF2F.
2. Fix Color File II
3. Fic Castle of Tharoggad
Binary file not shown.
Binary file not shown.
+3
View File
@@ -5,6 +5,7 @@ set_global_assignment -name VERILOG_FILE rtl/PS2_Key/ps2_keyboard.v
set_global_assignment -name MIF_FILE rtl/VDAC.mif
set_global_assignment -name VERILOG_FILE rtl/VDAC.v
set_global_assignment -name VERILOG_FILE rtl/Mister_Video.v
set_global_assignment -name VERILOG_FILE rtl/Mister_Video_GIMEX.v
set_global_assignment -name VERILOG_FILE rtl/cocokey.v
set_global_assignment -name VERILOG_FILE rtl/UART_6551/uart_6551.v
set_global_assignment -name VERILOG_FILE rtl/UART_6551/6551tx.v
@@ -16,6 +17,7 @@ set_global_assignment -name SYSTEMVERILOG_FILE rtl/coco3fpga.sv
set_global_assignment -name VERILOG_FILE rtl/pll.v
set_global_assignment -name VERILOG_FILE rtl/pll/pll_0002.v
set_global_assignment -name VERILOG_FILE rtl/cassette.v
set_global_assignment -name SYSTEMVERILOG_FILE rtl/Cassette_Write.sv
set_global_assignment -name VERILOG_FILE rtl/rtc.sv
set_global_assignment -name VERILOG_FILE rtl/AMW.v
set_global_assignment -name VERILOG_FILE rtl/square_gen.v
@@ -23,6 +25,7 @@ set_global_assignment -name VERILOG_FILE rtl/config.v
set_global_assignment -name SYSTEMVERILOG_FILE rtl/fdc.sv
set_global_assignment -name SYSTEMVERILOG_FILE rtl/sdc.sv
set_global_assignment -name SYSTEMVERILOG_FILE rtl/sdc_top.sv
set_global_assignment -name SYSTEMVERILOG_FILE rtl/Auto_Run.sv
set_global_assignment -name SYSTEMVERILOG_FILE rtl/ps2_mouse.v
set_global_assignment -name SYSTEMVERILOG_FILE rtl/sdram/sdram2.sv
set_global_assignment -name SYSTEMVERILOG_FILE rtl/wd1793.sv
Binary file not shown.
Binary file not shown.
+264
View File
@@ -0,0 +1,264 @@
////////////////////////////////////////////////////////////////////////////////
// Project Name: CoCo3FPGA Version 5.x.x
// File Name: Auto_Run.sv
//
// CoCo3 in an FPGA
//
////////////////////////////////////////////////////////////////////////////////
//
////////////////////////////////////////////////////////////////////////////////
//
// Color Computer 3 compatible system on a chip
//
//
// Copyright (c) 2008 Gary Becker ([email protected])
//
// All rights reserved
//
// Redistribution and use in source and synthezised forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// Redistributions in synthesized form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// Neither the name of the author nor the names of other contributors may
// be used to endorse or promote products derived from this software without
// specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
// Please report bugs to the author, but before you do so, please
// make sure that this is not a derivative work and that
// you have the latest version of this file.
//
//
////////////////////////////////////////////////////////////////////////////////
// Stan Hodge
//
// Auto_Run by Stan Hodge 02/16/24
////////////////////////////////////////////////////////////////////////////////
module Auto_Run(
input RESET_N,
input CLK,
input CLK_1_78,
input [1:0] MPI_SCS, // slot id
input [1:0] MODE, // from MISTer subsystem 00=NONE, 01=DOS<RET>, 10=RUN"AUTO<RET>
input AMW_ACK, // from AMW subsystem - Cold Boot setup finished
input [72:0] KEY_IN, // Keystroke array
output [72:0] KEY_OUT // Modified Keystroke array
);
// Programs
// MODE = 01
// D O S <CR>
wire [7:0] DOS_KEYFILE[0:3] = '{8'd4, 8'd15, 8'd19, 8'd48};
// MODE = 10
// R U N <S> 2 A U T O <CR>
wire [7:0] RUN_KEYFILE[0:9] = '{8'd18, 8'd21, 8'd14, 8'd55, 8'd34, 8'd1, 8'd21, 8'd20, 8'd15, 8'd48};
localparam PRESS_KEY = 1'b1;
localparam RELEASE_KEY = 1'b0;
reg [3:0] index;
reg shift;
reg [7:0] char;
reg run; // 1=running
reg key_up_down;
reg timer_19_d;
// 300ms [600ms is aprox 1024000]
reg [19:0] timer;
// timer[19] changes state every 524288 counts, ~ 0.294 seconds.
reg timer_enable; // 1=run, 0=stop and clear
localparam st_beg0 = 4'd0;
localparam st_beg1 = 4'd1;
localparam st_beg2 = 4'd2;
localparam st_start = 4'd3;
localparam st_1 = 4'd4;
localparam st_2 = 4'd5;
localparam st_3 = 4'd6;
reg [3:0] state;
reg first_time = 1'b1;
/////////////////////////////////////////////////////////////
// Timer
always @ (negedge CLK or negedge RESET_N)
begin
if(!RESET_N)
begin
timer <= 20'b00000000000000000000;
end
else
begin
if (CLK_1_78)
begin
if (timer_enable)
timer <= timer + 1'b1;
else
timer <= 20'b00000000000000000000;
end
end
end
/////////////////////////////////////////////////////////////
// Output
always @(*)
begin
KEY_OUT <= KEY_IN;
if (run)
begin
if (shift)
begin
KEY_OUT[55] <= key_up_down;
KEY_OUT[char] <= key_up_down;
end
else
begin
KEY_OUT[char] <= key_up_down;
end
end
end
/////////////////////////////////////////////////////////////
// Main State Mach
always @ (negedge CLK or negedge RESET_N)
begin
if(!RESET_N)
begin
state <= st_beg0;
shift <= 1'b0;
index <= 4'd0;
run <= 1'b0;
timer_enable <= 1'b0;
key_up_down <= RELEASE_KEY;
timer_19_d <= 1'b0;
end
else
begin
if (AMW_ACK)
first_time <= 1'b1;
timer_19_d <= timer[19];
case(state)
st_beg0:
begin
timer_enable <= 1'b1;
if (!timer[19] && timer_19_d)
state <= st_beg1;
end
st_beg1:
begin
if (!timer[19] && timer_19_d)
state <= st_beg2;
end
st_beg2:
begin
if (!timer[19] && timer_19_d)
begin
state <= st_start;
timer_enable <= 1'b0;
end
end
st_start:
begin
if (first_time && (MPI_SCS == 2'b01))
begin
if (MODE == 2'b01) //DOS
begin
if (DOS_KEYFILE[index] == 8'd55)
shift <= 1'b1;
char <= DOS_KEYFILE[index];
run <= 1'b1;
state <= st_1;
end
else if (MODE == 2'b10) //RUN"AUTO
begin
if (RUN_KEYFILE[index] == 8'd55)
shift <= 1'b1;
char <= RUN_KEYFILE[index];
run <= 1'b1;
state <= st_1;
end
end
end
st_1:
begin
index <= index + 1'b1;
if (shift && (char == 8'd55)) // read next char
state <= st_start;
else
begin
timer_enable <= 1'b1;
key_up_down <= PRESS_KEY;
state <= st_2;
end
end
st_2:
begin
if (timer[18] == 1'b1) // 300ms time passed
begin
key_up_down <= RELEASE_KEY;
state <= st_3;
end
end
st_3:
begin
if (timer[18] == 1'b0) // 300ms time passed
begin
shift <= 1'b0;
timer_enable <= 1'b0;
if (char == 7'd48) // we are done
begin
first_time <= 1'b0;
run <= 1'b0;
end
state <= st_start;
end
end
default:;
endcase
end
end
endmodule
+538
View File
@@ -0,0 +1,538 @@
////////////////////////////////////////////////////////////////////////////////
// Project Name: CoCo3FPGA Version 5.x.x
// File Name: Cassette_Write.sv
//
// CoCo3 in an FPGA
//
////////////////////////////////////////////////////////////////////////////////
//
////////////////////////////////////////////////////////////////////////////////
//
// Color Computer 3 compatible system on a chip
//
//
// Copyright (c) 2008 Gary Becker ([email protected])
//
// All rights reserved
//
// Redistribution and use in source and synthezised forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// Redistributions in synthesized form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// Neither the name of the author nor the names of other contributors may
// be used to endorse or promote products derived from this software without
// specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
// Please report bugs to the author, but before you do so, please
// make sure that this is not a derivative work and that
// you have the latest version of this file.
//
//
////////////////////////////////////////////////////////////////////////////////
// Stan Hodge
//
// Cassette_Write by Stan Hodge 03/18/24
////////////////////////////////////////////////////////////////////////////////
module Cassette_Write(
input RESET_N,
input CLK,
input CLK_1_78,
input CASS_REWIND_RECORD,
input MOTOR_ON,
input [5:0] DTOA_CODE,
// SD block level interface
input img_mounted, // signaling that new image has been mounted
input img_readonly, // mounted as read only. valid only for active bit in img_mounted
input [63:0] img_size, // size of image in bytes.
output [31:0] sd_lba,
output [5:0] sd_blk_cnt, // number of blocks-1, total size ((sd_blk_cnt+1)*(1<<(BLKSZ+7))) must be <= 16384!
output reg sd_rd,
output reg sd_wr,
input sd_ack,
// SD byte level access. Signals for 2-PORT altsyncram.
input [8:0] sd_buff_addr,
input [7:0] sd_buff_dout,
output [7:0] sd_buff_din,
input sd_buff_wr
);
assign sd_blk_cnt = 6'd0;
// Create 16x sample clock for the 2400 Baud rate...
// ~26us based on 1.78Mhz [562 ns]- divide by 46....
// Generate 1.78 Mhz [enable] GP clk
reg clk_sample;
reg [5:0] clk_sample_ctr;
localparam Divide_Rate = 6'd45;
always @ (negedge CLK or negedge RESET_N)
begin
if(!RESET_N)
begin
clk_sample <= 1'b0;
clk_sample_ctr <= 6'b000000;
end
else
begin
clk_sample <= 1'b0;
if (CLK_1_78)
begin
clk_sample_ctr <= clk_sample_ctr + 1'b1;
if (clk_sample_ctr == Divide_Rate)
begin
clk_sample <= 1'b1;
clk_sample_ctr <= 6'b000000;
end
end
end
end
// Mounted SD Image [for the cass]
reg drive_wp;
reg [31:0] drive_size;
always @(negedge img_mounted)
begin
drive_wp <= img_readonly;
drive_size <= img_size[31:0]; //Size / 256 on [31:8]
end
// Byte Receiver
reg [15:0] incomming_reg;
reg [5:0] bit_time;
reg [2:0] bit_count;
reg wave_negative;
localparam time_out = 6'h3f;
localparam wave_zero_level = 6'd32;
localparam bit_time_1 = 6'd22;
//localparam sync = 15'b010_1010_1001_1110; // Pre shift $553C
localparam sync = 15'b0111_1000_1010_101; // Pre shift $553C [L -> R]
localparam sync_proper = 8'h3C;
localparam leader = 8'h55;
localparam pre_rollover = 9'h1FF;
localparam rollover = 9'h000;
reg byte_clk;
reg look_for_sync;
reg flush_end, flush_end_que;
reg sd_hold;
reg pre_roll;
reg [7:0] blk_type;
wire [8:0] buf_address;
wire [7:0] buf_data_in;
wire [7:0] buf_data_out;
wire buf_write;
reg [7:0] protocol_data_count;
localparam st_beg0 = 4'd0;
localparam st_start = 4'd1;
localparam st_st1 = 4'd2;
localparam st_st2 = 4'd3;
localparam st_st3 = 4'd4;
localparam st_wr = 4'd5;
localparam st_wr1 = 4'd6;
reg [3:0] st_state;
reg [3:0] state_stack;
localparam p_sync = 3'd0;
localparam p_blk_type = 3'd1;
localparam p_len = 3'd2;
localparam p_dta = 3'd3;
localparam p_cksum = 3'd4;
reg [2:0] p_state;
localparam sd_wr_st = 2'd0;
localparam sd_wr_st1 = 2'd1;
localparam sd_wr_st2 = 2'd2;
reg [1:0] sd_wr_state;
always @ (negedge CLK or negedge RESET_N)
begin
if(!RESET_N)
begin
buf_address <= 9'b000000000;
byte_clk <= 1'b0;
bit_count <= 3'b000;
incomming_reg <= 16'h0000;
bit_time <= 6'b000000;
wave_negative <= 1'b0;
look_for_sync <= 1'b1;
buf_write <= 1'b0;
st_state <= st_beg0;
p_state <= p_sync;
flush_end <= 1'b0;
flush_end_que <= 1'b0;
sd_lba <= 32'd0;
sd_wr <= 1'b0;
sd_rd <= 1'b0;
sd_wr_state <= sd_wr_st;
sd_hold <= 1'b0;
pre_roll <= 1'b0;
end
else
begin
// Synchronus Clears
if (!MOTOR_ON)
begin
// Receiver Resets
byte_clk <= 1'b0;
bit_count <= 3'b000;
incomming_reg <= 16'h0000;
bit_time <= 6'b000000;
wave_negative <= 1'b0;
look_for_sync <= 1'b1;
end
if (!CASS_REWIND_RECORD)
begin
// Eject Tape
byte_clk <= 1'b0;
bit_count <= 3'b000;
incomming_reg <= 16'h0000;
bit_time <= 6'b000000;
wave_negative <= 1'b0;
look_for_sync <= 1'b1;
st_state <= st_beg0;
p_state <= p_sync;
buf_write <= 1'b0;
flush_end <= 1'b0;
flush_end_que <= 1'b0;
sd_lba <= 32'd0;
sd_wr <= 1'b0;
sd_rd <= 1'b0;
sd_wr_state <= sd_wr_st;
sd_hold <= 1'b0;
pre_roll <= 1'b0;
end
byte_clk <= 1'b0;
// 2400/1200 baud receiver
if (clk_sample)
begin
if (DTOA_CODE < wave_zero_level)
wave_negative <= 1'b1;
else
wave_negative <= 1'b0;
bit_time <= bit_time + 1'b1;
// Zero crossing detect
if ((DTOA_CODE >= wave_zero_level) && wave_negative)
begin
// Initially we are not collecting the leader bytes just collecting them and
// waiting for the sync $$553C. The write to file stage will automatically
// write the 128 leader bytes befor we start transfering data.
if (!look_for_sync)
begin
bit_count <= bit_count + 1'b1;
if (bit_count == 3'b111)
byte_clk <= 1'b1;
end
// Shift
incomming_reg[14:0] <= incomming_reg[15:1];
if (bit_time < bit_time_1)
incomming_reg[15] <= 1'b1;
else
begin
incomming_reg[15] <= 1'b0;
if (incomming_reg[15:1] == sync)
begin
look_for_sync <= 1'b0;
byte_clk <= 1'b1;
end
end
bit_time <= 6'b000000;
end
end
// Normal clocking starts here
case(st_state)
st_beg0:
begin
// When we start we write 128 bytes of leader to the buffer
// before we start with the protocol stuff
if (MOTOR_ON)
begin
buf_address <= 9'b000000000;
buf_data_in <= leader;
protocol_data_count <= 8'h7f; // We will use this to count the 128 bytes
st_state <= st_start;
end
end
st_start:
begin
state_stack <= st_start; // We come back here
st_state <= st_wr; // Write a byte
protocol_data_count <= protocol_data_count - 1'b1;
if (protocol_data_count == 8'h00) // 128 bytes
begin
st_state <= st_st1; // No, don't write any more - were done
end
end
st_st1:
begin
if (byte_clk)
begin
case(p_state)
p_sync:
begin
if (incomming_reg[15:8] == sync_proper)
begin
buf_data_in <= incomming_reg[15:8];
state_stack <= st_st1; // We come back here
st_state <= st_wr; // Write a byte
p_state <= p_blk_type;
end
end
p_blk_type:
begin
buf_data_in <= incomming_reg[15:8];
blk_type <= incomming_reg[15:8];
state_stack <= st_st1; // We come back here
st_state <= st_wr; // Write a byte
p_state <= p_len;
end
p_len:
begin
buf_data_in <= incomming_reg[15:8];
protocol_data_count <= incomming_reg[15:8];
state_stack <= st_st1; // We come back here
st_state <= st_wr; // Write a byte
if (incomming_reg[15:8] == 8'h00)
p_state <= p_cksum;
else
p_state <= p_dta;
end
p_dta:
begin
buf_data_in <= incomming_reg[15:8];
protocol_data_count <= protocol_data_count - 1'b1;
state_stack <= st_st1; // We come back here
st_state <= st_wr; // Write a byte
p_state <= p_dta;
if (protocol_data_count == 8'h01)
p_state <= p_cksum;
end
p_cksum:
begin
buf_data_in <= incomming_reg[15:8];
look_for_sync <= 1'b1;
if (blk_type == 8'hff)
begin
flush_end_que <= 1'b1;
state_stack <= st_st1; // We come back here [close it]
end
else
state_stack <= st_st2; // We come back here [next block]
st_state <= st_wr; // Write a byte
p_state <= p_sync;
end
default:;
endcase
end
end
st_st2:
begin
buf_data_in <= leader;
if (blk_type == 8'h00)
protocol_data_count <= 8'h7f; // We will use this to count the 128 bytes
else
protocol_data_count <= 8'h01; // We will use this to count the 128 bytes
st_state <= st_start; // No, don't write any more - were done
end
st_st3:
begin
state_stack <= st_st3; // We come back here
st_state <= st_wr; // Write a byte
protocol_data_count <= protocol_data_count - 1'b1;
if (protocol_data_count == 8'h00) // 128 bytes
begin
st_state <= st_st1; // No, don't write any more - were done
end
end
// Perform the byte writes to the buffer
// This acts like a sub routine....
st_wr:
begin
if (!sd_hold)
begin
buf_write <= 1'b1;
st_state <= st_wr1;
end
end
st_wr1:
begin
buf_address <= buf_address + 1'b1;
buf_write <= 1'b0;
flush_end <= flush_end_que;
flush_end_que <= 1'b0;
st_state <= state_stack;
end
default:;
endcase
// Handle SD buf clear
case(sd_wr_state)
sd_wr_st:
begin
if (buf_address == pre_rollover)
pre_roll <= 1'b1; // Stop writing to buffer
if ((buf_address == rollover) & pre_roll) // If buffer full - write it to SD
begin
pre_roll <= 1'b0;
sd_wr <= 1'b1;
sd_wr_state <= sd_wr_st1;
sd_hold <= 1'b1; // Hold writes
end
if (flush_end) // Write remainder of the buffer at th end...
begin
sd_wr <= 1'b1;
flush_end <= 1'b0;
sd_hold <= 1'b1;
sd_wr_state <= sd_wr_st1;
end
end
sd_wr_st1:
begin
if (sd_ack)
begin
sd_wr <= 1'b0;
sd_wr_state <= sd_wr_st2;
end
end
sd_wr_st2:
begin
if (!sd_ack)
begin
sd_hold <= 1'b0;
sd_lba <= sd_lba + 1'b1;
sd_wr_state <= sd_wr_st;
end
end
default:;
endcase
end
end
cass_dpram cas_wr_buff
(
.clock(CLK),
.address_a(sd_buff_addr),
.data_a(sd_buff_dout),
.wren_a(sd_buff_wr),
.q_a(sd_buff_din),
.address_b(buf_address),
.data_b(buf_data_in),
.wren_b(buf_write),
.q_b(buf_data_out)
);
endmodule
module cass_dpram
(
input clock,
input [8:0] address_a,
input [7:0] data_a,
input wren_a,
output reg [7:0] q_a,
input [8:0] address_b,
input [7:0] data_b,
input wren_b,
output reg [7:0] q_b
);
logic [7:0] ram[0:511];
always_ff@(posedge clock) begin
if(wren_a) begin
ram[address_a] <= data_a;
q_a <= data_a;
end else begin
q_a <= ram[address_a];
end
end
always_ff@(posedge clock) begin
if(wren_b) begin
ram[address_b] <= data_b;
q_b <= data_b;
end else begin
q_b <= ram[address_b];
end
end
endmodule
+636 -177
View File
@@ -1,8 +1,87 @@
////////////////////////////////////////////////////////////////////////////////
// Project Name: CoCo3FPGA Version 5.x.x
// File Name: Mister_Video.v
//
// CoCo3 in an FPGA
//
// Revision: 4.0 07/10/16
////////////////////////////////////////////////////////////////////////////////
// MESS Artifact function supplied by Brandan Donahe given to Gary Becker
//
////////////////////////////////////////////////////////////////////////////////
//
// Color Computer 3 compatible system on a chip
//
// Version : 5.x
//
// Copyright (c) 2008 Gary Becker ([email protected])
//
// All rights reserved
//
// Redistribution and use in source and synthezised forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// Redistributions in synthesized form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// Neither the name of the author nor the names of other contributors may
// be used to endorse or promote products derived from this software without
// specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
// Please report bugs to the author, but before you do so, please
// make sure that this is not a derivative work and that
// you have the latest version of this file.
//
// The latest version of this file can be found at:
// http://groups.yahoo.com/group/CoCo3FPGA
//
// File history :
//
// 1.0 Full Release
// 2.0 Partial Release
// 3.0 Full Release
// 3.0.0.1 Update to fix DoD interrupt issue
// 3.0.1.0 Update to fix 32/40 CoCO3 Text issue and add 2 Meg max memory
// 4.0.X.X Full Release
// 5.0.x.x Full Release
////////////////////////////////////////////////////////////////////////////////
// Gary Becker
// [email protected]
////////////////////////////////////////////////////////////////////////////////
// MISTer Conversion by Stan Hodge and Alan Steremberg (& Gary Becker)
// [email protected]
////////////////////////////////////////////////////////////////////////////////
// 640 256 Color Modes
// `define color_640_256
// 256 Color Modes
`define color_256
// Artifacts (Choose one)
// `define no_arti
// `define simple_arti
`define mess_arti
module COCO3VIDEO(
// Clocks / RESET
MASTER_CLK,
PIX_CLK,
RESET_N,
// Video Out
COLOR,
HSYNC_N,
@@ -44,7 +123,8 @@ ROM_DATA1,
HBORDER,
VBORDER,
HBORDER_INT,
VBORDER_INT
VBORDER_INT,
art
);
input MASTER_CLK;
@@ -97,6 +177,8 @@ reg HBORDER_INT;
output VBORDER_INT;
reg VBORDER_INT;
input [1:0] art;
//reg HBLANKING;
reg [9:0] LINE;
reg [3:0] VLPR;
@@ -142,12 +224,15 @@ wire [7:0] PIXEL_X;
reg [24:0] ROW_ADD;
wire [24:0] OFFSET;
reg HBORDER;
wire [9:0] BORDER;
wire [9:0] CCOLOR;
wire [7:0] BORDER;
wire [8:0] CCOLOR;
wire MODE6;
wire SG6_ENABLE;
//reg [1:0] HISTORY;
//reg [1:0] FUTURE;
reg [3:0] HISTORY_TMP;
reg [3:0] HISTORY;
reg [2:0] FUTURE_TMP;
reg [2:0] FUTURE;
wire [8:0] BUF_ADD_BASE;
//reg [353:0] VSYNC_DELAY;
//reg VBLANKING;
@@ -286,17 +371,17 @@ always @ (negedge MASTER_CLK)
|({COCO1,BP,HRES[3],HRES[2],HRES[1]}==5'b01001))) //CoCo3 32/40 bytes/line
begin
CHAR_LATCH_0_TMP <= {8'h00,CHAR_LATCH_0_TMP[15:8]};
// HISTORY <= CHAR_LATCH_0_TMP[1:0];
// FUTURE <= CHAR_LATCH_1_TMP[7:6];
HISTORY_TMP <= CHAR_LATCH_0_TMP[3:0];
FUTURE_TMP <= CHAR_LATCH_1_TMP[7:6];
end
else
begin
CHAR_LATCH_0_TMP <= RAM_DATA[15:0]; // Everything else
// FUTURE <= RAM_DATA[15:14];
// if (HBLANKING)
// HISTORY <= {VID_CONT[3],VID_CONT[3]}; // First history after hblanking depends on the border
// else
// HISTORY <= CHAR_LATCH_0_TMP[1:0]; // After that, it is the last two pixels
FUTURE_TMP <= RAM_DATA[15:14];
if (HBLANKING)
HISTORY_TMP <= 4'b1111; // First history after hblanking depends on the border
else
HISTORY_TMP <= CHAR_LATCH_0_TMP[1:0]; // After that, it is the last two pixels
end
end
end
@@ -365,6 +450,8 @@ always @ (negedge MASTER_CLK)
CHARACTER0 <= CHARACTER3;
CHARACTER1 <= CHARACTER1_TMP;
CHARACTER2 <= CHARACTER4;
FUTURE <= FUTURE_TMP;
HISTORY <= HISTORY_TMP;
end
endcase
@@ -391,8 +478,290 @@ assign CHARACTER4 = ({COCO1,BP,CRES[0],CHAR_LATCH_1_TMP[15],BLINK} == 5'b00
({COCO1,BP,CRES[0],CHAR_LATCH_1_TMP[14],UNDERLINE} == 5'b00111) ? 8'h7E: // Underline
CHARACTER2_TMP; // Normal Video
`ifdef mess_arti
// This should be easy to convert to ROM
function [7:0] messArtifactPalette(
input [5:0] VGAPixel6_delay6,
input hcount_VGA,
input sw_artifact_swap,
input CSS);
reg [7:0] color;
reg [7:0] a0;
reg [7:0] a1;
reg [7:0] a2;
reg [7:0] a3;
reg [7:0] a4;
reg [7:0] a5;
reg [7:0] a6;
reg [7:0] a7;
reg [7:0] a8;
reg [7:0] a9;
reg [7:0] a10;
reg [7:0] a11;
reg [7:0] a12;
reg [7:0] a13;
reg [7:0] a14;
reg [7:0] a15;
if (!CSS)
begin
if(!sw_artifact_swap)
begin
a0 = 8'h01;//01
a1 = 8'h08;//08
a2 = 8'h08;//08
a3 = 8'h49;//48
a4 = 8'h48;//49
a5 = 8'h08;//01
a6 = 8'h08;//01
a7 = 8'h41;//40
a8 = 8'h40;//41
a9 = 8'h40;//48
a10 = 8'h48;//40
a11 = 8'h49;//49
a12 = 8'h49;//49
a13 = 8'h08;//08
a14 = 8'h08;//08
a15 = 8'h49;//49
end
else
// | |X X X X XX XX XXX
begin // R G B|R G B|R G B|R G B RRRRR GGGGG BBBBB
a0 = 8'h01; // 0 0 0 0 0 0 0 1 0 0 0 0 00000_00100_00000
a1 = 8'h08; // 0 0 0 0 1 0 0 0 0 0 0 0 00000_01000_00000
a2 = 8'h08; // 0 0 0 0 1 0 0 0 0 0 0 0 00000_01000_00000
a3 = 8'h48; // 0 1 0 0 1 0 0 0 0 0 0 0 00000_11000_00000
a4 = 8'h49; // 0 1 0 0 1 0 0 1 0 0 0 0 00000_11100_00000
a5 = 8'h08; // 0 0 0 0 1 0 0 0 0 0 0 0 00000_01000_00000 [fixed my SH 2/4/24]
a6 = 8'h08; // 0 0 0 0 1 0 0 0 0 0 0 0 00000_01000_00000 [fixed my SH 2/4/24]
a7 = 8'h40; // 0 1 0 0 0 0 0 0 0 0 0 0 00000_10000_00000
a8 = 8'h41; // 0 1 0 0 0 0 0 1 0 0 0 0 00000_10100_00000
a9 = 8'h48; // 0 1 0 0 1 0 0 0 0 0 0 0 00000_11000_00000
a10 = 8'h40;// 0 1 0 0 0 0 0 0 0 0 0 0 00000_10000_00000
a11 = 8'h49;// 0 1 0 0 1 0 0 1 0 0 0 0 00000_11100_00000
a12 = 8'h49;// 0 1 0 0 1 0 0 1 0 0 0 0 00000_11100_00000
a13 = 8'h08;// 0 0 0 0 1 0 0 0 0 0 0 0 00000_01000_00000
a14 = 8'h08;// 0 0 0 0 1 0 0 0 0 0 0 0 00000_01000_00000
a15 = 8'h49;// 0 1 0 0 1 0 0 1 0 0 0 0 00000_11100_00000
end
end
else
begin
if(!sw_artifact_swap)
begin
a0 = 8'h00;//00
a1 = 8'h01;//02
a2 = 8'h02;//01
a3 = 8'hFD;//FE
a4 = 8'hFE;//FD
a5 = 8'h13;//21
a6 = 8'h21;//13
a7 = 8'hDE;//76
a8 = 8'h76;//DE
a9 = 8'h64;//93
a10 = 8'h9E;//64
a11 = 8'hDF;//FD
a12 = 8'hFD;//DF
a13 = 8'h02;//00
a14 = 8'h00;//02
a15 = 8'hFF;//FF
end
else
// | |X X X X XX XX XXX
begin // R G B|R G B|R G B|R G B RRRRR GGGGG BBBBB
a0 = 8'h00; // 0 0 0 0 0 0 0 0 0 0 0 0 00000_00000_00000
a1 = 8'h02; // 0 0 0 0 0 0 1 0 0 0 0 0 00100_00000_00100
a2 = 8'h01; // 0 0 0 0 0 0 0 1 0 0 0 0 00000_00100_00000
a3 = 8'hFE; // 1 1 1 1 1 1 1 0 0 0 0 0 11100_11000_11100
a4 = 8'hFD; // 1 1 1 1 1 1 0 1 0 0 0 0 11000_11100_11000
a5 = 8'h21; // 0 0 1 0 0 0 0 1 0 0 0 0 00000_00100_10100
a6 = 8'h13; // 0 0 0 1 0 0 1 1 0 0 0 0 01100_00100_00000
a7 = 8'h76; // 0 1 1 1 0 1 1 0 0 0 0 0 01100_10000_11100
a8 = 8'hDE; // 1 1 0 1 1 1 1 0 0 0 0 0 11100_11000_01000
a9 = 8'h9E; // 1 0 0 1 1 1 1 0 0 0 0 0 11100_01000_01000
a10 = 8'h64; // 0 1 1 0 0 1 0 0 0 0 0 0 00000_10000_11100
a11 = 8'hFD; // 1 1 1 1 1 1 0 1 0 0 0 0 11000_11100_11100
a12 = 8'hDF; // 1 1 0 1 1 1 1 1 0 0 0 0 11100_11100_01100
a13 = 8'h00; // 0 0 0 0 0 0 0 0 0 0 0 0 00000_00000_00100
a14 = 8'h02; // 0 0 0 0 0 0 1 0 0 0 0 0 00100_00000_00000
a15 = 8'hFF; // 1 1 1 1 1 1 1 1 0 0 0 0 11111_11111_11111
end
end
casex({VGAPixel6_delay6[5:0], hcount_VGA})
{6'b00000x, 1'bx}: color = a0; // 0, 1
{6'b000010, 1'b0}: color = a0; // 2
{6'b000010, 1'b1}: color = a6;
{6'b000011, 1'b0}: color = a0; // 3
{6'b000011, 1'b1}: color = a2;
{6'b00010x, 1'b0}: color = a5; // 4, 5
{6'b00010x, 1'b1}: color = a7;
{6'b000110, 1'b0}: color = a1; // 6
{6'b000110, 1'b1}: color = a3;
{6'b000111, 1'b0}: color = a1; // 7
{6'b000111, 1'b1}: color = a11;
{6'b001000, 1'b0}: color = a8; // 8
{6'b001000, 1'b1}: color = a6;
{6'b001001, 1'b0}: color = a8; // 9
{6'b001001, 1'b1}: color = a14;
{6'b00101x, 1'b0}: color = a8; // 10, 11
{6'b00101x, 1'b1}: color = a9;
{6'b001100, 1'bx}: color = a4; // 12
{6'b001101, 1'b0}: color = a4; // 13
{6'b001101, 1'b1}: color = a15;
{6'b001110, 1'bx}: color = a12; // 14
{6'b001111, 1'b0}: color = a12; // 15
{6'b001111, 1'b1}: color = a15;
{6'b01000x, 1'b0}: color = a5; // 16, 17
{6'b01000x, 1'b1}: color = a13;
{6'b010010, 1'b0}: color = a13; // 18
{6'b010010, 1'b1}: color = a0;
{6'b010011, 1'b0}: color = a13; // 19
{6'b010011, 1'b1}: color = a2;
{6'b01010x, 1'bx}: color = a10; // 20, 21
{6'b010110, 1'b0}: color = a10; // 22
{6'b010110, 1'b1}: color = a15;
{6'b010111, 1'b0}: color = a10; // 23
{6'b010111, 1'b1}: color = a11;
{6'b01100x, 1'b0}: color = a3; // 24, 25
{6'b01100x, 1'b1}: color = a1;
{6'b01101x, 1'b0}: color = a15; // 26, 27
{6'b01101x, 1'b1}: color = a9;
{6'b01110x, 1'bx}: color = a11; // 28, 29
{6'b01111x, 1'bx}: color = a15; // 30, 31
{6'b10000x, 1'b0}: color = a14; // 32, 33
{6'b10000x, 1'b1}: color = a0;
{6'b100010, 1'b0}: color = a14; // 34
{6'b100010, 1'b1}: color = a6;
{6'b100011, 1'b0}: color = a14; // 35
{6'b100011, 1'b1}: color = a2;
{6'b10010x, 1'b0}: color = a0; // 36, 37
{6'b10010x, 1'b1}: color = a7;
{6'b100110, 1'b0}: color = a1; // 38
{6'b100110, 1'b1}: color = a3;
{6'b100111, 1'b0}: color = a1; // 39
{6'b100111, 1'b1}: color = a11;
{6'b101000, 1'b0}: color = a9; // 40
{6'b101000, 1'b1}: color = a6;
{6'b101001, 1'b0}: color = a9; // 41
{6'b101001, 1'b1}: color = a14;
{6'b10101x, 1'bx}: color = a9; // 42, 43
{6'b101100, 1'b0}: color = a15; // 44
{6'b101100, 1'b1}: color = a4;
{6'b101101, 1'bx}: color = a15; // 45
{6'b101110, 1'bx}: color = a12; // 46
{6'b101111, 1'b0}: color = a12; // 47
{6'b101111, 1'b1}: color = a15;
{6'b11000x, 1'b0}: color = a2; // 48, 49
{6'b11000x, 1'b1}: color = a13;
{6'b110010, 1'b0}: color = a2; // 50
{6'b110010, 1'b1}: color = a0;
{6'b110011, 1'bx}: color = a2; // 51
{6'b11010x, 1'bx}: color = a10; // 52, 53
{6'b110110, 1'b0}: color = a10; // 54
{6'b110110, 1'b1}: color = a15;
{6'b110111, 1'b0}: color = a10; // 55
{6'b110111, 1'b1}: color = a11;
{6'b11100x, 1'b0}: color = a12; // 56, 57
{6'b11100x, 1'b1}: color = a1;
{6'b11101x, 1'b0}: color = a12; // 58, 59
{6'b11101x, 1'b1}: color = a9;
{6'b11110x, 1'b0}: color = a15; // 60, 61
{6'b11110x, 1'b1}: color = a11;
{6'b11111x, 1'bx}: color = a15; // 62, 63
endcase
messArtifactPalette = color;
endfunction
`endif
assign SG6_ENABLE = SWITCH & VID_CONT[0];
/*
Standard Palette Colors
RGB CMP
0 18 Green 18
1 54 Yellow 36
2 9 Blue 11
3 36 Red 7
4 63 Buff 63
5 27 Cyan 31
6 45 Magenta 9
7 38 Orange 38
8 0 Black 0
9 18 Green 18
10 0 Black 0
11 63 Buff 63
12 0 Black 0
13 18 Green 18
14 0 Black 0
15 38 Orange 38
*/
parameter C_WHT = 8'hFF;
parameter C_FGR = 8'h49;
assign PIXEL_X =
// CoCo1 Text
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3],SG6_ENABLE,CHAR_LATCH_0[7]} == 8'b00001000) ? {6'b000011,CSS,~CHARACTER0[7]}: // 12, 13, 14, 15
@@ -593,23 +962,6 @@ assign PIXEL_X =
// CoCo3 HR Text
// 32/40
// Pixel Set
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[7]} ==9'b000000011) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[7]} ==9'b000100011) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[6]} ==9'b001000011) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[6]} ==9'b001100011) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[5]} ==9'b010000011) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[5]} ==9'b010100011) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[4]} ==9'b011000011) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[4]} ==9'b011100011) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[3]} ==9'b100000011) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[3]} ==9'b100100011) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[2]} ==9'b101000011) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[2]} ==9'b101100011) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[1]} ==9'b110000011) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[1]} ==9'b110100011) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[0]} ==9'b111000011) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[0]} ==9'b111100011) ? {5'b00001,CHAR_LATCH_0[13:11]}:
// Pixel Clear
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[7]} ==9'b000000010) ? {5'b00000,CHAR_LATCH_0[10:8]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[7]} ==9'b000100010) ? {5'b00000,CHAR_LATCH_0[10:8]}:
@@ -627,24 +979,24 @@ assign PIXEL_X =
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[1]} ==9'b110100010) ? {5'b00000,CHAR_LATCH_0[10:8]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[0]} ==9'b111000010) ? {5'b00000,CHAR_LATCH_0[10:8]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[0]} ==9'b111100010) ? {5'b00000,CHAR_LATCH_0[10:8]}:
// 64/80
// Pixel Set
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[7]} ==9'b000000111) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[6]} ==9'b000100111) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[5]} ==9'b001000111) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[4]} ==9'b001100111) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[3]} ==9'b010000111) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[2]} ==9'b010100111) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[1]} ==9'b011000111) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[0]} ==9'b011100111) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER2[7]} ==9'b100000111) ? {5'b00001,CHAR_LATCH_1[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER2[6]} ==9'b100100111) ? {5'b00001,CHAR_LATCH_1[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER2[5]} ==9'b101000111) ? {5'b00001,CHAR_LATCH_1[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER2[4]} ==9'b101100111) ? {5'b00001,CHAR_LATCH_1[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER2[3]} ==9'b110000111) ? {5'b00001,CHAR_LATCH_1[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER2[2]} ==9'b110100111) ? {5'b00001,CHAR_LATCH_1[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER2[1]} ==9'b111000111) ? {5'b00001,CHAR_LATCH_1[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER2[0]} ==9'b111100111) ? {5'b00001,CHAR_LATCH_1[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[7]} ==9'b000000011) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[7]} ==9'b000100011) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[6]} ==9'b001000011) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[6]} ==9'b001100011) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[5]} ==9'b010000011) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[5]} ==9'b010100011) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[4]} ==9'b011000011) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[4]} ==9'b011100011) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[3]} ==9'b100000011) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[3]} ==9'b100100011) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[2]} ==9'b101000011) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[2]} ==9'b101100011) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[1]} ==9'b110000011) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[1]} ==9'b110100011) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[0]} ==9'b111000011) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[0]} ==9'b111100011) ? {5'b00001,CHAR_LATCH_0[13:11]}:
// 64/80
// Pixel Clear
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[7]} ==9'b000000110) ? {5'b00000,CHAR_LATCH_0[10:8]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[6]} ==9'b000100110) ? {5'b00000,CHAR_LATCH_0[10:8]}:
@@ -662,6 +1014,23 @@ assign PIXEL_X =
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER2[2]} ==9'b110100110) ? {5'b00000,CHAR_LATCH_1[10:8]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER2[1]} ==9'b111000110) ? {5'b00000,CHAR_LATCH_1[10:8]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER2[0]} ==9'b111100110) ? {5'b00000,CHAR_LATCH_1[10:8]}:
// Pixel Set
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[7]} ==9'b000000111) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[6]} ==9'b000100111) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[5]} ==9'b001000111) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[4]} ==9'b001100111) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[3]} ==9'b010000111) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[2]} ==9'b010100111) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[1]} ==9'b011000111) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER0[0]} ==9'b011100111) ? {5'b00001,CHAR_LATCH_0[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER2[7]} ==9'b100000111) ? {5'b00001,CHAR_LATCH_1[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER2[6]} ==9'b100100111) ? {5'b00001,CHAR_LATCH_1[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER2[5]} ==9'b101000111) ? {5'b00001,CHAR_LATCH_1[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER2[4]} ==9'b101100111) ? {5'b00001,CHAR_LATCH_1[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER2[3]} ==9'b110000111) ? {5'b00001,CHAR_LATCH_1[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER2[2]} ==9'b110100111) ? {5'b00001,CHAR_LATCH_1[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER2[1]} ==9'b111000111) ? {5'b00001,CHAR_LATCH_1[13:11]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[2],CRES[0],CHARACTER2[0]} ==9'b111100111) ? {5'b00001,CHAR_LATCH_1[13:11]}:
// Attribute less HR Text
// 32/40
@@ -825,137 +1194,207 @@ assign PIXEL_X =
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0]} == 9'b111111110) ? {5'h00,CSS,CHAR_LATCH_0[1:0]}:
// 2 color 256
//`ifdef no_arti
// No Artifacts
// Black/Green and Black/White
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH} == 10'b0000111110) ? {6'h02,CSS,CHAR_LATCH_0[7]}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH} == 10'b0001111110) ? {6'h02,CSS,CHAR_LATCH_0[7]}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH} == 10'b0010111110) ? {6'h02,CSS,CHAR_LATCH_0[6]}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH} == 10'b0011111110) ? {6'h02,CSS,CHAR_LATCH_0[6]}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH} == 10'b0100111110) ? {6'h02,CSS,CHAR_LATCH_0[5]}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH} == 10'b0101111110) ? {6'h02,CSS,CHAR_LATCH_0[5]}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH} == 10'b0110111110) ? {6'h02,CSS,CHAR_LATCH_0[4]}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH} == 10'b0111111110) ? {6'h02,CSS,CHAR_LATCH_0[4]}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH} == 10'b1000111110) ? {6'h02,CSS,CHAR_LATCH_0[3]}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH} == 10'b1001111110) ? {6'h02,CSS,CHAR_LATCH_0[3]}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH} == 10'b1010111110) ? {6'h02,CSS,CHAR_LATCH_0[2]}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH} == 10'b1011111110) ? {6'h02,CSS,CHAR_LATCH_0[2]}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH} == 10'b1100111110) ? {6'h02,CSS,CHAR_LATCH_0[1]}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH} == 10'b1101111110) ? {6'h02,CSS,CHAR_LATCH_0[1]}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH} == 10'b1110111110) ? {6'h02,CSS,CHAR_LATCH_0[0]}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH} == 10'b1111111110) ? {6'h02,CSS,CHAR_LATCH_0[0]}:
({CHAR_LATCH_0[7],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 12'b0_0000_1_1111_10) ? {1'b0, 1'b0, 1'b0, 1'b0, !CSS, 1'b0, 1'b0, 1'b0}:
({CHAR_LATCH_0[7],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 12'b0_0001_1_1111_10) ? {1'b0, 1'b0, 1'b0, 1'b0, !CSS, 1'b0, 1'b0, 1'b0}:
({CHAR_LATCH_0[6],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 12'b0_0010_1_1111_10) ? {1'b0, 1'b0, 1'b0, 1'b0, !CSS, 1'b0, 1'b0, 1'b0}:
({CHAR_LATCH_0[6],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 12'b0_0011_1_1111_10) ? {1'b0, 1'b0, 1'b0, 1'b0, !CSS, 1'b0, 1'b0, 1'b0}:
({CHAR_LATCH_0[5],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 12'b0_0100_1_1111_10) ? {1'b0, 1'b0, 1'b0, 1'b0, !CSS, 1'b0, 1'b0, 1'b0}:
({CHAR_LATCH_0[5],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 12'b0_0101_1_1111_10) ? {1'b0, 1'b0, 1'b0, 1'b0, !CSS, 1'b0, 1'b0, 1'b0}:
({CHAR_LATCH_0[4],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 12'b0_0110_1_1111_10) ? {1'b0, 1'b0, 1'b0, 1'b0, !CSS, 1'b0, 1'b0, 1'b0}:
({CHAR_LATCH_0[4],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 12'b0_0111_1_1111_10) ? {1'b0, 1'b0, 1'b0, 1'b0, !CSS, 1'b0, 1'b0, 1'b0}:
({CHAR_LATCH_0[3],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 12'b0_1000_1_1111_10) ? {1'b0, 1'b0, 1'b0, 1'b0, !CSS, 1'b0, 1'b0, 1'b0}:
({CHAR_LATCH_0[3],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 12'b0_1001_1_1111_10) ? {1'b0, 1'b0, 1'b0, 1'b0, !CSS, 1'b0, 1'b0, 1'b0}:
({CHAR_LATCH_0[2],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 12'b0_1010_1_1111_10) ? {1'b0, 1'b0, 1'b0, 1'b0, !CSS, 1'b0, 1'b0, 1'b0}:
({CHAR_LATCH_0[2],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 12'b0_1011_1_1111_10) ? {1'b0, 1'b0, 1'b0, 1'b0, !CSS, 1'b0, 1'b0, 1'b0}:
({CHAR_LATCH_0[1],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 12'b0_1100_1_1111_10) ? {1'b0, 1'b0, 1'b0, 1'b0, !CSS, 1'b0, 1'b0, 1'b0}:
({CHAR_LATCH_0[1],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 12'b0_1101_1_1111_10) ? {1'b0, 1'b0, 1'b0, 1'b0, !CSS, 1'b0, 1'b0, 1'b0}:
({CHAR_LATCH_0[0],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 12'b0_1110_1_1111_10) ? {1'b0, 1'b0, 1'b0, 1'b0, !CSS, 1'b0, 1'b0, 1'b0}:
({CHAR_LATCH_0[0],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 12'b0_1111_1_1111_10) ? {1'b0, 1'b0, 1'b0, 1'b0, !CSS, 1'b0, 1'b0, 1'b0}:
({CSS,CHAR_LATCH_0[7],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 13'b1_1_0000_1_1111_10) ? C_WHT:
({CSS,CHAR_LATCH_0[7],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 13'b1_1_0001_1_1111_10) ? C_WHT:
({CSS,CHAR_LATCH_0[6],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 13'b1_1_0010_1_1111_10) ? C_WHT:
({CSS,CHAR_LATCH_0[6],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 13'b1_1_0011_1_1111_10) ? C_WHT:
({CSS,CHAR_LATCH_0[5],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 13'b1_1_0100_1_1111_10) ? C_WHT:
({CSS,CHAR_LATCH_0[5],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 13'b1_1_0101_1_1111_10) ? C_WHT:
({CSS,CHAR_LATCH_0[4],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 13'b1_1_0110_1_1111_10) ? C_WHT:
({CSS,CHAR_LATCH_0[4],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 13'b1_1_0111_1_1111_10) ? C_WHT:
({CSS,CHAR_LATCH_0[3],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 13'b1_1_1000_1_1111_10) ? C_WHT:
({CSS,CHAR_LATCH_0[3],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 13'b1_1_1001_1_1111_10) ? C_WHT:
({CSS,CHAR_LATCH_0[2],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 13'b1_1_1010_1_1111_10) ? C_WHT:
({CSS,CHAR_LATCH_0[2],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 13'b1_1_1011_1_1111_10) ? C_WHT:
({CSS,CHAR_LATCH_0[1],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 13'b1_1_1100_1_1111_10) ? C_WHT:
({CSS,CHAR_LATCH_0[1],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 13'b1_1_1101_1_1111_10) ? C_WHT:
({CSS,CHAR_LATCH_0[0],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 13'b1_1_1110_1_1111_10) ? C_WHT:
({CSS,CHAR_LATCH_0[0],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 13'b1_1_1111_1_1111_10) ? C_WHT:
({CSS,CHAR_LATCH_0[7],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 13'b0_1_0000_1_1111_10) ? C_FGR:
({CSS,CHAR_LATCH_0[7],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 13'b0_1_0001_1_1111_10) ? C_FGR:
({CSS,CHAR_LATCH_0[6],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 13'b0_1_0010_1_1111_10) ? C_FGR:
({CSS,CHAR_LATCH_0[6],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 13'b0_1_0011_1_1111_10) ? C_FGR:
({CSS,CHAR_LATCH_0[5],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 13'b0_1_0100_1_1111_10) ? C_FGR:
({CSS,CHAR_LATCH_0[5],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 13'b0_1_0101_1_1111_10) ? C_FGR:
({CSS,CHAR_LATCH_0[4],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 13'b0_1_0110_1_1111_10) ? C_FGR:
({CSS,CHAR_LATCH_0[4],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 13'b0_1_0111_1_1111_10) ? C_FGR:
({CSS,CHAR_LATCH_0[3],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 13'b0_1_1000_1_1111_10) ? C_FGR:
({CSS,CHAR_LATCH_0[3],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 13'b0_1_1001_1_1111_10) ? C_FGR:
({CSS,CHAR_LATCH_0[2],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 13'b0_1_1010_1_1111_10) ? C_FGR:
({CSS,CHAR_LATCH_0[2],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 13'b0_1_1011_1_1111_10) ? C_FGR:
({CSS,CHAR_LATCH_0[1],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 13'b0_1_1100_1_1111_10) ? C_FGR:
({CSS,CHAR_LATCH_0[1],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 13'b0_1_1101_1_1111_10) ? C_FGR:
({CSS,CHAR_LATCH_0[0],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 13'b0_1_1110_1_1111_10) ? C_FGR:
({CSS,CHAR_LATCH_0[0],PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 13'b0_1_1111_1_1111_10) ? C_FGR:
//`endif
//`ifdef simple_arti
// Simple Artifacts
// CSS = 1 Artifacting black, orange, blue, and white
// CSS = 0 Artifacting black, orangeish, greenish, and green
// Both Bits Clear
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,CHAR_LATCH_0[7:6]} == 12'b000011111100) ? {8'h10}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,CHAR_LATCH_0[7:6]} == 12'b000111111100) ? {8'h10}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,CHAR_LATCH_0[7:6]} == 12'b001011111100) ? {8'h10}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,CHAR_LATCH_0[7:6]} == 12'b001111111100) ? {8'h10}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,CHAR_LATCH_0[5:4]} == 12'b010011111100) ? {8'h10}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,CHAR_LATCH_0[5:4]} == 12'b010111111100) ? {8'h10}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,CHAR_LATCH_0[5:4]} == 12'b011011111100) ? {8'h10}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,CHAR_LATCH_0[5:4]} == 12'b011111111100) ? {8'h10}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,CHAR_LATCH_0[3:2]} == 12'b100011111100) ? {8'h10}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,CHAR_LATCH_0[3:2]} == 12'b100111111100) ? {8'h10}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,CHAR_LATCH_0[3:2]} == 12'b101011111100) ? {8'h10}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,CHAR_LATCH_0[3:2]} == 12'b101111111100) ? {8'h10}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,CHAR_LATCH_0[1:0]} == 12'b110011111100) ? {8'h10}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,CHAR_LATCH_0[1:0]} == 12'b110111111100) ? {8'h10}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,CHAR_LATCH_0[1:0]} == 12'b111011111100) ? {8'h10}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,CHAR_LATCH_0[1:0]} == 12'b111111111100) ? {8'h10}:
//00 vs 08
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],CHAR_LATCH_0[7:6],art} == 13'b00001111100_01) ? {1'b0, 1'b0, 1'b0, 1'b0, !CSS, 1'b0, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],CHAR_LATCH_0[7:6],art} == 13'b00011111100_01) ? {1'b0, 1'b0, 1'b0, 1'b0, !CSS, 1'b0, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],CHAR_LATCH_0[7:6],art} == 13'b00101111100_01) ? {1'b0, 1'b0, 1'b0, 1'b0, !CSS, 1'b0, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],CHAR_LATCH_0[7:6],art} == 13'b00111111100_01) ? {1'b0, 1'b0, 1'b0, 1'b0, !CSS, 1'b0, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],CHAR_LATCH_0[5:4],art} == 13'b01001111100_01) ? {1'b0, 1'b0, 1'b0, 1'b0, !CSS, 1'b0, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],CHAR_LATCH_0[5:4],art} == 13'b01011111100_01) ? {1'b0, 1'b0, 1'b0, 1'b0, !CSS, 1'b0, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],CHAR_LATCH_0[5:4],art} == 13'b01101111100_01) ? {1'b0, 1'b0, 1'b0, 1'b0, !CSS, 1'b0, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],CHAR_LATCH_0[5:4],art} == 13'b01111111100_01) ? {1'b0, 1'b0, 1'b0, 1'b0, !CSS, 1'b0, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],CHAR_LATCH_0[3:2],art} == 13'b10001111100_01) ? {1'b0, 1'b0, 1'b0, 1'b0, !CSS, 1'b0, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],CHAR_LATCH_0[3:2],art} == 13'b10011111100_01) ? {1'b0, 1'b0, 1'b0, 1'b0, !CSS, 1'b0, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],CHAR_LATCH_0[3:2],art} == 13'b10101111100_01) ? {1'b0, 1'b0, 1'b0, 1'b0, !CSS, 1'b0, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],CHAR_LATCH_0[3:2],art} == 13'b10111111100_01) ? {1'b0, 1'b0, 1'b0, 1'b0, !CSS, 1'b0, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],CHAR_LATCH_0[1:0],art} == 13'b11001111100_01) ? {1'b0, 1'b0, 1'b0, 1'b0, !CSS, 1'b0, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],CHAR_LATCH_0[1:0],art} == 13'b11011111100_01) ? {1'b0, 1'b0, 1'b0, 1'b0, !CSS, 1'b0, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],CHAR_LATCH_0[1:0],art} == 13'b11101111100_01) ? {1'b0, 1'b0, 1'b0, 1'b0, !CSS, 1'b0, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],CHAR_LATCH_0[1:0],art} == 13'b11111111100_01) ? {1'b0, 1'b0, 1'b0, 1'b0, !CSS, 1'b0, 1'b0, 1'b0}:
// Both Bits Set
// Bits Set
// 2 Pixels means Green/White
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,CHAR_LATCH_0[7:6]} == 12'b000011111111) ? {3'h0, CSS, 4'hF}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,CHAR_LATCH_0[7:6]} == 12'b000111111111) ? {3'h0, CSS, 4'hF}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,CHAR_LATCH_0[7:6]} == 12'b001011111111) ? {3'h0, CSS, 4'hF}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,CHAR_LATCH_0[7:6]} == 12'b001111111111) ? {3'h0, CSS, 4'hF}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,CHAR_LATCH_0[5:4]} == 12'b010011111111) ? {3'h0, CSS, 4'hF}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,CHAR_LATCH_0[5:4]} == 12'b010111111111) ? {3'h0, CSS, 4'hF}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,CHAR_LATCH_0[5:4]} == 12'b011011111111) ? {3'h0, CSS, 4'hF}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,CHAR_LATCH_0[5:4]} == 12'b011111111111) ? {3'h0, CSS, 4'hF}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,CHAR_LATCH_0[3:2]} == 12'b100011111111) ? {3'h0, CSS, 4'hF}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,CHAR_LATCH_0[3:2]} == 12'b100111111111) ? {3'h0, CSS, 4'hF}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,CHAR_LATCH_0[3:2]} == 12'b101011111111) ? {3'h0, CSS, 4'hF}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,CHAR_LATCH_0[3:2]} == 12'b101111111111) ? {3'h0, CSS, 4'hF}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,CHAR_LATCH_0[1:0]} == 12'b110011111111) ? {3'h0, CSS, 4'hF}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,CHAR_LATCH_0[1:0]} == 12'b110111111111) ? {3'h0, CSS, 4'hF}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,CHAR_LATCH_0[1:0]} == 12'b111011111111) ? {3'h0, CSS, 4'hF}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,CHAR_LATCH_0[1:0]} == 12'b111111111111) ? {3'h0, CSS, 4'hF}:
// orig 0f vs 1f 0f=49 1f=ff
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],CHAR_LATCH_0[7:6],art} == 13'b00001111111_01) ? {CSS, 1'b1, CSS, CSS, 1'b1, CSS, CSS, 1'b1}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],CHAR_LATCH_0[7:6],art} == 13'b00011111111_01) ? {CSS, 1'b1, CSS, CSS, 1'b1, CSS, CSS, 1'b1}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],CHAR_LATCH_0[7:6],art} == 13'b00101111111_01) ? {CSS, 1'b1, CSS, CSS, 1'b1, CSS, CSS, 1'b1}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],CHAR_LATCH_0[7:6],art} == 13'b00111111111_01) ? {CSS, 1'b1, CSS, CSS, 1'b1, CSS, CSS, 1'b1}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],CHAR_LATCH_0[5:4],art} == 13'b01001111111_01) ? {CSS, 1'b1, CSS, CSS, 1'b1, CSS, CSS, 1'b1}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],CHAR_LATCH_0[5:4],art} == 13'b01011111111_01) ? {CSS, 1'b1, CSS, CSS, 1'b1, CSS, CSS, 1'b1}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],CHAR_LATCH_0[5:4],art} == 13'b01101111111_01) ? {CSS, 1'b1, CSS, CSS, 1'b1, CSS, CSS, 1'b1}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],CHAR_LATCH_0[5:4],art} == 13'b01111111111_01) ? {CSS, 1'b1, CSS, CSS, 1'b1, CSS, CSS, 1'b1}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],CHAR_LATCH_0[3:2],art} == 13'b10001111111_01) ? {CSS, 1'b1, CSS, CSS, 1'b1, CSS, CSS, 1'b1}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],CHAR_LATCH_0[3:2],art} == 13'b10011111111_01) ? {CSS, 1'b1, CSS, CSS, 1'b1, CSS, CSS, 1'b1}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],CHAR_LATCH_0[3:2],art} == 13'b10101111111_01) ? {CSS, 1'b1, CSS, CSS, 1'b1, CSS, CSS, 1'b1}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],CHAR_LATCH_0[3:2],art} == 13'b10111111111_01) ? {CSS, 1'b1, CSS, CSS, 1'b1, CSS, CSS, 1'b1}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],CHAR_LATCH_0[1:0],art} == 13'b11001111111_01) ? {CSS, 1'b1, CSS, CSS, 1'b1, CSS, CSS, 1'b1}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],CHAR_LATCH_0[1:0],art} == 13'b11011111111_01) ? {CSS, 1'b1, CSS, CSS, 1'b1, CSS, CSS, 1'b1}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],CHAR_LATCH_0[1:0],art} == 13'b11101111111_01) ? {CSS, 1'b1, CSS, CSS, 1'b1, CSS, CSS, 1'b1}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],CHAR_LATCH_0[1:0],art} == 13'b11111111111_01) ? {CSS, 1'b1, CSS, CSS, 1'b1, CSS, CSS, 1'b1}:
// Phase 1 Bits 01
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[7:6]} == 13'b0000111111101) ? {3'h0, CSS, 4'h9}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[7:6]} == 13'b0001111111101) ? {3'h0, CSS, 4'h9}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[7:6]} == 13'b0010111111101) ? {3'h0, CSS, 4'h9}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[7:6]} == 13'b0011111111101) ? {3'h0, CSS, 4'h9}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[5:4]} == 13'b0100111111101) ? {3'h0, CSS, 4'h9}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[5:4]} == 13'b0101111111101) ? {3'h0, CSS, 4'h9}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[5:4]} == 13'b0110111111101) ? {3'h0, CSS, 4'h9}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[5:4]} == 13'b0111111111101) ? {3'h0, CSS, 4'h9}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[3:2]} == 13'b1000111111101) ? {3'h0, CSS, 4'h9}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[3:2]} == 13'b1001111111101) ? {3'h0, CSS, 4'h9}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[3:2]} == 13'b1010111111101) ? {3'h0, CSS, 4'h9}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[3:2]} == 13'b1011111111101) ? {3'h0, CSS, 4'h9}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[1:0]} == 13'b1100111111101) ? {3'h0, CSS, 4'h9}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[1:0]} == 13'b1101111111101) ? {3'h0, CSS, 4'h9}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[1:0]} == 13'b1110111111101) ? {3'h0, CSS, 4'h9}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[1:0]} == 13'b1111111111101) ? {3'h0, CSS, 4'h9}:
// Bits = 01
// Phase = 1
// orig 09 vs 19 09=48 19=9e
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[7:6],art} == 14'b000011111101_01) ? {CSS, !CSS, 1'b0, CSS, 1'b1, CSS, CSS, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[7:6],art} == 14'b000111111101_01) ? {CSS, !CSS, 1'b0, CSS, 1'b1, CSS, CSS, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[7:6],art} == 14'b001011111101_01) ? {CSS, !CSS, 1'b0, CSS, 1'b1, CSS, CSS, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[7:6],art} == 14'b001111111101_01) ? {CSS, !CSS, 1'b0, CSS, 1'b1, CSS, CSS, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[5:4],art} == 14'b010011111101_01) ? {CSS, !CSS, 1'b0, CSS, 1'b1, CSS, CSS, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[5:4],art} == 14'b010111111101_01) ? {CSS, !CSS, 1'b0, CSS, 1'b1, CSS, CSS, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[5:4],art} == 14'b011011111101_01) ? {CSS, !CSS, 1'b0, CSS, 1'b1, CSS, CSS, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[5:4],art} == 14'b011111111101_01) ? {CSS, !CSS, 1'b0, CSS, 1'b1, CSS, CSS, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[3:2],art} == 14'b100011111101_01) ? {CSS, !CSS, 1'b0, CSS, 1'b1, CSS, CSS, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[3:2],art} == 14'b100111111101_01) ? {CSS, !CSS, 1'b0, CSS, 1'b1, CSS, CSS, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[3:2],art} == 14'b101011111101_01) ? {CSS, !CSS, 1'b0, CSS, 1'b1, CSS, CSS, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[3:2],art} == 14'b101111111101_01) ? {CSS, !CSS, 1'b0, CSS, 1'b1, CSS, CSS, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[1:0],art} == 14'b110011111101_01) ? {CSS, !CSS, 1'b0, CSS, 1'b1, CSS, CSS, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[1:0],art} == 14'b110111111101_01) ? {CSS, !CSS, 1'b0, CSS, 1'b1, CSS, CSS, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[1:0],art} == 14'b111011111101_01) ? {CSS, !CSS, 1'b0, CSS, 1'b1, CSS, CSS, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[1:0],art} == 14'b111111111101_01) ? {CSS, !CSS, 1'b0, CSS, 1'b1, CSS, CSS, 1'b0}:
// Phase 0 Bits 01
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[7:6]} == 13'b0000111111001) ? {3'h0, CSS, 4'hA}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[7:6]} == 13'b0001111111001) ? {3'h0, CSS, 4'hA}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[7:6]} == 13'b0010111111001) ? {3'h0, CSS, 4'hA}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[7:6]} == 13'b0011111111001) ? {3'h0, CSS, 4'hA}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[5:4]} == 13'b0100111111001) ? {3'h0, CSS, 4'hA}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[5:4]} == 13'b0101111111001) ? {3'h0, CSS, 4'hA}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[5:4]} == 13'b0110111111001) ? {3'h0, CSS, 4'hA}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[5:4]} == 13'b0111111111001) ? {3'h0, CSS, 4'hA}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[3:2]} == 13'b1000111111001) ? {3'h0, CSS, 4'hA}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[3:2]} == 13'b1001111111001) ? {3'h0, CSS, 4'hA}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[3:2]} == 13'b1010111111001) ? {3'h0, CSS, 4'hA}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[3:2]} == 13'b1011111111001) ? {3'h0, CSS, 4'hA}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[1:0]} == 13'b1100111111001) ? {3'h0, CSS, 4'hA}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[1:0]} == 13'b1101111111001) ? {3'h0, CSS, 4'hA}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[1:0]} == 13'b1110111111001) ? {3'h0, CSS, 4'hA}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[1:0]} == 13'b1111111111001) ? {3'h0, CSS, 4'hA}:
// Bits = 01
// Phase = 0
// orig 0a vs 1a 0a=40 1a=64
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[7:6],art} == 14'b000011111001_01) ? {1'b0, 1'b1, CSS, 1'b0, 1'b0, CSS, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[7:6],art} == 14'b000111111001_01) ? {1'b0, 1'b1, CSS, 1'b0, 1'b0, CSS, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[7:6],art} == 14'b001011111001_01) ? {1'b0, 1'b1, CSS, 1'b0, 1'b0, CSS, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[7:6],art} == 14'b001111111001_01) ? {1'b0, 1'b1, CSS, 1'b0, 1'b0, CSS, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[5:4],art} == 14'b010011111001_01) ? {1'b0, 1'b1, CSS, 1'b0, 1'b0, CSS, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[5:4],art} == 14'b010111111001_01) ? {1'b0, 1'b1, CSS, 1'b0, 1'b0, CSS, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[5:4],art} == 14'b011011111001_01) ? {1'b0, 1'b1, CSS, 1'b0, 1'b0, CSS, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[5:4],art} == 14'b011111111001_01) ? {1'b0, 1'b1, CSS, 1'b0, 1'b0, CSS, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[3:2],art} == 14'b100011111001_01) ? {1'b0, 1'b1, CSS, 1'b0, 1'b0, CSS, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[3:2],art} == 14'b100111111001_01) ? {1'b0, 1'b1, CSS, 1'b0, 1'b0, CSS, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[3:2],art} == 14'b101011111001_01) ? {1'b0, 1'b1, CSS, 1'b0, 1'b0, CSS, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[3:2],art} == 14'b101111111001_01) ? {1'b0, 1'b1, CSS, 1'b0, 1'b0, CSS, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[1:0],art} == 14'b110011111001_01) ? {1'b0, 1'b1, CSS, 1'b0, 1'b0, CSS, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[1:0],art} == 14'b110111111001_01) ? {1'b0, 1'b1, CSS, 1'b0, 1'b0, CSS, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[1:0],art} == 14'b111011111001_01) ? {1'b0, 1'b1, CSS, 1'b0, 1'b0, CSS, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[1:0],art} == 14'b111111111001_01) ? {1'b0, 1'b1, CSS, 1'b0, 1'b0, CSS, 1'b0, 1'b0}:
// Phase 1 Bits 10
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[7:6]} == 13'b0000111111110) ? {3'h0, CSS, 4'hA}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[7:6]} == 13'b0001111111110) ? {3'h0, CSS, 4'hA}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[7:6]} == 13'b0010111111110) ? {3'h0, CSS, 4'hA}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[7:6]} == 13'b0011111111110) ? {3'h0, CSS, 4'hA}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[5:4]} == 13'b0100111111110) ? {3'h0, CSS, 4'hA}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[5:4]} == 13'b0101111111110) ? {3'h0, CSS, 4'hA}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[5:4]} == 13'b0110111111110) ? {3'h0, CSS, 4'hA}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[5:4]} == 13'b0111111111110) ? {3'h0, CSS, 4'hA}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[3:2]} == 13'b1000111111110) ? {3'h0, CSS, 4'hA}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[3:2]} == 13'b1001111111110) ? {3'h0, CSS, 4'hA}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[3:2]} == 13'b1010111111110) ? {3'h0, CSS, 4'hA}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[3:2]} == 13'b1011111111110) ? {3'h0, CSS, 4'hA}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[1:0]} == 13'b1100111111110) ? {3'h0, CSS, 4'hA}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[1:0]} == 13'b1101111111110) ? {3'h0, CSS, 4'hA}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[1:0]} == 13'b1110111111110) ? {3'h0, CSS, 4'hA}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[1:0]} == 13'b1111111111110) ? {3'h0, CSS, 4'hA}:
// Bits = 10
// Phase = 1
// orig 0a vs 1a 0a=40 1a=64
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[7:6],art} == 14'b000011111110_01) ? {1'b0, 1'b1, CSS, 1'b0, 1'b0, CSS, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[7:6],art} == 14'b000111111110_01) ? {1'b0, 1'b1, CSS, 1'b0, 1'b0, CSS, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[7:6],art} == 14'b001011111110_01) ? {1'b0, 1'b1, CSS, 1'b0, 1'b0, CSS, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[7:6],art} == 14'b001111111110_01) ? {1'b0, 1'b1, CSS, 1'b0, 1'b0, CSS, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[5:4],art} == 14'b010011111110_01) ? {1'b0, 1'b1, CSS, 1'b0, 1'b0, CSS, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[5:4],art} == 14'b010111111110_01) ? {1'b0, 1'b1, CSS, 1'b0, 1'b0, CSS, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[5:4],art} == 14'b011011111110_01) ? {1'b0, 1'b1, CSS, 1'b0, 1'b0, CSS, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[5:4],art} == 14'b011111111110_01) ? {1'b0, 1'b1, CSS, 1'b0, 1'b0, CSS, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[3:2],art} == 14'b100011111110_01) ? {1'b0, 1'b1, CSS, 1'b0, 1'b0, CSS, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[3:2],art} == 14'b100111111110_01) ? {1'b0, 1'b1, CSS, 1'b0, 1'b0, CSS, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[3:2],art} == 14'b101011111110_01) ? {1'b0, 1'b1, CSS, 1'b0, 1'b0, CSS, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[3:2],art} == 14'b101111111110_01) ? {1'b0, 1'b1, CSS, 1'b0, 1'b0, CSS, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[1:0],art} == 14'b110011111110_01) ? {1'b0, 1'b1, CSS, 1'b0, 1'b0, CSS, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[1:0],art} == 14'b110111111110_01) ? {1'b0, 1'b1, CSS, 1'b0, 1'b0, CSS, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[1:0],art} == 14'b111011111110_01) ? {1'b0, 1'b1, CSS, 1'b0, 1'b0, CSS, 1'b0, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[1:0],art} == 14'b111111111110_01) ? {1'b0, 1'b1, CSS, 1'b0, 1'b0, CSS, 1'b0, 1'b0}:
// Phase 0 Bits 10
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[7:6]} == 13'b0000111111010) ? {3'h0, CSS, 4'h9}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[7:6]} == 13'b0001111111010) ? {3'h0, CSS, 4'h9}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[7:6]} == 13'b0010111111010) ? {3'h0, CSS, 4'h9}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[7:6]} == 13'b0011111111010) ? {3'h0, CSS, 4'h9}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[5:4]} == 13'b0100111111010) ? {3'h0, CSS, 4'h9}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[5:4]} == 13'b0101111111010) ? {3'h0, CSS, 4'h9}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[5:4]} == 13'b0110111111010) ? {3'h0, CSS, 4'h9}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[5:4]} == 13'b0111111111010) ? {3'h0, CSS, 4'h9}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[3:2]} == 13'b1000111111010) ? {3'h0, CSS, 4'h9}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[3:2]} == 13'b1001111111010) ? {3'h0, CSS, 4'h9}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[3:2]} == 13'b1010111111010) ? {3'h0, CSS, 4'h9}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[3:2]} == 13'b1011111111010) ? {3'h0, CSS, 4'h9}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[1:0]} == 13'b1100111111010) ? {3'h0, CSS, 4'h9}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[1:0]} == 13'b1101111111010) ? {3'h0, CSS, 4'h9}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[1:0]} == 13'b1110111111010) ? {3'h0, CSS, 4'h9}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],SWITCH,PHASE,CHAR_LATCH_0[1:0]} == 13'b1111111111010) ? {3'h0, CSS, 4'h9}:
// Bits = 10
// Phase = 0
// orig 09 vs 19 09=48 19=9e
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[7:6],art} == 14'b000011111010_01) ? {CSS, !CSS, 1'b0, CSS, 1'b1, CSS, CSS, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[7:6],art} == 14'b000111111010_01) ? {CSS, !CSS, 1'b0, CSS, 1'b1, CSS, CSS, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[7:6],art} == 14'b001011111010_01) ? {CSS, !CSS, 1'b0, CSS, 1'b1, CSS, CSS, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[7:6],art} == 14'b001111111010_01) ? {CSS, !CSS, 1'b0, CSS, 1'b1, CSS, CSS, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[5:4],art} == 14'b010011111010_01) ? {CSS, !CSS, 1'b0, CSS, 1'b1, CSS, CSS, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[5:4],art} == 14'b010111111010_01) ? {CSS, !CSS, 1'b0, CSS, 1'b1, CSS, CSS, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[5:4],art} == 14'b011011111010_01) ? {CSS, !CSS, 1'b0, CSS, 1'b1, CSS, CSS, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[5:4],art} == 14'b011111111010_01) ? {CSS, !CSS, 1'b0, CSS, 1'b1, CSS, CSS, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[3:2],art} == 14'b100011111010_01) ? {CSS, !CSS, 1'b0, CSS, 1'b1, CSS, CSS, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[3:2],art} == 14'b100111111010_01) ? {CSS, !CSS, 1'b0, CSS, 1'b1, CSS, CSS, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[3:2],art} == 14'b101011111010_01) ? {CSS, !CSS, 1'b0, CSS, 1'b1, CSS, CSS, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[3:2],art} == 14'b101111111010_01) ? {CSS, !CSS, 1'b0, CSS, 1'b1, CSS, CSS, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[1:0],art} == 14'b110011111010_01) ? {CSS, !CSS, 1'b0, CSS, 1'b1, CSS, CSS, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[1:0],art} == 14'b110111111010_01) ? {CSS, !CSS, 1'b0, CSS, 1'b1, CSS, CSS, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[1:0],art} == 14'b111011111010_01) ? {CSS, !CSS, 1'b0, CSS, 1'b1, CSS, CSS, 1'b0}:
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],PHASE,CHAR_LATCH_0[1:0],art} == 14'b111111111010_01) ? {CSS, !CSS, 1'b0, CSS, 1'b1, CSS, CSS, 1'b0}:
//`endif
//`ifdef mess_arti
//MESS Arti
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 11'b000011111_00) ? messArtifactPalette({HISTORY[1:0], CHAR_LATCH_0[7:4]}, 1'b0, !PHASE, CSS):
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 11'b000111111_00) ? messArtifactPalette({HISTORY[1:0], CHAR_LATCH_0[7:4]}, 1'b0, !PHASE, CSS):
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 11'b001011111_00) ? messArtifactPalette({HISTORY[1:0], CHAR_LATCH_0[7:4]}, 1'b1, !PHASE, CSS):
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 11'b001111111_00) ? messArtifactPalette({HISTORY[1:0], CHAR_LATCH_0[7:4]}, 1'b1, !PHASE, CSS):
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 11'b010011111_00) ? messArtifactPalette( CHAR_LATCH_0[7:2], 1'b0, !PHASE, CSS):
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 11'b010111111_00) ? messArtifactPalette( CHAR_LATCH_0[7:2], 1'b0, !PHASE, CSS):
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 11'b011011111_00) ? messArtifactPalette( CHAR_LATCH_0[7:2], 1'b1, !PHASE, CSS):
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 11'b011111111_00) ? messArtifactPalette( CHAR_LATCH_0[7:2], 1'b1, !PHASE, CSS):
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 11'b100011111_00) ? messArtifactPalette( CHAR_LATCH_0[5:0], 1'b0, !PHASE, CSS):
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 11'b100111111_00) ? messArtifactPalette( CHAR_LATCH_0[5:0], 1'b0, !PHASE, CSS):
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 11'b101011111_00) ? messArtifactPalette( CHAR_LATCH_0[5:0], 1'b1, !PHASE, CSS):
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 11'b101111111_00) ? messArtifactPalette( CHAR_LATCH_0[5:0], 1'b1, !PHASE, CSS):
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 11'b110011111_00) ? messArtifactPalette({ CHAR_LATCH_0[3:0], FUTURE[1:0]}, 1'b0, !PHASE, CSS):
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 11'b110111111_00) ? messArtifactPalette({ CHAR_LATCH_0[3:0], FUTURE[1:0]}, 1'b0, !PHASE, CSS):
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 11'b111011111_00) ? messArtifactPalette({ CHAR_LATCH_0[3:0], FUTURE[1:0]}, 1'b1, !PHASE, CSS):
({PIXEL_COUNT[3:0],COCO1,VID_CONT[3:0],art} == 11'b111111111_00) ? messArtifactPalette({ CHAR_LATCH_0[3:0], FUTURE[1:0]}, 1'b1, !PHASE, CSS):
//`endif
// CoCo3 Graphics
// 2 color 128/160 = 160/8 = 20
({PIXEL_COUNT[3:0],COCO1,BP,HRES[3:1],CRES} == 11'b00000100000) ? {7'h00,CHAR_LATCH_0[7]}:
@@ -1172,6 +1611,7 @@ assign PIXEL_X =
({PIXEL_COUNT[3:0],COCO1,BP,HRES[3:1],CRES} == 11'b11100110010) ? {4'h0,CHAR_LATCH_3[15:12]}:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[3:1],CRES} == 11'b11110110010) ? {4'h0,CHAR_LATCH_3[11:8]}:
`ifdef color_256
// 256 color 32/40 = 40/1 = 40
({PIXEL_COUNT[3:0],COCO1,BP,HRES[3:2],CRES} == 10'b0000010011) ? CHAR_LATCH_0[7:0]:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[3:2],CRES} == 10'b0001010011) ? CHAR_LATCH_0[7:0]:
@@ -1243,6 +1683,28 @@ assign PIXEL_X =
({PIXEL_COUNT[3:0],COCO1,BP,HRES[3:1],CRES} == 11'b11010110011) ? CHAR_LATCH_3[7:0]:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[3:1],CRES} == 11'b11100110011) ? CHAR_LATCH_3[15:8]:
({PIXEL_COUNT[3:0],COCO1,BP,HRES[3:1],CRES} == 11'b11110110011) ? CHAR_LATCH_3[15:8]:
`endif
//`ifdef color_640_256
// 256 color 512/640 = 640/1 = 640
// ({PIXEL_COUNT[3:0],COCO1,BP,HRES[3:1],CRES} == 11'b00000110111) ? CHAR_LATCH_0[7:0]:
// ({PIXEL_COUNT[3:0],COCO1,BP,HRES[3:1],CRES} == 11'b00010110111) ? CHAR_LATCH_0[15:8]:
// ({PIXEL_COUNT[3:0],COCO1,BP,HRES[3:1],CRES} == 11'b00100110111) ? CHAR_LATCH_1[7:0]:
// ({PIXEL_COUNT[3:0],COCO1,BP,HRES[3:1],CRES} == 11'b00110110111) ? CHAR_LATCH_1[15:8]:
// ({PIXEL_COUNT[3:0],COCO1,BP,HRES[3:1],CRES} == 11'b01000110111) ? CHAR_LATCH_2[7:0]:
// ({PIXEL_COUNT[3:0],COCO1,BP,HRES[3:1],CRES} == 11'b01010110111) ? CHAR_LATCH_2[15:8]:
// ({PIXEL_COUNT[3:0],COCO1,BP,HRES[3:1],CRES} == 11'b01100110111) ? CHAR_LATCH_3[7:0]:
// ({PIXEL_COUNT[3:0],COCO1,BP,HRES[3:1],CRES} == 11'b01110110111) ? CHAR_LATCH_3[15:8]:
// ({PIXEL_COUNT[3:0],COCO1,BP,HRES[3:1],CRES} == 11'b10000110111) ? CHAR_LATCH_4[7:0]:
// ({PIXEL_COUNT[3:0],COCO1,BP,HRES[3:1],CRES} == 11'b10010110111) ? CHAR_LATCH_4[15:8]:
// ({PIXEL_COUNT[3:0],COCO1,BP,HRES[3:1],CRES} == 11'b10100110111) ? CHAR_LATCH_5[7:0]:
// ({PIXEL_COUNT[3:0],COCO1,BP,HRES[3:1],CRES} == 11'b10110110111) ? CHAR_LATCH_5[15:8]:
// ({PIXEL_COUNT[3:0],COCO1,BP,HRES[3:1],CRES} == 11'b11000110111) ? CHAR_LATCH_6[7:0]:
// ({PIXEL_COUNT[3:0],COCO1,BP,HRES[3:1],CRES} == 11'b11010110111) ? CHAR_LATCH_6[15:8]:
// ({PIXEL_COUNT[3:0],COCO1,BP,HRES[3:1],CRES} == 11'b11100110111) ? CHAR_LATCH_7[7:0]:
// ({PIXEL_COUNT[3:0],COCO1,BP,HRES[3:1],CRES} == 11'b11110110111) ? CHAR_LATCH_7[15:8]:
//`endif
// Default, modes not implemented
8'h00;
@@ -1253,26 +1715,23 @@ assign PIXEL_X =
// Border depends on mode
assign BORDER =
// Real Borders
({COCO1,VID_CONT[3],CSS} == 3'b110) ? 10'h281: // Green
({COCO1,VID_CONT[3],CSS} == 3'b111) ? 10'h282: // White
({COCO1,VID_CONT[3]} == 2'b10) ? 10'h280: // Black
10'h010; // BDR_PAL
({COCO1,VID_CONT[3],CSS} == 3'b110) ? 8'h49: // Green rGb rGb rG (010 010 01)
({COCO1,VID_CONT[3],CSS} == 3'b111) ? 8'hFF: // White
({COCO1,VID_CONT[3]} == 2'b10) ? 8'h00: // Black
8'h10; // BDR_PAL
// Clock in Color
always @ (negedge MASTER_CLK)
if(PIX_CLK == 1'b0 && PIX_CLK_DELAY == 1'b1)
COLOR <= CCOLOR;
assign CCOLOR[9] = ({VBLANKING,HBLANKING,COCO1} == 3'b000) ? 1'b0: // CoCo3 No Artifacts
({VBLANKING,HBLANKING,COCO1,SWITCH} == 4'b0010) ? 1'b0: // CoCo1 No Artifacts
({VBLANKING,HBLANKING,COCO1,SWITCH} == 4'b0011) ? (VID_CONT == 4'b1111): // CoCo1 with simple artifacts depends on mode
({(VBORDER&HBORDER),(VBLANKING|HBLANKING)} == 2'b11) ? BORDER[9]: // Border
1'b1; // Retrace / Artifacting mode
assign CCOLOR[8] = ({VBLANKING,HBLANKING,COCO1} == 3'b000) ? ({BP,CRES} == 3'b111): // CoCo3 normal screen depends on 256 color mode
// ({VBLANKING,HBLANKING,COCO1} == 3'b001) ? ({VID_CONT[3:0],ARTI} == 6'b111101): //normal screen area in CoCo1 MESS Artifacting mode
({(VBORDER&HBORDER),(VBLANKING|HBLANKING)} == 2'b11) ? BORDER[8]: // Border
1'b0;
assign CCOLOR[8] = ({COCO1, (VBORDER&HBORDER),(VBLANKING|HBLANKING)} == 3'b111)? 1'b1: // CoCo1 Border
({COCO1, (VBORDER&HBORDER),(VBLANKING|HBLANKING)} == 3'b011)? 1'b0: // CoCo3 Border
({VBLANKING,HBLANKING,COCO1,VID_CONT[3:0]} == 7'b0011111) ? 1'b1: // CoCo1 Artifact mode
({VBLANKING,HBLANKING,COCO1} == 3'b001) ? 1'b0: // CoCo1
({VBLANKING,HBLANKING,COCO1,BP,CRES} == 6'b000111) ? 1'b1: // CoCo3 256 Color Modes
({VBLANKING,HBLANKING,COCO1} == 3'b000) ? 1'b0: // CoCo3
1'b1; // Retrace 256 color (Black)
assign CCOLOR[7] = ({VBLANKING,HBLANKING} == 2'b00) ? PIXEL_X[7]: // Normal screeen area
({(VBORDER&HBORDER),(VBLANKING|HBLANKING)} == 2'b11) ? BORDER[7]: // Border
File diff suppressed because it is too large. Load diff
+256 -257
View File
@@ -21,261 +21,260 @@ ADDRESS_RADIX=HEX;
DATA_RADIX=HEX;
CONTENT BEGIN
00 : 0000;
01 : 0008;
02 : 0010;
03 : 0018;
04 : 0020;
05 : 0028;
06 : 0030;
07 : 0038;
08 : 0040;
09 : 0048;
0A : 0050;
0B : 0058;
0C : 0060;
0D : 0068;
0E : 0070;
0F : 0078;
10 : 0080;
11 : 0088;
12 : 0090;
13 : 0098;
14 : 00A0;
15 : 00A8;
16 : 00B0;
17 : 00B8;
18 : 00C0;
19 : 00C8;
1A : 00D0;
1B : 00D8;
1C : 00E0;
1D : 00E8;
1E : 00F0;
1F : 00F8;
20 : 0100;
21 : 0108;
22 : 0110;
23 : 0118;
24 : 0120;
25 : 0128;
26 : 0130;
27 : 0138;
28 : 0140;
29 : 0148;
2A : 0150;
2B : 0158;
2C : 0160;
2D : 0168;
2E : 0170;
2F : 0178;
30 : 0180;
31 : 0188;
32 : 0190;
33 : 0198;
34 : 01A0;
35 : 01A8;
36 : 01B0;
37 : 01B8;
38 : 01C0;
39 : 01C8;
3A : 01D0;
3B : 01D8;
3C : 01E0;
3D : 01E8;
3E : 01F0;
3F : 01F8;
40 : 0000;
41 : 0009;
42 : 0012;
43 : 001B;
44 : 0024;
45 : 002D;
46 : 0036;
47 : 003F;
48 : 0048;
49 : 0201;
4A : 005A;
4B : 0213;
4C : 006C;
4D : 0225;
4E : 007E;
4F : 0237;
50 : 0090;
51 : 0099;
52 : 0402;
53 : 040B;
54 : 00B4;
55 : 00BD;
56 : 0426;
57 : 042F;
58 : 00D8;
59 : 0291;
5A : 044A;
5B : 0603;
5C : 00FC;
5D : 02B5;
5E : 046E;
5F : 0627;
60 : 0120;
61 : 0129;
62 : 0132;
63 : 013B;
64 : 0804;
65 : 080D;
66 : 0816;
67 : 081F;
68 : 0168;
69 : 0321;
6A : 017A;
6B : 0333;
6C : 084C;
6D : 0A05;
6E : 084E;
6F : 0A17;
70 : 01B0;
71 : 01B9;
72 : 0522;
73 : 052B;
74 : 0894;
75 : 089D;
76 : 0C06;
77 : 0C0F;
78 : 01F8;
79 : 03B1;
7A : 056A;
7B : 0723;
7C : 08DC;
7D : 0A95;
7E : 0C4E;
7F : 0E07;
80 : 0000;
81 : 0040;
82 : 0080;
83 : 00C0;
84 : 0100;
85 : 0140;
86 : 0180;
87 : 01C0;
88 : 0200;
89 : 0240;
8A : 0280;
8B : 02C0;
8C : 0300;
8D : 0340;
8E : 0380;
8F : 03C0;
90 : 0400;
91 : 0440;
92 : 0480;
93 : 04C0;
94 : 0500;
95 : 0540;
96 : 0580;
97 : 05C0;
98 : 0600;
99 : 0640;
9A : 0680;
9B : 06C0;
9C : 0700;
9D : 0740;
9E : 0780;
9F : 07C0;
A0 : 0800;
A1 : 0840;
A2 : 0880;
A3 : 08C0;
A4 : 0900;
A5 : 0940;
A6 : 0980;
A7 : 09C0;
A8 : 0A00;
A9 : 0A40;
AA : 0A80;
AB : 0AC0;
AC : 0B00;
AD : 0B40;
AE : 0B80;
AF : 0BC0;
B0 : 0C00;
B1 : 0C40;
B2 : 0C80;
B3 : 0CC0;
B4 : 0D00;
B5 : 0D40;
B6 : 0D80;
B7 : 0DC0;
B8 : 0E00;
B9 : 0E40;
BA : 0E80;
BB : 0EC0;
BC : 0F00;
BD : 0F40;
BE : 0F80;
BF : 0FC0;
C0 : 0000;
C1 : 0041;
C2 : 0082;
C3 : 00C3;
C4 : 0104;
C5 : 0145;
C6 : 0186;
C7 : 01C7;
C8 : 0208;
C9 : 0249;
CA : 028A;
CB : 02CB;
CC : 030C;
CD : 034D;
CE : 038E;
CF : 03CF;
D0 : 0410;
D1 : 0451;
D2 : 0492;
D3 : 04D3;
D4 : 0514;
D5 : 0555;
D6 : 0596;
D7 : 05D7;
D8 : 0618;
D9 : 0659;
DA : 069A;
DB : 06DB;
DC : 071C;
DD : 075D;
DE : 079E;
DF : 07DF;
E0 : 0820;
E1 : 0861;
E2 : 08A2;
E3 : 08E3;
E4 : 0924;
E5 : 0965;
E6 : 09A6;
E7 : 09E7;
E8 : 0A28;
E9 : 0A69;
EA : 0AAA;
EB : 0AEB;
EC : 0B2C;
ED : 0B6D;
EE : 0BAE;
EF : 0BEF;
F0 : 0C30;
F1 : 0C71;
F2 : 0CB2;
F3 : 0CF3;
F4 : 0D34;
F5 : 0D75;
F6 : 0DB6;
F7 : 0DF7;
F8 : 0E38;
F9 : 0E79;
FA : 0EBA;
FB : 0EFB;
FC : 0F3C;
FD : 0F7D;
FE : 0FBE;
FF : 0FFF;
000 : 0000;
001 : 0010;
002 : 0020;
003 : 0030;
004 : 0040;
005 : 0050;
006 : 0060;
007 : 0070;
008 : 0080;
009 : 0090;
00A : 00A0;
00B : 00B0;
00C : 00C0;
00D : 00D0;
00E : 00E0;
00F : 00F0;
010 : 0100;
011 : 0110;
012 : 0120;
013 : 0130;
014 : 0140;
015 : 0150;
016 : 0160;
017 : 0170;
018 : 0180;
019 : 0190;
01A : 01A0;
01B : 01B0;
01C : 01C0;
01D : 01D0;
01E : 01E0;
01F : 01F0;
020 : 0200;
021 : 0210;
022 : 0220;
023 : 0230;
024 : 0240;
025 : 0250;
026 : 0260;
027 : 0270;
028 : 0280;
029 : 0290;
02A : 02A0;
02B : 02B0;
02C : 02C0;
02D : 02D0;
02E : 02E0;
02F : 02F0;
030 : 0300;
031 : 0310;
032 : 0320;
033 : 0330;
034 : 0340;
035 : 0350;
036 : 0360;
037 : 0370;
038 : 0380;
039 : 0390;
03A : 03A0;
03B : 03B0;
03C : 03C0;
03D : 03D0;
03E : 03E0;
03F : 03F0;
040 : 0400;
041 : 0410;
042 : 0420;
043 : 0430;
044 : 0440;
045 : 0450;
046 : 0460;
047 : 0470;
048 : 0480;
049 : 0490;
04A : 04A0;
04B : 04B0;
04C : 04C0;
04D : 04D0;
04E : 04E0;
04F : 04F0;
050 : 0500;
051 : 0510;
052 : 0520;
053 : 0530;
054 : 0540;
055 : 0550;
056 : 0560;
057 : 0570;
058 : 0580;
059 : 0590;
05A : 05A0;
05B : 05B0;
05C : 05C0;
05D : 05D0;
05E : 05E0;
05F : 05F0;
060 : 0600;
061 : 0610;
062 : 0620;
063 : 0630;
064 : 0640;
065 : 0650;
066 : 0660;
067 : 0670;
068 : 0680;
069 : 0690;
06A : 06A0;
06B : 06B0;
06C : 06C0;
06D : 06D0;
06E : 06E0;
06F : 06F0;
070 : 0700;
071 : 0710;
072 : 0720;
073 : 0730;
074 : 0740;
075 : 0750;
076 : 0760;
077 : 0770;
078 : 0780;
079 : 0790;
07A : 07A0;
07B : 07B0;
07C : 07C0;
07D : 07D0;
07E : 07E0;
07F : 07F0;
080 : 0800;
081 : 0810;
082 : 0820;
083 : 0830;
084 : 0840;
085 : 0850;
086 : 0860;
087 : 0870;
088 : 0880;
089 : 0890;
08A : 08A0;
08B : 08B0;
08C : 08C0;
08D : 08D0;
08E : 08E0;
08F : 08F0;
090 : 0900;
091 : 0910;
092 : 0920;
093 : 0930;
094 : 0940;
095 : 0950;
096 : 0960;
097 : 0970;
098 : 0980;
099 : 0990;
09A : 09A0;
09B : 09B0;
09C : 09C0;
09D : 09D0;
09E : 09E0;
09F : 09F0;
0A0 : 0A00;
0A1 : 0A10;
0A2 : 0A20;
0A3 : 0A30;
0A4 : 0A40;
0A5 : 0A50;
0A6 : 0A60;
0A7 : 0A70;
0A8 : 0A80;
0A9 : 0A90;
0AA : 0AA0;
0AB : 0AB0;
0AC : 0AC0;
0AD : 0AD0;
0AE : 0AE0;
0AF : 0AF0;
0B0 : 0B00;
0B1 : 0B10;
0B2 : 0B20;
0B3 : 0B30;
0B4 : 0B40;
0B5 : 0B50;
0B6 : 0B60;
0B7 : 0B70;
0B8 : 0B80;
0B9 : 0B90;
0BA : 0BA0;
0BB : 0BB0;
0BC : 0BC0;
0BD : 0BD0;
0BE : 0BE0;
0BF : 0BF0;
0C0 : 0C00;
0C1 : 0C10;
0C2 : 0C20;
0C3 : 0C30;
0C4 : 0C40;
0C5 : 0C50;
0C6 : 0C60;
0C7 : 0C70;
0C8 : 0C80;
0C9 : 0C90;
0CA : 0CA0;
0CB : 0CB0;
0CC : 0CC0;
0CD : 0CD0;
0CE : 0CE0;
0CF : 0CF0;
0D0 : 0D00;
0D1 : 0D10;
0D2 : 0D20;
0D3 : 0D30;
0D4 : 0D40;
0D5 : 0D50;
0D6 : 0D60;
0D7 : 0D70;
0D8 : 0D80;
0D9 : 0D90;
0DA : 0DA0;
0DB : 0DB0;
0DC : 0DC0;
0DD : 0DD0;
0DE : 0DE0;
0DF : 0DF0;
0E0 : 0E00;
0E1 : 0E10;
0E2 : 0E20;
0E3 : 0E30;
0E4 : 0E40;
0E5 : 0E50;
0E6 : 0E60;
0E7 : 0E70;
0E8 : 0E80;
0E9 : 0E90;
0EA : 0EA0;
0EB : 0EB0;
0EC : 0EC0;
0ED : 0ED0;
0EE : 0EE0;
0EF : 0EF0;
0F0 : 0F00;
0F1 : 0F10;
0F2 : 0F20;
0F3 : 0F30;
0F4 : 0F40;
0F5 : 0F50;
0F6 : 0F60;
0F7 : 0F70;
0F8 : 0F80;
0F9 : 0F90;
0FA : 0FA0;
0FB : 0FB0;
0FC : 0FC0;
0FD : 0FD0;
0FE : 0FE0;
0FF : 0FF0;
END;
+199 -295
View File
@@ -146,21 +146,21 @@ input ioctl_wr,
input [15:0] ioctl_index,
// SD block level interface
input [5:0] img_mounted, // signaling that new image has been mounted
input [6:0] img_mounted, // signaling that new image has been mounted
input img_readonly, // mounted as read only. valid only for active bit in img_mounted
input [63:0] img_size, // size of image in bytes. 1MB MAX!
output [31:0] sd_lba[6],
output [5:0] sd_blk_cnt[6], // number of blocks-1, total size ((sd_blk_cnt+1)*(1<<(BLKSZ+7))) must be <= 16384!
output [31:0] sd_lba[7],
output [5:0] sd_blk_cnt[7], // number of blocks-1, total size ((sd_blk_cnt+1)*(1<<(BLKSZ+7))) must be <= 16384!
output reg [5:0] sd_rd,
output reg [5:0] sd_wr,
input [5:0] sd_ack,
output reg [6:0] sd_rd,
output reg [6:0] sd_wr,
input [6:0] sd_ack,
// SD byte level access. Signals for 2-PORT altsyncram.
input [8:0] sd_buff_addr,
input [7:0] sd_buff_dout,
output [7:0] sd_buff_din[6],
output [7:0] sd_buff_din[7],
input sd_buff_wr,
// GPIO
@@ -171,7 +171,7 @@ input EE_N,
input PHASE,
output [31:0] PROBE,
// Cassette
// Cassette Input linkage
output clk_Q_out,
output cas_relay,
input casdout,
@@ -201,7 +201,8 @@ input [64:0] RTC,
input F_Turbo,
input [2:0] turbo_speed,
output [2:0] assigned_turbo_speed,
input [2:0] Mem_Size
input [2:0] Mem_Size,
input [1:0] AUTO_MODE
);
@@ -314,7 +315,6 @@ wire [24:0] VIDEO_ADDRESS; // 8MB 17:0 for 512kb
wire FLASH_CE_S;
wire ENA_DSK;
wire ENA_ORCC;
wire ENA_DISK2;
wire ENA_PAK;
@@ -323,7 +323,6 @@ wire HDD_EN_DATA;
reg [1:0] MPI_SCS; // IO select
reg [1:0] MPI_CTS; // ROM select
reg [1:0] W_PROT;
reg SBS;
reg [11:0] SAM00; // 8MB 5:0 for 512kb
reg [11:0] SAM01;
@@ -378,10 +377,6 @@ reg [18:0] LEFT_BUF2;
reg [18:0] RIGHT_BUF2;
reg [7:0] ORCH_LEFT;
reg [7:0] ORCH_RIGHT;
reg [7:0] ORCH_LEFT_EXT;
reg [7:0] ORCH_RIGHT_EXT;
reg [7:0] ORCH_LEFT_EXT_BUF;
reg [7:0] ORCH_RIGHT_EXT_BUF;
reg DACLRCLK;
reg [5:0] DAC_STATE;
wire H_FLAG;
@@ -728,8 +723,8 @@ assign RAM_CS = (ADDRESS[15:0]== 16'hFFE8) ? 1'b1: // GART
(ADDRESS[15:0]== 16'hFFE9) ? 1'b1: // GART 2
({ADDRESS[15:8]}== 8'hFF) ? 1'b0: // Hardware (FF00-FFFF) always Excluded
({VEC_PAG_RAM, ADDRESS[15:8]} == 9'b111111110) ? 1'b1: // If VEC_PAG_RAM then include FEXX Secondary Vectors
ROM_SEL ? 1'b0: // Internal ROM
CART_SEL ? 1'b0: // Cart ROM
ROM_SEL ? 1'b0: // Internal ROMs
CART_SEL ? 1'b0: // External Cart
1'b1;
@@ -777,7 +772,6 @@ assign FLASH_ADDRESS = ENA_DSK ? {9'b000000100, ADDRESS[12:0]
//11 32 External
assign FLASH_CE_S = ROM_SEL ? 1'b1:
ENA_ORCC ? 1'b1:
ENA_DISK2 ? 1'b1:
ENA_PAK ? 1'b1:
ENA_DSK ? 1'b1:
@@ -833,9 +827,6 @@ COCO_ROM_CART CC3_ROM_CART(
wire SDC_EN_CS;
assign ENA_ORCC = ({CART_SEL, MPI_CTS} == 3'b100) ? 1'b1: // Orchestra-90CC C000-DFFF Slot 1
1'b0;
assign ENA_DISK2 = ({CART_SEL, MPI_CTS} == 3'b101) ? 1'b1: // Alternative Disk controller ROM up to 32K
1'b0;
@@ -906,22 +897,6 @@ assign DATA_IN =
RS232_EN ? DATA_RS232:
SLOT3_HW ? {5'b00000, ROM_BANK}:
// FF00, FF04, FF08, FF0C
//({ADDRESS[15:4], ADDRESS[1:0]} == 14'b11111111000000) ? DATA_REG1:
// FF01, FF05, FF09, FF0D
//({ADDRESS[15:4], ADDRESS[1:0]} == 14'b11111111000001) ? {!HSYNC1_IRQ_BUF[1], 3'b011, SEL[0], DDR1, HSYNC1_POL, HSYNC1_IRQ_INT}:
// FF02, FF06, FF0A, FF0E
//({ADDRESS[15:4], ADDRESS[1:0]} == 14'b11111111000010) ? DATA_REG2:
// FF03, FF07, FF0B, FF0F
//({ADDRESS[15:4], ADDRESS[1:0]} == 14'b11111111000011) ? {!VSYNC1_IRQ_BUF[1], 3'b011, SEL[1], DDR2, VSYNC1_POL, VSYNC1_IRQ_INT}:
// FF20, FF24, FF28, FF2C
//({ADDRESS[15:4], ADDRESS[1:0]} == 14'b11111111001000) ? DATA_REG3:
// FF21, FF25, FF29, FF2D
//({ADDRESS[15:4], ADDRESS[1:0]} == 14'b11111111001001) ? {4'b0011, CAS_MTR, DDR3, 2'b00}: // CD_POL, CD_INT}:
// FF22, FF26, FF2A, FF2E
//({ADDRESS[15:4], ADDRESS[1:0]} == 14'b11111111001010) ? DATA_REG4:
// FF23, FF27, FF2B, FF2F
//({ADDRESS[15:4], ADDRESS[1:0]} == 14'b11111111001011) ? {!CART1_FIRQ_BUF[1], 3'b011, SOUND_EN, DDR4, CART1_POL, CART1_FIRQ_INT}:
// FF00, FF04, FF08, FF0C
({ADDRESS[15:5], ADDRESS[1:0]} == 13'b1111111100000) ? DATA_REG1:
// FF01, FF05, FF09, FF0D
({ADDRESS[15:5], ADDRESS[1:0]} == 13'b1111111100001) ? {!HSYNC1_IRQ_BUF[1], 3'b011, SEL[0], DDR1, HSYNC1_POL, HSYNC1_IRQ_INT}:
@@ -930,13 +905,13 @@ assign DATA_IN =
// FF03, FF07, FF0B, FF0F
({ADDRESS[15:5], ADDRESS[1:0]} == 13'b1111111100011) ? {!VSYNC1_IRQ_BUF[1], 3'b011, SEL[1], DDR2, VSYNC1_POL, VSYNC1_IRQ_INT}:
// FF20, FF24, FF28, FF2C
({ADDRESS[15:5], ADDRESS[1:0]} == 13'b1111111100100) ? DATA_REG3:
({ADDRESS[15:4], ADDRESS[1:0]} == 14'b11111111001000) ? DATA_REG3:
// FF21, FF25, FF29, FF2D
({ADDRESS[15:5], ADDRESS[1:0]} == 13'b1111111100101) ? {4'b0011, CAS_MTR, DDR3, 2'b00}: // CD_POL, CD_INT}:
({ADDRESS[15:4], ADDRESS[1:0]} == 14'b11111111001001) ? {4'b0011, CAS_MTR, DDR3, 2'b00}: // CD_POL, CD_INT}:
// FF22, FF26, FF2A, FF2E
({ADDRESS[15:5], ADDRESS[1:0]} == 13'b1111111100110) ? DATA_REG4:
({ADDRESS[15:4], ADDRESS[1:0]} == 14'b11111111001010) ? DATA_REG4:
// FF23, FF27, FF2B, FF2F
({ADDRESS[15:5], ADDRESS[1:0]} == 13'b1111111100111) ? {!CART1_FIRQ_BUF[1], 3'b011, SOUND_EN, DDR4, CART1_POL, CART1_FIRQ_INT}:
({ADDRESS[15:4], ADDRESS[1:0]} == 14'b11111111001011) ? {!CART1_FIRQ_BUF[1], 3'b011, SOUND_EN, DDR4, CART1_POL, CART1_FIRQ_INT}:
// HiRes Joystick
// ({PDL,ADDRESS} == 17'h0FF60) ? PADDLE_LATCH_0[11:4]:
// ({PDL,ADDRESS} == 17'h0FF61) ? {PADDLE_LATCH_0[3:0],4'b0000}:
@@ -957,7 +932,7 @@ assign DATA_IN =
(ADDRESS == 16'hFF74) ? {1'b0, GART_READ[22:16]}:
(ADDRESS == 16'hFF75) ? { GART_READ[15:8]}:
(ADDRESS == 16'hFF76) ? { GART_READ[7:0]}:
(ADDRESS == 16'hFF7F) ? {2'b11, MPI_CTS, W_PROT, MPI_SCS}:
(ADDRESS == 16'hFF7F) ? {2'b11, MPI_CTS, 2'b00, MPI_SCS}:
// (ADDRESS == 16'hFF80) ? {CK_DONE_BUF[1],
// CK_FAIL,
// CK_STATE}:
@@ -1174,6 +1149,7 @@ assign cache_hit = (sdram_cpu_addr[24:1] == sdram_cpu_addr_L[24:1]);
// This sig is only used for the cycle accurate 09
reg cpu_cycle_ena;
always @(negedge clk_sys or negedge RESET_N)
begin
if(!RESET_N)
@@ -1379,11 +1355,18 @@ end
assign RESET_P = !BUTTON_N[3] // Button
| RESET; // CTRL-ALT-DEL or CTRL-ALT-INS
reg first_time = 1'b1;
// Make sure all resets are enabled for a long enough time to allow voltages to settle
always @ (posedge clk_sys)
begin
if (RESET)
MUGS <= RESET_INS; //This is holding a <ctrl><alt><ins> across a reset to activate the Easter Egg
if (first_time)
begin
MUGS <= 1'b0;
first_time = 1'b0;
end
end
always @ (posedge clk_sys or posedge RESET_P)
@@ -1514,7 +1497,8 @@ coco_mem_fetch video_fetch(
.HBORDER(HBORDER),
.HOR_OFFSET(HOR_OFFSET),
.COCO1(COCO1),
.HRES(HRES)
.HRES(HRES),
.CT_320_160(1'b1)
);
@@ -1589,20 +1573,20 @@ fdc coco_fdc(
.WD1793_RD_CTRL(wd1793_read),
// SD block level interface
.img_mounted(img_mounted[3:0]), // signaling that new image has been mounted
.img_mounted(img_mounted[5:2]), // signaling that new image has been mounted
.img_readonly(img_readonly), // mounted as read only. valid only for active bit in img_mounted
.img_size(img_size), // size of image in bytes.
.sd_lba(sd_lba[0:3]),
.sd_blk_cnt(sd_blk_cnt[0:3]), // number of blocks-1, total size ((sd_blk_cnt+1)*(1<<(BLKSZ+7))) must be <= 16384!
.sd_rd(sd_rd[3:0]),
.sd_wr(sd_wr[3:0]),
.sd_ack(sd_ack[3:0]),
.sd_lba(sd_lba[2:5]),
.sd_blk_cnt(sd_blk_cnt[2:5]), // number of blocks-1, total size ((sd_blk_cnt+1)*(1<<(BLKSZ+7))) must be <= 16384!
.sd_rd(sd_rd[5:2]),
.sd_wr(sd_wr[5:2]),
.sd_ack(sd_ack[5:2]),
// SD byte level access. Signals for 2-PORT altsyncram.
.sd_buff_addr(sd_buff_addr),
.sd_buff_dout(sd_buff_dout),
.sd_buff_din(sd_buff_din[0:3]),
.sd_buff_din(sd_buff_din[2:5]),
.sd_buff_wr(sd_buff_wr)
);
@@ -1639,20 +1623,20 @@ sdc_top coco_sdc_top(
.ext_response(ext_response),
// SD block level interface
.img_mounted(img_mounted[5:4]), // signaling that new image has been mounted
.img_mounted(img_mounted[1:0]), // signaling that new image has been mounted
.img_readonly(img_readonly), // mounted as read only. valid only for active bit in img_mounted
.img_size(img_size), // size of image in bytes.
.sd_lba(sd_lba[4:5]),
.sd_blk_cnt(sd_blk_cnt[4:5]), // number of blocks-1, total size ((sd_blk_cnt+1)*(1<<(BLKSZ+7))) must be <= 16384!
.sd_rd(sd_rd[5:4]),
.sd_wr(sd_wr[5:4]),
.sd_ack(sd_ack[5:4]),
.sd_lba(sd_lba[0:1]),
.sd_blk_cnt(sd_blk_cnt[0:1]), // number of blocks-1, total size ((sd_blk_cnt+1)*(1<<(BLKSZ+7))) must be <= 16384!
.sd_rd(sd_rd[1:0]),
.sd_wr(sd_wr[1:0]),
.sd_ack(sd_ack[1:0]),
// SD byte level access. Signals for 2-PORT altsyncram.
.sd_buff_addr(sd_buff_addr),
.sd_buff_dout(sd_buff_dout),
.sd_buff_din(sd_buff_din[4:5]),
.sd_buff_din(sd_buff_din[0:1]),
.sd_buff_wr(sd_buff_wr)
);
@@ -1782,22 +1766,6 @@ begin
RST_FF02_N <= 1'b0;
17'h1FF1E:
RST_FF02_N <= 1'b0;
/* 17'h1FF20:
RST_FF20_N <= 1'b0;
17'h1FF24:
RST_FF20_N <= 1'b0;
17'h1FF28:
RST_FF20_N <= 1'b0;
17'h1FF2C:
RST_FF20_N <= 1'b0;
17'h1FF30:
RST_FF20_N <= 1'b0;
17'h1FF34:
RST_FF20_N <= 1'b0;
17'h1FF38:
RST_FF20_N <= 1'b0;
17'h1FF3C:
RST_FF20_N <= 1'b0; */
17'h1FF22:
RST_FF22_N <= 1'b0;
17'h1FF26:
@@ -1806,14 +1774,6 @@ begin
RST_FF22_N <= 1'b0;
17'h1FF2E:
RST_FF22_N <= 1'b0;
17'h1FF32:
RST_FF22_N <= 1'b0;
17'h1FF36:
RST_FF22_N <= 1'b0;
17'h1FF3A:
RST_FF22_N <= 1'b0;
17'h1FF3E:
RST_FF22_N <= 1'b0;
17'h0FF22:
RST_FF22_N <= 1'b0;
17'h0FF26:
@@ -1822,14 +1782,6 @@ begin
RST_FF22_N <= 1'b0;
17'h0FF2E:
RST_FF22_N <= 1'b0;
17'h0FF32:
RST_FF22_N <= 1'b0;
17'h0FF36:
RST_FF22_N <= 1'b0;
17'h0FF3A:
RST_FF22_N <= 1'b0;
17'h0FF3E:
RST_FF22_N <= 1'b0;
17'h1FF92:
RST_FF92_N <= 1'b0;
17'h1FF93:
@@ -2534,14 +2486,7 @@ begin
ORCH_LEFT <= 8'b10000000;
// FF7B
ORCH_RIGHT <= 8'b10000000;
// FF7C
ORCH_LEFT_EXT <= 8'b10000000;
ORCH_LEFT_EXT_BUF <= 8'b10000000;
// FF7D
ORCH_RIGHT_EXT <= 8'b10000000;
ORCH_RIGHT_EXT_BUF <= 8'b10000000;
// FF7F
W_PROT <= 2'b11;
// MPI_SCS <= SWITCH[2:1];
// MPI_CTS <= SWITCH[2:1];
// FF8E-FF8F
@@ -2778,30 +2723,20 @@ begin
16'hFF20,
16'hFF24,
16'hFF28,
16'hFF2C,
16'hFF30,
16'hFF34,
16'hFF38,
16'hFF3C:
16'hFF2C:
begin
if(!DDR3)
DD_REG3 <= DATA_OUT;
else
begin
DTOA_CODE <= DATA_OUT[7:2];
// if({SOUND_EN,SEL} == 3'b100)
// SOUND_DTOA <= DATA_OUT[7:2];
end
end
16'hFF21,
16'hFF25,
16'hFF29,
16'hFF2D,
16'hFF31,
16'hFF35,
16'hFF39,
16'hFF3D:
16'hFF2D:
begin
// CD_INT <= DATA_OUT[0];
// CD_POL <= DATA_OUT[1];
@@ -2812,11 +2747,7 @@ begin
16'hFF22,
16'hFF26,
16'hFF2A,
16'hFF2E,
16'hFF32,
16'hFF36,
16'hFF3A,
16'hFF3E:
16'hFF2E:
begin
if(!DDR4)
DD_REG4 <= DATA_OUT;
@@ -2831,11 +2762,7 @@ begin
16'hFF23,
16'hFF27,
16'hFF2B,
16'hFF2F,
16'hFF33,
16'hFF37,
16'hFF3B,
16'hFF3F:
16'hFF2F:
begin
CART1_FIRQ_INT <= DATA_OUT[0];
CART1_POL <= DATA_OUT[1];
@@ -2847,21 +2774,13 @@ begin
16'hFF7A:
begin
ORCH_LEFT <= DATA_OUT;
ORCH_LEFT_EXT <= ORCH_LEFT_EXT_BUF;
end
16'hFF7B:
begin
ORCH_RIGHT <= DATA_OUT;
ORCH_RIGHT_EXT <= ORCH_RIGHT_EXT_BUF;
end
16'hFF7C:
ORCH_LEFT_EXT_BUF <= DATA_OUT;
16'hFF7D:
ORCH_RIGHT_EXT_BUF <= DATA_OUT;
16'hFF7F:
begin
W_PROT[0] <= DATA_OUT[2] | !DATA_OUT[3];
W_PROT[1] <= !DATA_OUT[2] | DATA_OUT[3] | W_PROT[0];
MPI_SCS <= DATA_OUT[1:0];
MPI_CTS <= DATA_OUT[5:4];
end
@@ -2914,6 +2833,7 @@ begin
16'hFF98:
begin
GRMODE <= DATA_OUT[7];
if (SWITCH[5]) // On in Extended CoCo3 mode
HRES[3] <= DATA_OUT[6]; // Extended resolutions
LPR <= DATA_OUT[2:0];
end
@@ -3389,10 +3309,11 @@ end
// The code for the internal and Orchestra sound
// Internal Sound generation
assign SOUND = {1'b0, SBS, SOUND_DTOA};
//assign SOUND = {SBS, 7'b0000000} + {SOUND_DTOA, SOUND_DTOA[5:4]};
assign SOUND = {SBS, SOUND_DTOA, SOUND_DTOA[5]};
assign SOUND_LEFT = {ORCH_LEFT, ORCH_LEFT_EXT} + {SOUND, 8'h00};
assign SOUND_RIGHT = {ORCH_RIGHT, ORCH_RIGHT_EXT} + {SOUND, 8'h00};
assign SOUND_LEFT = {ORCH_LEFT, ORCH_LEFT} + {SOUND, SOUND};
assign SOUND_RIGHT = {ORCH_RIGHT, ORCH_RIGHT} + {SOUND, SOUND};
// the DAC isn't really a DAC but represents the DAC chip on the schematic.
@@ -3451,22 +3372,22 @@ always @(negedge clk_sys)
begin
case (SEL)
2'b00:
if (dac_joya2[15:10] > DTOA_CODE)
if (dac_joya2[15:10] >= DTOA_CODE)
JSTICK<=1;
else
JSTICK<=0;
2'b01:
if (dac_joya2[7:2] > DTOA_CODE)
if (dac_joya2[7:2] >= DTOA_CODE)
JSTICK<=1;
else
JSTICK<=0;
2'b10:
if (dac_joya1[15:10] > DTOA_CODE)
if (dac_joya1[15:10] >= DTOA_CODE)
JSTICK<=1;
else
JSTICK<=0;
2'b11:
if (dac_joya1[7:2] > DTOA_CODE)
if (dac_joya1[7:2] >= DTOA_CODE)
JSTICK<=1;
else
JSTICK<=0;
@@ -3561,13 +3482,48 @@ COCOKEY coco_keyboard(
.SLO_CLK(V_SYNC_N),
.PS2_CLK(ps2_clk),
.PS2_DATA(ps2_data),
.KEY(KEY),
.KEY(KEY_RCVD),
.SHIFT(SHIFT),
.SHIFT_OVERRIDE(SHIFT_OVERRIDE),
.RESET(RESET),
.RESET_INS(RESET_INS)
);
wire [72:0] KEY_RCVD;
Auto_Run CoCo3_Auto_Run(
.RESET_N(RESET_N),
.CLK(clk_sys),
.CLK_1_78(clk_1_78),
.MPI_SCS(SWITCH[2:1]),
.MODE(AUTO_MODE),
.AMW_ACK(AMW_ACK),
.KEY_IN(KEY_RCVD),
.KEY_OUT(KEY)
);
// Generate 1.78 Mhz [enable] GP clk
reg clk_1_78;
reg [4:0] clk_178_ctr;
always @ (negedge clk_sys or negedge RESET_N)
begin
if(!RESET_N)
begin
clk_1_78 <= 1'b0;
clk_178_ctr <= 5'b00000;
end
else
begin
clk_1_78 <= 1'b0;
clk_178_ctr <= clk_178_ctr + 1'b1;
if (clk_178_ctr == 5'd27)
begin
clk_1_78 <= 1'b1;
end
end
end
// PS2 Mouse [MiSTer]
// Borrowed from MAC PLUS
@@ -3663,6 +3619,9 @@ reg [3:0] MISTER_HBLANK_D;
assign HBLANK = MISTER_HBLANK_D[1]; // This is 2 clock delay on the ~HBORDER...
assign VBLANK = ~VBORDER;
assign RED[3:0] = RED[7:4];
assign GREEN[3:0] = GREEN[7:4];
assign BLUE[3:0] = BLUE[7:4];
// Video DAC
always @ (negedge clk_sys)
@@ -3673,170 +3632,15 @@ begin
COLOR_BUF <= COLOR; // Delay COLOR by 1 clock cycle to align with 256 Color SRAM
H_SYNC <= !H_SYNC_N; // Delay H_SYNC by 1 clock cycle
V_SYNC <= !V_SYNC_N; // Delay V_SYNC by 1 clock cycle
RED[3:0] <= 4'B0000;
GREEN[3:0] <= 4'B0000;
BLUE[3:0] <= 4'B0000;
// RED[3:0] <= 4'B0000;
// GREEN[3:0] <= 4'B0000;
// BLUE[3:0] <= 4'B0000;
VGA_SYNC_N <= 1'b1;
MISTER_HBLANK_D[3] <= ~HBORDER;
MISTER_HBLANK_D[2:0] <= MISTER_HBLANK_D[3:1];
if(COLOR_BUF[9])
begin
case(COLOR_BUF[7:0])
// 8'h80: // Black
// begin
// {RED3, GREEN3, BLUE3, RED2, GREEN2, BLUE2, RED1, GREEN1, BLUE1, RED0, GREEN0, BLUE0} <= 12'h000; // Black
// end
8'h81: // Green
begin
{RED[7], GREEN[7], BLUE[7], RED[6], GREEN[6], BLUE[6], RED[5], GREEN[5], BLUE[5], RED[4], GREEN[4], BLUE[4]} <= 12'h492; // GREEN
end
8'h82: // White
begin
{RED[7], GREEN[7], BLUE[7], RED[6], GREEN[6], BLUE[6], RED[5], GREEN[5], BLUE[5], RED[4], GREEN[4], BLUE[4]} <= 12'hFFF; // WHITE
end
8'h00: // Dark Green
begin
{RED[7], GREEN[7], BLUE[7], RED[6], GREEN[6], BLUE[6], RED[5], GREEN[5], BLUE[5], RED[4], GREEN[4], BLUE[4]} <= 12'h080;
end
8'h01:
begin
{RED[7], GREEN[7], BLUE[7], RED[6], GREEN[6], BLUE[6], RED[5], GREEN[5], BLUE[5], RED[4], GREEN[4], BLUE[4]} <= 12'h010;
end
8'h02:
begin
{RED[7], GREEN[7], BLUE[7], RED[6], GREEN[6], BLUE[6], RED[5], GREEN[5], BLUE[5], RED[4], GREEN[4], BLUE[4]} <= 12'h010;
end
8'h03:
begin
{RED[7], GREEN[7], BLUE[7], RED[6], GREEN[6], BLUE[6], RED[5], GREEN[5], BLUE[5], RED[4], GREEN[4], BLUE[4]} <= 12'h480;
end
8'h04:
begin
{RED[7], GREEN[7], BLUE[7], RED[6], GREEN[6], BLUE[6], RED[5], GREEN[5], BLUE[5], RED[4], GREEN[4], BLUE[4]} <= 12'h490;
end
8'h05:
begin
{RED[7], GREEN[7], BLUE[7], RED[6], GREEN[6], BLUE[6], RED[5], GREEN[5], BLUE[5], RED[4], GREEN[4], BLUE[4]} <= 12'h010;
end
8'h06:
begin
{RED[7], GREEN[7], BLUE[7], RED[6], GREEN[6], BLUE[6], RED[5], GREEN[5], BLUE[5], RED[4], GREEN[4], BLUE[4]} <= 12'h010;
end
8'h07:
begin
{RED[7], GREEN[7], BLUE[7], RED[6], GREEN[6], BLUE[6], RED[5], GREEN[5], BLUE[5], RED[4], GREEN[4], BLUE[4]} <= 12'h400;
end
8'h08:
begin
{RED[7], GREEN[7], BLUE[7], RED[6], GREEN[6], BLUE[6], RED[5], GREEN[5], BLUE[5], RED[4], GREEN[4], BLUE[4]} <= 12'h410;
end
8'h09:
begin
{RED[7], GREEN[7], BLUE[7], RED[6], GREEN[6], BLUE[6], RED[5], GREEN[5], BLUE[5], RED[4], GREEN[4], BLUE[4]} <= 12'h480;
end
8'h0A:
begin
{RED[7], GREEN[7], BLUE[7], RED[6], GREEN[6], BLUE[6], RED[5], GREEN[5], BLUE[5], RED[4], GREEN[4], BLUE[4]} <= 12'h400;
end
8'h0B:
begin
{RED[7], GREEN[7], BLUE[7], RED[6], GREEN[6], BLUE[6], RED[5], GREEN[5], BLUE[5], RED[4], GREEN[4], BLUE[4]} <= 12'h490;
end
8'h0C:
begin
{RED[7], GREEN[7], BLUE[7], RED[6], GREEN[6], BLUE[6], RED[5], GREEN[5], BLUE[5], RED[4], GREEN[4], BLUE[4]} <= 12'h490;
end
8'h0D:
begin
{RED[7], GREEN[7], BLUE[7], RED[6], GREEN[6], BLUE[6], RED[5], GREEN[5], BLUE[5], RED[4], GREEN[4], BLUE[4]} <= 12'h010;
end
8'h0E:
begin
{RED[7], GREEN[7], BLUE[7], RED[6], GREEN[6], BLUE[6], RED[5], GREEN[5], BLUE[5], RED[4], GREEN[4], BLUE[4]} <= 12'h010;
end
8'h0F:
begin
{RED[7], GREEN[7], BLUE[7], RED[6], GREEN[6], BLUE[6], RED[5], GREEN[5], BLUE[5], RED[4], GREEN[4], BLUE[4]} <= 12'h492;
end
// 8'h10: // Black
// begin
// {RED3, GREEN3, BLUE3, RED2, GREEN2, BLUE2, RED1, GREEN1, BLUE1, RED0, GREEN0, BLUE0} <= 12'h000;
// end
8'h11:
begin
{RED[7], GREEN[7], BLUE[7], RED[6], GREEN[6], BLUE[6], RED[5], GREEN[5], BLUE[5], RED[4], GREEN[4], BLUE[4]} <= 12'h028;
end
8'h12:
begin
{RED[7], GREEN[7], BLUE[7], RED[6], GREEN[6], BLUE[6], RED[5], GREEN[5], BLUE[5], RED[4], GREEN[4], BLUE[4]} <= 12'h082;
end
8'h13:
begin
{RED[7], GREEN[7], BLUE[7], RED[6], GREEN[6], BLUE[6], RED[5], GREEN[5], BLUE[5], RED[4], GREEN[4], BLUE[4]} <= 12'hFE8;
end
8'h14:
begin
{RED[7], GREEN[7], BLUE[7], RED[6], GREEN[6], BLUE[6], RED[5], GREEN[5], BLUE[5], RED[4], GREEN[4], BLUE[4]} <= 12'hFD0;
end
8'h15:
begin
{RED[7], GREEN[7], BLUE[7], RED[6], GREEN[6], BLUE[6], RED[5], GREEN[5], BLUE[5], RED[4], GREEN[4], BLUE[4]} <= 12'h218;
end
8'h16:
begin
{RED[7], GREEN[7], BLUE[7], RED[6], GREEN[6], BLUE[6], RED[5], GREEN[5], BLUE[5], RED[4], GREEN[4], BLUE[4]} <= 12'h130;
end
8'h17:
begin
{RED[7], GREEN[7], BLUE[7], RED[6], GREEN[6], BLUE[6], RED[5], GREEN[5], BLUE[5], RED[4], GREEN[4], BLUE[4]} <= 12'h768;
end
8'h18:
begin
{RED[7], GREEN[7], BLUE[7], RED[6], GREEN[6], BLUE[6], RED[5], GREEN[5], BLUE[5], RED[4], GREEN[4], BLUE[4]} <= 12'hDE0;
end
8'h19:
begin
{RED[7], GREEN[7], BLUE[7], RED[6], GREEN[6], BLUE[6], RED[5], GREEN[5], BLUE[5], RED[4], GREEN[4], BLUE[4]} <= 12'h9E0;
end
8'h1A:
begin
{RED[7], GREEN[7], BLUE[7], RED[6], GREEN[6], BLUE[6], RED[5], GREEN[5], BLUE[5], RED[4], GREEN[4], BLUE[4]} <= 12'h648;
end
8'h1B:
begin
{RED[7], GREEN[7], BLUE[7], RED[6], GREEN[6], BLUE[6], RED[5], GREEN[5], BLUE[5], RED[4], GREEN[4], BLUE[4]} <= 12'hFD8;
end
8'h1C:
begin
{RED[7], GREEN[7], BLUE[7], RED[6], GREEN[6], BLUE[6], RED[5], GREEN[5], BLUE[5], RED[4], GREEN[4], BLUE[4]} <= 12'hDF8;
end
8'h1D:
begin
{RED[7], GREEN[7], BLUE[7], RED[6], GREEN[6], BLUE[6], RED[5], GREEN[5], BLUE[5], RED[4], GREEN[4], BLUE[4]} <= 12'h008;
end
8'h1E:
begin
{RED[7], GREEN[7], BLUE[7], RED[6], GREEN[6], BLUE[6], RED[5], GREEN[5], BLUE[5], RED[4], GREEN[4], BLUE[4]} <= 12'h020;
end
8'h1F:
begin
{RED[7], GREEN[7], BLUE[7], RED[6], GREEN[6], BLUE[6], RED[5], GREEN[5], BLUE[5], RED[4], GREEN[4], BLUE[4]} <= 12'hFFF;
end
default: // Black
begin
{RED[7], GREEN[7], BLUE[7], RED[6], GREEN[6], BLUE[6], RED[5], GREEN[5], BLUE[5], RED[4], GREEN[4], BLUE[4]} <= 12'h000; // Black
end
endcase
end
else
// Request for every other line to be black
// Looks more like the original video
// Not for 15KHz Video
begin
begin
if(COLOR_BUF[8])
begin
{RED[7], GREEN[7], BLUE[7], RED[6], GREEN[6], BLUE[6], RED[5], GREEN[5], BLUE[5], RED[4], GREEN[4], BLUE[4]} <= VDAC_OUT[11:0];
@@ -3856,8 +3660,10 @@ begin
BLUE[5] <= PALETTE[COLOR_BUF[4:0]][3];
BLUE[4] <= PALETTE[COLOR_BUF[4:0]][0];
end
end
end
RED[4] = RED[6];
GREEN[4] = GREEN[6];
BLUE[5] = BLUE[7];
BLUE[4] = BLUE[6];
end
end
@@ -3879,7 +3685,9 @@ wire HBORDER;
wire VBORDER;
wire VBLANK_1;
wire HBLANK_1;
wire double, buff_bank;
`ifndef CoCo3_Select_GIMEX_RAST
// Video timing and modes
COCO3VIDEO MISTER_COCOVID(
// Clocks / RESET
@@ -3939,10 +3747,78 @@ COCO3VIDEO MISTER_COCOVID(
`endif
.HBORDER(HBORDER),
.VBORDER(VBORDER)
.VBORDER(VBORDER),
.art(SWITCH[7:6])
);
`else
wire [9:0] BUFF_ADD_temp;
assign BUFF_ADD = BUFF_ADD_temp[8:0];
COCO3VIDEO_GIMEX MISTER_COCOVID(
// Clocks / RESET
.PIX_CLK(PIX_CLK), //14.32 MHz = 69.3 nS
.RESET_N(RESET_N),
.COLOR(COLOR),
.HSYNC_N(H_SYNC_N),
.VSYNC_N(V_SYNC_N),
// RAM / Buffer
.BUFF_ADD_F(BUFF_ADD_temp),
.RAM_ADD(VIDEO_ADDRESS),
.RAM_DATA(BUFF_DATA),
// Mode Selection
.COCO1(COCO1),
.V(V),
.BP(GRMODE),
.VERT(VERT),
.VID_CONT(VDG_CONTROL),
.CSS(CSS),
.LPF(LPF),
.VERT_FIN_SCRL(VERT_FIN_SCRL),
.HLPR(HLPR),
.LPR(LPR),
.HRES(HRES),
.CRES(CRES),
.HVEN(HVEN),
// Starting location
.SCRN_START_HSB(SCRN_START_HSB), // 2 extra bits for 2MB screen start
.SCRN_START_MSB(SCRN_START_MSB),
.SCRN_START_LSB(SCRN_START_LSB),
.SWITCH(SWITCH[5]),
.BLINK(BLINK),
.ARTI(SWITCH[7:6]),
.PHASE(PHASE),
.HBORDER(HBORDER),
.VBORDER(VBORDER),
// Interrupts
`ifdef CoCo3_Horz_INT_FIX
.HBORDER_INT(HBORDER_INT),
`endif
`ifdef CoCo3_Vert_INT_FIX
.VBORDER_INT(VBORDER_INT),
`endif
// .DOUBLE(double),
// .BUFF_BANK(buff_bank),
.TURBO(1'b0),
.SDRate(1'b0),
.ROM_ADDRESS(font_adrs),
.ROM_DATA1(font_data)
);
`endif
parameter SHDOW_FONT_LOCK_REG = 16'hfff0;
parameter SHDOW_FONT_DATA_REG = 16'hfff1;
@@ -4111,4 +3987,32 @@ glb6551 RS232(
.DSR(UART_DSR)
);
Cassette_Write CoCo3_Cassette_Write(
.RESET_N(RESET_N),
.CLK(clk_sys),
.CLK_1_78(clk_1_78),
.CASS_REWIND_RECORD(SWITCH[3]),
.MOTOR_ON(CAS_MTR),
.DTOA_CODE(DTOA_CODE),
// SD block level interface
.img_mounted(img_mounted[6]), // signaling that new image has been mounted
.img_readonly(img_readonly), // mounted as read only. valid only for active bit in img_mounted
.img_size(img_size), // size of image in bytes.
.sd_lba(sd_lba[6]),
.sd_blk_cnt(sd_blk_cnt[6]), // number of blocks-1, total size ((sd_blk_cnt+1)*(1<<(BLKSZ+7))) must be <= 16384!
.sd_rd(sd_rd[6]),
.sd_wr(sd_wr[6]),
.sd_ack(sd_ack[6]),
// SD byte level access. Signals for 2-PORT altsyncram.
.sd_buff_addr(sd_buff_addr),
.sd_buff_dout(sd_buff_dout),
.sd_buff_din(sd_buff_din[6]),
.sd_buff_wr(sd_buff_wr)
);
endmodule
+7 -2
View File
@@ -67,12 +67,14 @@ module coco_mem_fetch(
input HBORDER,
input [6:0] HOR_OFFSET,
input COCO1,
input [3:0] HRES
input [3:0] HRES,
input CT_320_160
);
localparam WORD_END_COUNT = 9'd160 - 1'd1;
wire [8:0] WORD_END_COUNT;
//localparam WORD_END_COUNT = 9'd160 - 1'd1;
wire [24:0] PHY_VID_ADD;
@@ -90,6 +92,9 @@ localparam state_wait_accept = 4'd2;
localparam state_done = 4'd10;
assign WORD_END_COUNT = (CT_320_160) ? 9'd320 - 1'd1:
9'd160 - 1'd1;
assign BUF_HBORDER[0] = HBORDER;
assign a0_delay[0] = init_offset_a0;
+1 -1
View File
@@ -92,7 +92,7 @@ reg SHIFT;
output SHIFT_OVERRIDE;
reg SHIFT_OVERRIDE;
output RESET;
reg RESET;
reg RESET = 1'b0;
output RESET_INS;
reg RESET_INS = 1'b0;
+1
View File
@@ -80,3 +80,4 @@
`set_feature(CoCo3_disable_GART_in_GIMEX, FEATURE_6)// Disable GIMEX ram transfers [GIMEX detection in OS( EOU]
//`set_feature(CoCo3_Select_GIMEX_RAST, FEATURE_7) // Use GIMEX Rasterizer Engine
+2 -1
View File
@@ -416,7 +416,8 @@ begin
ext_response <= 1'b1;
`ifdef CoCo3_sdc_override_size
response_reg <= 24'h555555; // This fixes a redirect error in OS9EOU - Value=no hardware
// response_reg <= 24'h555555; // This fixes a redirect error in OS9EOU - Value=no hardware
response_reg <= 24'h404040; // This fixes a redirect error in OS9EOU - Value=no hardware
`else
response_reg <= drive_size[l_drive][31:8]; // This returns the correct size of the mounted drive in sectors
`endif
+28 -4
View File
@@ -226,7 +226,7 @@ video_calc video_calc
.new_vmode(new_vmode),
.video_rotated(video_rotated),
.par_num(byte_cnt[3:0]),
.par_num(byte_cnt[4:0]),
.dout(vc_dout)
);
@@ -502,7 +502,7 @@ always@(posedge clk_sys) begin : uio_block
'h22: RTC[(byte_cnt-6'd1)<<4 +:16] <= io_din;
//Video res.
'h23: if(!byte_cnt[MAX_W:4]) io_dout <= vc_dout;
'h23: if(!byte_cnt[MAX_W:5]) io_dout <= vc_dout;
//RTC
'h24: TIMESTAMP[(byte_cnt-6'd1)<<4 +:16] <= io_din;
@@ -872,7 +872,7 @@ module video_calc
input new_vmode,
input video_rotated,
input [3:0] par_num,
input [4:0] par_num,
output reg [15:0] dout
);
@@ -893,6 +893,9 @@ always @(posedge clk_sys) begin
13: dout <= vid_vtime_hdmi[31:16];
14: dout <= vid_ccnt[15:0];
15: dout <= vid_ccnt[31:16];
16: dout <= vid_pixrep;
17: dout <= vid_de_h;
18: dout <= vid_de_v;
default dout <= 0;
endcase
end
@@ -902,24 +905,44 @@ reg [31:0] vid_vcnt = 0;
reg [31:0] vid_ccnt = 0;
reg [7:0] vid_nres = 0;
reg [1:0] vid_int = 0;
reg [7:0] vid_pixrep;
reg [15:0] vid_de_h;
reg [7:0] vid_de_v;
always @(posedge clk_vid) begin
integer hcnt;
integer vcnt;
integer ccnt;
reg old_vs= 0, old_de = 0, old_vmode = 0;
reg [7:0] pcnt;
reg [7:0] de_v;
reg [15:0] de_h;
reg old_vs = 0, old_hs = 0, old_hs_vclk = 0, old_de = 0, old_de_vclk = 0, old_de1 = 0, old_vmode = 0;
reg [3:0] resto = 0;
reg calch = 0;
if(calch & de) ccnt <= ccnt + 1;
pcnt <= pcnt + 1'd1;
old_hs_vclk <= hs;
de_h <= de_h + 1'd1;
if(old_hs_vclk & ~hs) de_h <= 1;
old_de_vclk <= de;
if(calch & ~old_de_vclk & de) vid_de_h <= de_h;
if(ce_pix) begin
old_vs <= vs;
old_hs <= hs;
old_de <= de;
old_de1 <= old_de;
pcnt <= 1;
if(~vs & ~old_de & de) vcnt <= vcnt + 1;
if(calch & de) hcnt <= hcnt + 1;
if(old_de & ~de) calch <= 0;
if(~old_de1 & old_de) vid_pixrep <= pcnt;
if(old_hs & ~hs) de_v <= de_v + 1'd1;
if(calch & ~old_de & de) vid_de_v <= de_v;
if(old_vs & ~vs) begin
vid_int <= {vid_int[0],f1};
@@ -939,6 +962,7 @@ always @(posedge clk_vid) begin
hcnt <= 0;
ccnt <= 0;
calch <= 1;
de_v <= 0;
end
end
end
+1776
View File
File diff suppressed because it is too large. Load diff
+1
View File
@@ -4,3 +4,4 @@ set_global_assignment -name QIP_FILE [file join $::quartus(qip_path) p
set_global_assignment -name VERILOG_FILE [file join $::quartus(qip_path) pll_cfg.v ]
set_global_assignment -name VERILOG_FILE [file join $::quartus(qip_path) pll_cfg/altera_pll_reconfig_core.v ]
set_global_assignment -name VERILOG_FILE [file join $::quartus(qip_path) pll_cfg/altera_pll_reconfig_top.v ]
set_global_assignment -name VERILOG_FILE [file join $::quartus(qip_path) pll_cfg_hdmi.v ]
+2 -1
View File
@@ -1,4 +1,5 @@
set_global_assignment -name QIP_FILE rtl/pll.qip
set_global_assignment -name QIP_FILE [file join $::quartus(qip_path) pll_hdmi.qip ]
set_global_assignment -name QIP_FILE [file join $::quartus(qip_path) pll_audio.qip ]
set_global_assignment -name QIP_FILE [file join $::quartus(qip_path) pll_cfg.qip ]
#set_global_assignment -name QIP_FILE [file join $::quartus(qip_path) pll_cfg.qip ]
set_global_assignment -name VERILOG_FILE [file join $::quartus(qip_path) pll_cfg_hdmi.v ]
+47 -36
View File
@@ -124,12 +124,6 @@ module sys_top
inout [6:0] USER_IO
);
`ifdef MISTER_DUAL_SDRAM
`ifndef MISTER_DISABLE_YC
`define MISTER_DISABLE_YC
`endif
`endif
////////////////////// Secondary SD ///////////////////////////////////
wire SD_CS, SD_CLK, SD_MOSI;
@@ -1020,13 +1014,11 @@ reg [5:0] adj_address;
reg [31:0] adj_data;
`ifndef MISTER_DEBUG_NOHDMI
pll_cfg pll_cfg
pll_cfg_hdmi pll_cfg_hdmi
(
.mgmt_clk(FPGA_CLK1_50),
.mgmt_reset(reset_req),
.mgmt_waitrequest(cfg_waitrequest),
.mgmt_read(0),
.mgmt_readdata(),
.mgmt_write(cfg_write),
.mgmt_address(cfg_address),
.mgmt_writedata(cfg_data),
@@ -1191,11 +1183,12 @@ always @(posedge clk_vid) begin
end
dv_de1 <= !{hss,dv_hs_osd} && vde;
dv_hs1 <= csync_en ? dv_cs_osd : dv_hs_osd;
dv_vs1 <= dv_vs_osd;
end
dv_d1 <= dv_data_osd;
dv_hs1 <= csync_en ? dv_cs_osd : dv_hs_osd;
dv_vs1 <= dv_vs_osd;
dv_d2 <= dv_d1;
dv_de2 <= dv_de1;
dv_hs2 <= dv_hs1;
@@ -1330,6 +1323,33 @@ osd vga_osd
wire vga_cs_osd;
csync csync_vga(clk_vid, vga_hs_osd, vga_vs_osd, vga_cs_osd);
`ifndef MISTER_DISABLE_YC
reg pal_en;
reg yc_en;
reg cvbs;
reg [16:0] ColorBurst_Range;
reg [39:0] PhaseInc;
wire [23:0] yc_o;
wire yc_hs, yc_vs, yc_cs;
yc_out yc_out
(
.clk(clk_vid),
.PAL_EN(pal_en),
.CVBS(cvbs),
.PHASE_INC(PhaseInc),
.COLORBURST_RANGE(ColorBurst_Range),
.hsync(vga_hs_osd),
.vsync(vga_vs_osd),
.csync(vga_cs_osd),
.dout(yc_o),
.din(vga_data_osd),
.hsync_o(yc_hs),
.vsync_o(yc_vs),
.csync_o(yc_cs)
);
`endif
`ifndef MISTER_DUAL_SDRAM
wire VGA_DISABLE;
wire [23:0] vgas_o;
@@ -1365,31 +1385,6 @@ csync csync_vga(clk_vid, vga_hs_osd, vga_vs_osd, vga_cs_osd);
);
`ifndef MISTER_DISABLE_YC
reg pal_en;
reg yc_en;
reg cvbs;
reg [16:0] ColorBurst_Range;
reg [39:0] PhaseInc;
wire [23:0] yc_o;
wire yc_hs, yc_vs, yc_cs;
yc_out yc_out
(
.clk(clk_vid),
.PAL_EN(pal_en),
.CVBS(cvbs),
.PHASE_INC(PhaseInc),
.COLORBURST_RANGE(ColorBurst_Range),
.hsync(vga_hs_osd),
.vsync(vga_vs_osd),
.csync(vga_cs_osd),
.dout(yc_o),
.din(vga_data_osd),
.hsync_o(yc_hs),
.vsync_o(yc_vs),
.csync_o(yc_cs)
);
assign {vga_o, vga_hs, vga_vs, vga_cs } = ~yc_en ? {vga_o_t, vga_hs_t, vga_vs_t, vga_cs_t } : {yc_o, yc_hs, yc_vs, yc_cs };
`else
assign {vga_o, vga_hs, vga_vs, vga_cs } = {vga_o_t, vga_hs_t, vga_vs_t, vga_cs_t } ;
@@ -1770,6 +1765,21 @@ module sync_fix
assign sync_out = sync_in ^ pol;
reg pol;
always @(posedge clk) begin
reg [31:0] cnt;
reg s1,s2;
s1 <= sync_in;
s2 <= s1;
cnt <= s2 ? (cnt - 1) : (cnt + 1);
if(~s2 & s1) begin
cnt <= 0;
pol <= cnt[31];
end
end
/*
always @(posedge clk) begin
integer pos = 0, neg = 0, cnt = 0;
reg s1,s2;
@@ -1785,6 +1795,7 @@ always @(posedge clk) begin
pol <= pos > neg;
end
*/
endmodule
+20 -18
View File
@@ -16,14 +16,16 @@ module vga_out
output reg csync_o
);
wire [5:0] red = din[23:18];
wire [5:0] green = din[15:10];
wire [5:0] blue = din[7:2];
wire [7:0] red = din[23:16];
wire [7:0] green = din[15:8];
wire [7:0] blue = din[7:0];
// http://marsee101.blog19.fc2.com/blog-entry-2311.html
// Y = 16 + 0.257*R + 0.504*G + 0.098*B (Y = 0.299*R + 0.587*G + 0.114*B)
// Pb = 128 - 0.148*R - 0.291*G + 0.439*B (Pb = -0.169*R - 0.331*G + 0.500*B)
// Pr = 128 + 0.439*R - 0.368*G - 0.071*B (Pr = 0.500*R - 0.419*G - 0.081*B)
// Y = 0.301*R + 0.586*G + 0.113*B (Y = 0.299*R + 0.587*G + 0.114*B)
// Pb = 128 - 0.168*R - 0.332*G + 0.500*B (Pb = -0.169*R - 0.331*G + 0.500*B)
// Pr = 128 + 0.500*R - 0.418*G - 0.082*B (Pr = 0.500*R - 0.419*G - 0.081*B)
reg [7:0] y, pb, pr;
reg [23:0] rgb;
@@ -36,25 +38,25 @@ always @(posedge clk) begin
reg hsync2, vsync2, csync2;
reg hsync1, vsync1, csync1;
y_1r <= 19'd04096 + ({red, 8'd0} + {red, 3'd0});
pb_1r <= 19'd32768 - ({red, 7'd0} + {red, 4'd0} + {red, 3'd0});
pr_1r <= 19'd32768 + ({red, 8'd0} + {red, 7'd0} + {red, 6'd0});
y_1r <= {red, 6'd0} + {red, 3'd0} + {red, 2'd0} + red;
pb_1r <= 19'd32768 - ({red, 5'd0} + {red, 3'd0} + {red, 1'd0});
pr_1r <= 19'd32768 + {red, 7'd0};
y_1g <= {green, 9'd0} + {green, 2'd0};
pb_1g <= {green, 8'd0} + {green, 5'd0} + {green, 3'd0};
pr_1g <= {green, 8'd0} + {green, 6'd0} + {green, 5'd0} + {green, 4'd0} + {green, 3'd0};
y_1g <= {green, 7'd0} + {green, 4'd0} + {green, 2'd0} + {green, 1'd0};
pb_1g <= {green, 6'd0} + {green, 4'd0} + {green, 2'd0} + green;
pr_1g <= {green, 6'd0} + {green, 5'd0} + {green, 3'd0} + {green, 1'd0};
y_1b <= {blue, 6'd0} + {blue, 5'd0} + {blue, 2'd0};
pb_1b <= {blue, 8'd0} + {blue, 7'd0} + {blue, 6'd0};
pr_1b <= {blue, 6'd0} + {blue, 3'd0};
y_1b <= {blue, 4'd0} + {blue, 3'd0} + {blue, 2'd0} + blue;
pb_1b <= {blue, 7'd0};
pr_1b <= {blue, 4'd0} + {blue, 2'd0} + blue;
y_2 <= y_1r + y_1g + y_1b;
pb_2 <= pb_1r - pb_1g + pb_1b;
pr_2 <= pr_1r - pr_1g - pr_1b;
y <= ( y_2[18] || !y_2[17:12]) ? 8'd16 : (y_2[17:8] > 235) ? 8'd235 : y_2[15:8];
pb <= (pb_2[18] || !pb_2[17:12]) ? 8'd16 : (&pb_2[17:12]) ? 8'd240 : pb_2[15:8];
pr <= (pr_2[18] || !pr_2[17:12]) ? 8'd16 : (&pr_2[17:12]) ? 8'd240 : pr_2[15:8];
y <= y_2[18] ? 8'd0 : y_2[16] ? 8'd255 : y_2[15:8];
pb <= pb_2[18] ? 8'd0 : pb_2[16] ? 8'd255 : pb_2[15:8];
pr <= pr_2[18] ? 8'd0 : pr_2[16] ? 8'd255 : pr_2[15:8];
hsync_o <= hsync2; hsync2 <= hsync1; hsync1 <= hsync;
vsync_o <= vsync2; vsync2 <= vsync1; vsync1 <= vsync;