English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 14 June 2016, 18:18   #21
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,197
Great guesswork. I guess floppy interface was very helpful.
I just meant "how is it done in rom code"
jotd is offline  
Old 14 June 2016, 19:48   #22
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,516
Quote:
Originally Posted by jotd View Post
Great guesswork. I guess floppy interface was very helpful.
I just meant "how is it done in rom code"
It was extremely useful

ROM code uses usual DMA mode. Both sent commands and received status packets are read/write by DMA to 256 byte circular buffers. IMHO it is overly complex method to send/receive small 2-20 byte commands. It won't really help with CPU usage. Data sector transfers and CD+G subchannel info needs DMA, not simple commands..

(Maybe I'll do CDTV low level loader someday too.. Doing strange hardware banging code is always interesting)
Toni Wilen is offline  
Old 14 June 2016, 21:46   #23
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,197
Ok, I guess RN code uses DMA then, but I prefer yours, since I agree that once CD is started, CPU is not really used so DMA or not, well, not really useful.

If you do CDTV sector/file reader, I'll be interested to adapt CD32load to CDTV, even with 1MB only some games could be runnable.

Well, Psygore did all the heavy lifting with raw=>files reading in his CD32loader but since there is no source provided despite my numerous attempts for him to provide it, you would have to recode all the stuff!
jotd is offline  
Old 23 March 2017, 17:00   #24
turrican3
Moon 1969 = amiga 1985
 
turrican3's Avatar
 
Join Date: Apr 2007
Location: belgium
Age: 48
Posts: 3,913
Is the project discontinued ???
turrican3 is offline  
Old 29 December 2023, 02:28   #25
girv
Mostly Harmless
 
girv's Avatar
 
Join Date: Aug 2004
Location: Northern Ireland
Posts: 1,114
I'm trying to use this on FSUAE, with the modified version from CD32Load, but not really sure if I'm doing it right. I'm using my own .cue file referencing the ISO data track and a couple of test .wav files ... the disc boots in a real CD32 and the audio tracks can be played fine on my laptop.

I'm calling cdaudio_play_track(2, 0) but it hangs at the first 'sendbyte' in the btst#30,d1 loop. Is there anything I need to set up before calling this?
girv is offline  
Old 29 December 2023, 09:24   #26
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,197
not sure FSUae supports this. Have you tried one of my cd32 converted audio games first?. WinUAE supports that, real hw of course but other emus I don't know
jotd is offline  
Old 29 December 2023, 13:10   #27
girv
Mostly Harmless
 
girv's Avatar
 
Join Date: Aug 2004
Location: Northern Ireland
Posts: 1,114
You're right, it's not supported in FSUAE

I got it working in WinUAE - at least for a track on the title screen.

For the record I set just bit #29 in Akiko's INTENA as that was the only interrupt bit the PIO code seemed to use.

EDIT: Where can your CD conversions be downloaded?
girv is offline  
Old 29 December 2023, 23:15   #28
girv
Mostly Harmless
 
girv's Avatar
 
Join Date: Aug 2004
Location: Northern Ireland
Posts: 1,114
What does 'cdaudio_monitor_play_blocking' do?

Also ... no way to control volume of CD audio?

Last edited by girv; 30 December 2023 at 00:21.
girv is offline  
Old 30 December 2023, 09:52   #29
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,197
girv you can get most of them from this page

https://eab.abime.net/showthread.php...cement+project

No you cannot change CD audio volume on CD32. It was possible on CDTV, but that was before someone had the brilliant idea to save money on that part.
jotd is offline  
Old 22 January 2024, 17:28   #30
girv
Mostly Harmless
 
girv's Avatar
 
Join Date: Aug 2004
Location: Northern Ireland
Posts: 1,114
Small problem, in that the game freezes while the CD seeks to the start of the track to loop the music, I guess because it's PIO and looping waiting on the hardware status to change. Maybe I could convert it to run off VBL ticks or something, or is there a DMA based CD audio player that would work better?
girv is offline  
Old 22 January 2024, 18:07   #31
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,197
There is no DMA based CD player in full hardware banging mode. Toni wrote the pio version because he thought that DMA wasn't needed. Maybe it's true except for track changes or loop.
jotd is offline  
Old 22 January 2024, 21:56   #32
girv
Mostly Harmless
 
girv's Avatar
 
Join Date: Aug 2004
Location: Northern Ireland
Posts: 1,114
I had a look at the comments about DMA commands in WinUAE source. Looks OK, apart from the 1Kb alignment on the buffer.

BUT ... the version of the PIO player I had was re-reading the TOC every time before playing a track. I put a flag in so this was skipped if it had already been done, and the play command seems to execute quickly enough to not hang up the game. I made it reread the TOC when the game starts just to be sure. Tested on a real CD32.

The only bit I was a little concerned about was the "flush" step before the TOC. I don't think I would need this after the first time really though.
girv is offline  
Old 22 January 2024, 22:10   #33
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,197
I'm interested by the change you made in the PIO player!
jotd is offline  
Old 22 January 2024, 22:17   #34
girv
Mostly Harmless
 
girv's Avatar
 
Join Date: Aug 2004
Location: Northern Ireland
Posts: 1,114
Very simple, just a flag around the TOC reading so it's only done once. I'm sure you can adapt it to pcrel

I clear the flag before I start the title screen and again before the game starts, just so it gets refreshed. I don't really think this is necessary though.

Code:
                tst.w       toc_done
                bne         skiptoc

	; flush possible half-transmitted
	; command, 12 bytes is max command length
                moveq       #12/2+1-1,d4
flushit:        lea         cmd_led_off(pc),a0
                bsr         sendcmd
                lea         cmd_led_on(pc),a0
                bsr         sendcmd
                dbf         d4,flushit

                lea         cmd_toc(pc),a0
                bsr         sendcmd
waittoc:        move.b      toc_total(pc),d0
                beq.s       waittoc
                cmp.b       toc_found(pc),d0
                bne.s       waittoc

                st          toc_done

skiptoc:        move.l      d6,d0               ;track number to play (1-99)
girv is offline  
Old 23 January 2024, 08:24   #35
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,197
thanks! I'm going to use the "flu-shit" label more often from now on
jotd is offline  
Old 23 January 2024, 09:52   #36
girv
Mostly Harmless
 
girv's Avatar
 
Join Date: Aug 2004
Location: Northern Ireland
Posts: 1,114
Quote:
Originally Posted by jotd View Post
thanks! I'm going to use the "flu-shit" label more often from now on

That's already your label Just to be clear, I only added the three lines in bold around your existing code.
girv is offline  
Old 23 January 2024, 10:31   #37
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,197
must be Toni's

yeah, I see your changes. Will integrate in CD32load that will be a nice improvement!

(ok but I'll have to re-master all CD versions of games...)
jotd is offline  
Old 23 January 2024, 10:42   #38
alexh
Thalion Webshrine
 
alexh's Avatar
 
Join Date: Jan 2004
Location: Oxford
Posts: 14,354
Quote:
Originally Posted by jotd View Post
I'll have to re-master all CD versions of games...
Is that something you can script for the future? Change CD32Load and call a script to automatically remasters all CD images? Put a version file on each disc?
alexh is offline  
Old 23 January 2024, 10:52   #39
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,197
I could, as I can still use mkisocdfs for small ISO content.

But that's not a frequent change. And the images aren't really officially distributed anywhere besides my dropbox. Maybe on eab ftp...
jotd is offline  
Old 23 January 2024, 16:41   #40
girv
Mostly Harmless
 
girv's Avatar
 
Join Date: Aug 2004
Location: Northern Ireland
Posts: 1,114
I would be interested to see if this change works in more games too.
girv is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Amiga audio channel split by hardware? Amiga1992 Hardware mods 58 20 January 2013 11:12
Amiga audio hardware trivia Toni Wilen Coders. General 12 23 September 2010 18:14
Audio hardware pron! Paul_s Hardware pics 3 23 September 2009 17:08
How to read the CD32-Pad with Atmega8? CrazyIcecap request.Other 14 27 September 2008 18:57
Audio difference HARDWARE/HOST glue support.WinUAE 2 10 January 2008 07:26

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 06:44.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.10723 seconds with 16 queries