Commit Graph

20 Commits

Author SHA1 Message Date
Andre Zeps
d53c682fcc CDIC: Rewritten audio state machine
- Changes based on findings of the CDIC_BlackBoxAnalyzer project
  - Removed side channel for audio coding
    - A real CDIC reads the audio coding always from RAM
  - Removed the concept of the audio tick found in MAME
    - A real CDIC performs audio playback asynchronous to the CD reading
- Seek time now 19 sectors
  - Fixes audio glitch in "Help cutscene" in "Zelda - Wand of Gamelon"
    "Remember, tools can only be used..."
- Fixes audio regression during "Hotel Mario" score screen
- Fixed spurious IRQ caused by sector data interrupt after reading stopped
  - Should fix hang on shopkeeper cutscene in "Zelda - Wand of Gamelon"
    (Cannot be reproduced or is very unlikely now)
2025-03-17 21:58:10 +01:00
Andre Zeps
b9707f84be MCD212: Added debug option for ICA execution line
- The new behavior based on 210/05 measurements
  added in 20250214 is hidden in the debug menu
- Original video timing from before is restored
- Fixes boot of "The Flowers of Robert Mapplethorpe"
2025-02-23 20:37:25 +01:00
Andre Zeps
53a483951d CDIC: Fixed subchannel data for CDDA
Also introduces negative LBA for TOC reading
2025-01-17 20:21:32 +01:00
Andre Zeps
e0991d0753 CDIC: Added experimental CDDA support
- Fixes audio in "The Apprentice (USA)"
- Adds stub TOC to satisfy "The Apprentice (USA)"
  during starting phase
2024-12-30 15:39:31 +01:00
Andre Zeps
d3deec71db CDIC: Add Seek command and subchannel data frame
- Fixes bootup of Flashback
- Change requires additional data from Main
  but is compatible with the previous Main as well.
2024-12-23 02:04:45 +01:00
Andre Zeps
6fdde4fc13 MCD212: Altered transparency calculations
- Fixes some invisible graphics
  in Tangram and PAWS.

Slightly more correct but still ignoring regions.
2024-12-23 01:37:46 +01:00
Andre Zeps
ada397c589 MCD212: Add support for the Standard bit
- Allows NTSC material being usable on PAL modes.
- Reduces horizontal resolution from 384 to 360 pixels
  and vertical resolution from 280 to 240.
- Fixes glitched graphics in Flashback intro.
  Game is still hanging after intro.
2024-12-23 01:37:46 +01:00
Andre Zeps
224b33c912 HPS: Added NvRAM backup and restore
Save files compatible with MAME.
It's just a 8kB memory dump
2024-12-12 07:29:13 +01:00
Andre Zeps
0f51aae7eb CDIC: Add audiomap and related features
- Added state management for audiomap usage
- Added coding dependent sector playback delay
- Basic seeking time simulation and constant data rate
- Removed debugging option to disable MODE2 filters
- Added a lot documentation about expectations of
  the CDIC to the code
- Splitted off all audio playback into seperate file
- Added DC bias filter to reduce pops between playbacks
- Fixed wrong sample during underflow of FIFO
- Added two sample delay for ADPCM
  Fixes frequent clicks and pops due to latency of ADPCM calculation
- Buffer management now equal to CDIC emulation of MAME
  Uses internal bank switching to avoid ADPCM overwrite
  Stabilizes intro of "Zelda's Adventure" and "Hotel Mario"

SCC68070: DMA support for transfer to CDIC memory

Added additional test roms to verify the additions

Known issues:
- Hotel Mario hangs during score screen
- Frog Feast hangs ingame
2024-11-15 12:18:55 +01:00
Andre Zeps
455e42414f Cleanup of simulation 2024-10-03 18:44:17 +02:00
Andre Zeps
2995dcb826 Add components for booting software from disc
- Implement data reading state machine in CDIC
- Implement required interface to HPS for reading
  cd sector data
- Add DMA support to CPU which is required
  by the CDIC driver to get sector data into main
  memory
- Add INT1 and INT2 to SCC68070
- Can boot into the demo of Frog Feast
- Servo HLE fixed to closed tray with
  inserted CDi medium
- Add video IRQ
2024-09-20 21:51:32 +02:00
Andre Zeps
a8aea63528 6805: fixed IRQ masking
also removed obsolete irq cooldown
2024-09-09 13:34:13 +02:00
Andre Zeps
d05f1fb295 Slave controller features
- Added servo controller SPI fake communication
  Behaves as a closed but empty tray
- Added pointing device emulation
  MiSTer joystick data used as input
  Behaves like a maneuvering device
- Added SCI IRQ to 6805 cpu core
- Added SPI and SCI to 6805 uC
- Fixed spurious 68k chip select for slave
- Added documentation about I2C to the Front LCD
- Simulated U3090MG no longer causes front panel button presses
  Lead to spurious IRQs before
- Removal of slave memory patches
2024-09-03 11:58:26 +02:00
Andre Zeps
15639a7953 Implement STAND signal
Removal of PAL/NTSC workaround
NTSC video currently not supported
2024-08-30 21:18:08 +02:00
Andre Zeps
dc5cb2e735 Second video channel and mouse cursor
- Added ICA1 and FILE1
- CLUT implemented as True Dual-Port RAM to allow
  writing and reading with two video channels
- Added weight calculations
- Mouse cursor
2024-08-26 21:50:07 +02:00
Andre Zeps
74bff4c5ce Removed slave rom from FPGA bitstream
Added ioctl_download for slave rom
boot0.rom is expected to be the main cpu rom
boot1.rom is expected to be the slave rom
2024-08-18 20:02:33 +02:00
Andre Zeps
738bd44379 Boot fixes and video implementation
- Attach display file and ICA to SDRAM
- Fixed byte order of 8 bit accesses by CPU
- Added SDRAM burst mode to fix video timing
- Fixed missing reset behavior of some components
- Added optional SDRAM zeroing
- Added SDRAM refresh during ROM download
- Added OS aware syscall parser to simulation
- Fixed SCC68070 on-chip interrupt autovector
- Fixed SCC68070 Timer0 frequency
- Added video pixel data FIFO
- Changed SDRAM auto refresh command
2024-08-17 22:32:51 +02:00
Andre Zeps
d20230609b Low level test functional
- SDRAM controller added
- fixed 6805 bus timing with clk enable signal
- fixed 6805 latch warnings in quartus
- added 6805 reset logic
- added 6805 ram zeroing after reset
- fixed synthesis and timing of CDIC memory
- MCD212 cpu bridge interfaces with SDRAM
- fixed NvRAM memory timing
- fixed spurious sdram access in reset
- removed fake display_active flag
- added SDRAM refresh logic
- added real UART to SCC68070
- switched simulation top level to real MiSTer core

video is corrupted and needs fixes
2024-07-29 20:52:21 +02:00
Andre Zeps
29005d5c2a MCD212 video demo
- CLUT7 RLE
- Video timing according to datasheet
- Example framebuffer in block ram
  as SDRAM interface is not finished yet
- simulation can export video signal to PNG
- design can be synthesized and fitted but CPU parts are not functional
2024-07-29 20:04:42 +02:00
Andre Zeps
b99ab86b09 First public release
- SCC68070 is booting cdi200.rom
- SLAVE is communicating with the CPU
- MCD212 only implements memory map
- IRQs incomplete
- CDIC missing
- MiSTer interface missing
2024-07-08 19:22:59 +02:00