Hello everyone.
Directly to the point: Since months ago, I noticed that CDDA doesn't play with USA 1.10 BIOS, only after going to the BIOS setup settings; if the BIOS sequence is inmediately skipped, it works entirely normal.
With JAP BIOS, the CDDA simply doesn't play (though the LED keeps turned on)
I have absolutely no clue about what is really happening, since I do exactly what the manual/macros states.
Any ideas? Thanks
CDDA oddities
Moderator: Mask of Destiny
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
Let's go over the basics to make sure you didn't miss something...
First you init the drive:
Then you fetch the disc info:
Assuming you find a disc, then fetch the track info for the track you wish to play/read:
Assuming it's an audio track, we then play it:
If you wonder why I'm using the communication registers for everything, the code is from my Wolf32X mode 1 source. The MD side is controlling the CD side through the comm regs, getting info back through the comm registers. If you are using this all on the CD side, just use global vars in ram instead of the comm regs.
First you init the drive:
Code: Select all
lea drive_init_parms(pc),a0
move.w #0x0010,d0 /* DRVINIT */
jsr 0x5F22.w /* call CDBIOS function */
move.w #0x0089,d0 /* CDCSTOP - stop reading data */
jsr 0x5F22.w /* call CDBIOS function */
...
.align 2
drive_init_parms:
.byte 0x01, 0xFF /* first track (1), last track (all) */
Code: Select all
move.w #0x0081,d0 /* CDBSTAT */
jsr 0x5F22.w /* call CDBIOS function */
move.w 0(a0),0x8020.w /* BIOS status word */
move.w 16(a0),0x8022.w /* First song number, Last song number */
move.w 18(a0),0x8024.w /* Drive version, Flag */
Code: Select all
move.w 0x8010.w,d1 /* track number */
move.w #0x0083,d0 /* CDBTOCREAD */
jsr 0x5F22.w /* call CDBIOS function */
move.l d0,0x8020.w /* MMSSFFTN */
move.b d1,0x8024.w /* track type */
Code: Select all
move.w #0x0002,d0 /* MSCSTOP - stop playing */
jsr 0x5F22.w /* call CDBIOS function */
move.w 0x8010.w,d1 /* track number */
move.w #0x0011,d0 /* MSCPLAY - play from track on */
move.b 0x8012.w,d2 /* flag */
bmi.b 2f
beq.b 1f
move.w #0x0013,d0 /* MSCPLAYR - play with repeat */
bra.b 2f
1:
move.w #0x0012,d0 /* MSCPLAY1 - play once */
2:
lea track_number(pc),a0
move.w d1,(a0)
jsr 0x5F22.w /* call CDBIOS function */
...
track_number:
.word 0
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm