Commit Graph
86 Commits
Author SHA1 Message Date
Alan SterembergandClaude Opus 5.5 50d76dd489 OSD: move "Cart Interrupt Disabled" to status[19] / SWITCH[9]
The 20260927 release reused status[16] / SWITCH[4] for "Swap MiSTer Uart"
(rs_swap) and dropped the "Cart Interrupt Disabled" item that the cart
start-up change wires into the slot 3 CART interrupt. Bring the item back in
the Debug menu on a free status bit (OJ, status[19]) and pass it through the
unused SWITCH[9].

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-02 07:29:18 -04:00
Alan SterembergandClaude Opus 5.5 4afcebf22a Video fetch: register the end-of-line test before the SDRAM ack
coco_mem_fetch.sv compared read_count against WORD_END_COUNT on the same
114 MHz edge that took SDRAM_VID_ACK and updated VID_READ_OFFSET, the fetch
address; that path missed timing (-0.7 ns). read_count only changes on the
ack, so the compare is now registered in state_start with identical results.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-02 07:15:44 -04:00
Alan SterembergandClaude Opus 5.5 72a50a16bb Cart start-up: cold boot "DK" carts; wire up "Cart Interrupt Disabled"
A cart loaded after boot in Multi-Pak slot 3 made CART toggle every CPU cycle
forever -- the autostart of a program pak, whose CART pin is tied to Q. A
disk-style ROM (HDB-DOS, Disk BASIC) never drives CART; BASIC starts it from
the "DK" signature at power-on. Under the toggling, FujiNet's CFGLOAD.BIN
(which re-enables the CART interrupt) hung in an endless FIRQ after 17
DriveWire reads; an OSD reset cleared it.

- A cart whose first two bytes are "DK" now gets a cold boot (the existing
  AMW/EE_Cold_Bt path) instead of the autostart interrupt.
- OSD "Cart Interrupt Disabled" (status[16] -> SWITCH[4]) was not connected;
  it now suppresses the slot-3 autostart interrupt.
- Program paks are unchanged: Arkanoid loaded after boot still autostarts.

Verified in the Verilator sim with the hardware sequence (cart loaded after
boot, slot 3, no reset): the FujiNet S3 cart now reads all 98 sectors of
CONFIG, matching the MiSTer after a manual reset. Regression tests unchanged.

The sim gains --cart-frame N to load the cart after boot, as the OSD and MGL
do; loading it before reset had hidden the problem.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-02 07:15:44 -04:00
Alan SterembergandClaude Opus 5.5 874f4f3083 Add Verilator simulation (ImGui + headless)
verilator/ runs the core on the host with the shared FM-7 / Apple-IIgs sim
framework: windowed (ImGui/SDL2) or --headless, typing on a frame schedule,
screenshots, text-screen dump, 6809 disassembly trace, floppy/SDC/cart/cassette,
and RS-232 Pak serial debugging (TXD decoder, RXD driver, pty bridge, ACIA
trace) with a minimal DriveWire server and a script to run the real FujiNet
daemon against the sim. See verilator/README.md.

- The VHDL the build uses (ROMs, RAMs, font) is converted to Verilog in
  verilator/rtl/; the VHDL CPU is not instantiated (CoCo3_CYC_ACC_6809).
- sdram2.sv is simulated with its own controller logic and an SDR chip model.
- run_tests.sh: boot, keyboard, disk, WIDTH 80 and HSCREEN tests, judged on
  the text screen and byte-for-byte against test-ref/ screenshots.

rtl/wd1793.sv: spt_addr and buff_wr are declared at module scope instead of
inside generate blocks. They are assigned outside those blocks; Quartus
accepted it, Verilator rejected spt_addr and silently split buff_wr into a
separate net. No change on the FPGA (FM-7 made the same fix).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-02 07:15:44 -04:00
Alan SterembergandClaude Opus 5.5 aae1ceabf1 RS-232 Pak: decode in any MPI slot; clock the receiver from the baud generator
Two bugs kept the FujiNet HDB-DOS SY6551 carts from working:

- $FF68-$FF6B were decoded only when the Multi-Pak I/O select was slot 1
  (MPI_SCS == 0), which the OSD cannot select. With the cart in slot 3 the
  6551 was unreachable: HDB-DOS polled status forever and sent nothing. On a
  real CoCo the SCS line covers only $FF40-$FF5F and the RS-232 Pak decodes
  $FF68 itself, so it now answers in any slot.

- With CTL bit 4 = 0 ("external receive clock") the receiver ran off the fixed
  1.8475 MHz enable, i.e. 115,200 baud. HDBDW3L3_19200.CCC writes CTL=$0F, so
  it transmitted at 19,200 and received at 115,200 -- every DriveWire sector
  failed its checksum. The receiver now uses the baud generator (RX_CLK =
  TX_CLK); unchanged for CTL=$1x and for baud select 0.

Verified in the Verilator sim against the real FujiNet daemon (FujiNet-PC):
the L3 cart at 19,200 loads FujiNet CONFIG with no checksum errors.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-02 07:15:44 -04:00
shodge12 8b8cf72d1f Release Compiled Version 20260927
Release Compiled Version 20260927
2026-10-02 01:05:24 -04:00
shodge12 ede23da6b0 Timing fixes, Video mode fixes, Sound cleanup, and enabling RS-232 to physical SNAC pins.
1.	Overlay support for the detection of no rom loading on power up AND misc
    debugging. [done]
2.	Fix video HSCREEN 4 mode which is used in some demos and rs-232 terminal
	programs. [done]
3.	Reworked sound output to faithfully emulate the analog muxing in the coco.
	[done]
4.	Routing RS-232 tx/rx lines to the SNAC port for initial serial debugging
	of Fuji-Net interface. [done - untested]
2026-10-02 00:49:54 -04:00
shodge12 77ee8b8c8c First Stage Timing Updates
Changed generation of PIX_CLK.  It is no longer CLK_14, instead it is created in coco3video_mister and pushed outward. (as it should be).  Video1.stp is for watching the video signals.
The ability of using a old GIMEX video file has been removed as a feature.
2026-01-13 23:54:33 -05:00
jackyangantelope 0cc97c86d9 Update sys (#17) 2025-12-09 21:57:03 +08:00
shodge12 1da70a7929 Core changes and CSAVE support.
1.	Added support for cassette save.  To use: A) You have to have a file [anyname.cas]
	which is larger than needed.  B) Select the file through the UI Menu 'Save
	Cassette'.  C)Set 'Cass Rwd=0 / Rec=1' to 1. D) Issue your 'CSAVE "NAME"'
	E) When done, set 'Cass Rwd=0 / Rec=1' to 0 to complete the write.  The file can
	now be loaded or copied.  Note a dummy file of a specific size can be created in
	the MiSTer SSH shell in the /media/fat/games/coco3 with the command:
	'truncate -s 65536 tapefileame.cas'. [Note do NOT use over 65536 file length]
2.	Fixed serial interrupt [6551] to not be functional on slot 3 [carts].
3.	Modification of sys_top.v to override use of USER_IO for HDMI - so it can be used
	for logic analyzer debug.  This will only occur when `define	Config_Debug is
	enabled in config.v.
4.	Fixed MUGS of powerup issue occurring on some MiSTer units.
5.	Fixed incorrect application of GIME_IRQ on legacy interrupts.  Fixed race condition
	on reading IRQ status vs clearing the interrupt.
6.	Improved Castle of Tharoggad.  App now loads but locks as the graphics animate.  This
	change improved mmu usage through to CARTS.
7.	Builds now keep track of multiple builds in the same date.  It shows as V240512-001 in
	the menus.  Its also exposed to BASIC and a boot.vhd which can be enabled to autorun is
	supplied in the archive to show how it works.
8.	Additionally, on the boot.vhd disk, is a program which demonstrated how to load a font -
	IBMFONT.BAS. Run it and it maps a font much like the IBM font to the 80 column format.
	Also, a file called TESTRTC.BAS pulls the MiSTer RTC values exposed in BASIC to display
	a clock.
9.	Large improvement in the Timer function.  Code closer emulates COCO3 Timer. Fixes
	Sliphead cart.
10.	In the 20231023 release the wd1773 instances were reduced to 1 for the FDC and one for
	the FDC.  This saved space but introduced a bug when using multiple drives at the same
	time - like a copy command.  This change was removed and the copy command works again.

To Do...
1.	Add Speech / Music cart
2.	Fix Castle of Tharoggad
2024-05-14 23:00:16 -04: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
shodge12 9fe94bc5e7 OS9 Level II semi-grpx Boot FIX
CoCo3.sv - remove "v,51;" from menu.
2024-01-25 12:50:16 -05:00
shodge12 24ba4cd5fd Fixed slash issue in verilog include files and incorrect config for release.
SDC.SV and config.v modified,
2024-01-19 10:52:35 -05:00
shodge12 57f064744e PIA Changes
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
2024-01-18 11:24:57 -05:00
shodge12 0f4a413eba Minor updates to coco3fpga.sv & README.md
Nothing significant.
2024-01-13 18:15:53 -05:00
shodge12 d593e3fc4e CART and OS9 improvements. Cycle accurate 6809 at up to 9.54 Mhz.
CTF = Compile Time Feature...

1.	Interrupt system restored to previous code - improved compadibility.
2.	Changed to cycle accurate 6809 (Greg Miller) at speeds up to 9.56Mhz. [CTF]
3.	Recoded sdc and fdc to only have one instance of the wd1773.
4.	Re-added software disable in sdc [Ext 'g'].
5.	Recoded Cartridge bank switching to only exist when MiSTer slot 3 is selected. [removed soft multipak select]
6.	Moved CoCo Hardware RS-232 from always existing to only existing in multipak slot 1.
7.	Changed ADRS (SDS sig) decoding to = FF40-FF5f per hardware.
8.	Fixed coding problem in os9 driver llcocosdc to work with MPI properly. [CTF]
9.	Set default disk size to constant $555555 to fix os9 redirect problem. [CTF]
10	Disabled GART [GIMEX hardware DMA] to prevent OS9 from detecting GIMEX. [CTF]
11	Corrected missing begin statement in master timing loop.
12.	Fixed Donkey King DAPD issue in Tom Mix program [DPAD now moved joysticks to limits under dpad
13. Fixed incorrect addressing of FE00-FEFF for CARTs which gets PITFALL and RAMPAGE working
14.	Updated MiSTer framework
2023-10-23 22:44:34 -04:00
shodge12 060ebb2dc3 Pull sync 2023-10-23 19:39:30 -04:00
shodge12 7e58577658 2023 - 5.1 init...
CTF = Compile Time Feature...

1.	Interrupt system restored to previous code - improved compadibility.
2.	Changed to cycle accurate 6809 (Greg Miller) at speeds up to 9.56Mhz. [CTF]
3.	Recoded sdc and fdc to only have one instance of the wd1773.
4.	Re-added software disable in sdc [Ext 'g'].
5.	Recoded Cartridge bank switching to only exist when MiSTer slot 3 is selected. [removed soft multipak select]
6.	Moved CoCo Hardware RS-232 from always existing to only existing in multipak slot 1.
7.	Changed ADRS (SDS sig) decoding to = FF40-FF5f per hardware.
8.	Fixed coding problem in os9 driver llcocosdc to work with MPI properly. [CTF]
9.	Set default disk size to constant $555555 to fix os9 redirect problem. [CTF]
10	Disabled GART [GIMEX hardware DMA] to prevent OS9 from detecting GIMEX. [CTF]
11	Corrected missing begin statement in master timing loop.
12.	Fixed Donkey King DAPD issue in Tom Mix program [DPAD now moved joysticks to limits under dpad
13. Fixed incorrect addressing of FE00-FEFF for CARTs which gets PITFALL and RAMPAGE working
To Do
0.	Update framework
2023-10-23 19:35:57 -04:00
shodge12 94bfcdbf6b Update README.md 2023-09-12 14:52:59 -04:00
Alan Steremberg 8cb1f96855 fix 2023-02-24 15:09:40 -08:00
Alan Steremberg 6708a8632f updated sys yc 2023-02-24 15:00:43 -08:00
shodge12 32aa486cdb Update README.md 2022-04-24 09:56:14 -04:00
shodge12 a08bbd7f12 Setting up for Multiple Config Builds.
First features setting up horz and vert ints to Mister_video correctly.
2022-04-24 09:55:52 -04:00
shodge12 3d8bd2e279 Merge branch 'master' of https://github.com/MiSTer-devel/CoCo3_MiSTer 2022-03-01 02:07:09 -05:00
shodge12 86e61ca25c Addressing some int reset issues...
Now GIME.bas shows the correct number of lines....
2022-03-01 02:06:56 -05:00
shodge12 f375d7e245 Add new speeds and better GIME-X support.
Added GIME-X interface for Turbo operation including new 2.68 Mhz AND 9.54 Mhz.

Additionally - minor GIME-X code alignments in the addressing section added.
2022-02-26 17:16:58 -05:00
shodge12 40a82bab83 Merge branch 'master' of https://github.com/MiSTer-devel/CoCo3_MiSTer 2022-02-26 17:07:24 -05:00
shodge12 9a03739b2c Add new speeds and better GIME-X support.
Added GIME-X interface for Turbo operation including new 2.68 Mhz AND 9.54 Mhz.

Additionally - minor GIME-X code alignments in the addressing section added.
2022-02-26 17:07:09 -05:00
shodge12 8767e24f65 Release 20220219
Release of the following:
1. CoCoSDC now operates at 7.16Mhz without errors.
2. CoCoSDC moved to slot 2.  Here it only has 2 drives.  They can be ss/ds 35/40/80 or superfloppies.  Menu added to allow selection of slot 4 drives [4] while selected for slot 2- OS9 can use.
3. Added mouse to joystick support for the right mouse.  Works with GSHELL.
4. Doc update.
2022-02-19 20:25:28 -05:00
shodge12 b12ca71d12 Release 20220219
Minor update to menu.
Release of the following:
1. CoCoSDC now operates at 7.16Mhz without errors.
2. CoCoSDC moved to slot 2.  Here it only has 2 drives.  They can be ss/ds 35/40/80 or superfloppies.  Menu added to allow selection of slot 4 drives [4] while selected for slot 2- OS9 can use.
3. Added mouse to joystick support for the right mouse.  Works with GSHELL.
4. Doc update.
2022-02-19 20:21:36 -05:00
shodge12 7f9de829a7 Beta Release...1
Cocosdc is slot 2.
Working at 7.16Mhz [rd & wr]
EOU can access floppy in slot 4...
Menu updated.
Mouse sub for right joy including button.
2022-02-18 22:12:46 -05:00
shodge12 7c685576c4 OSD Menu Cleanup... 2022-02-17 13:05:56 -05:00
shodge12 85b889b615 Moved cocosdc to slot 2...
Cocosdc with 2 .vhd and 2 floppies now in mpi slot 2.  Fdc stinn in slot 4 and now both run under os9.
2022-02-17 01:48:11 -05:00
shodge12 7535dc87fc Fixed drive selection bug.
Code now works coping data from one sdc drive with another...
2022-02-15 17:35:09 -05:00
shodge12 90672316c7 Merge branch 'master' of https://github.com/MiSTer-devel/CoCo3_MiSTer 2022-02-14 20:33:20 -05:00
shodge12 d7216d1361 Added HALT to sdc state mach to fix 7.16Mhz
Re-coded sdc state mach using typedef.  Added halt to state mach to allow for MiSTer's slow sector response and compensate for os9 timeouts.

This code works at 7.16Mhz.
2022-02-14 20:33:12 -05:00
shodge12 44af977106 20220211 Release...
Added register level compatibility to be able to run NitrOS9 EOU vhd distributions.
2022-02-11 20:49:24 -05:00
shodge12 6c2f37c250 Delete CoCo3_20220210.rbf
Wrong date
2022-02-11 20:47:37 -05:00
shodge12 e302f9108a 20220211 Release
Added cocosdc register compatibility for running NitrOS9 EOU vhd distrobutions.
2022-02-11 20:46:07 -05:00