@DATABASE HowToCode7 @NODE MAIN "HowToCode: Programming CDTV" @toc howtocode:howtocode/MAIN Programming CDTV/A570 --------------------- Until now there has been no CDTV documentation available to the public... Well, here are a few tips..... 1 @{" Using cdtv.device " link cdtvdevice} 2 @{" Checking for A570 CD-ROM " link a570} 3 @{" AmigaCD 32 " link amigacd32} @endnode @node cdtvdevice "Using cdtv.device" Using cdtv.device ----------------- The CDTV can be controlled by the cdtv.device, which is a standard Amiga device. Open the cdtv.device as standard, and issue commands to it to play audio, read data, etc... Examine @{" cdtv.i " link howtocode:source/include/cdtv.i/MAIN}, included in the source directory. For example: To play track 2 on an audio CD in a CDTV, use the following: include "cdtv.i" ...... your code here ...... move.l MyCDTVRequest,a1 ; set this up as for any ; other device (eg trackdisk.device) move.w #CDTV_PLAYTRACK,IO_COMMAND(a1) move.l #2,IO_OFFSET(a1) ; track number move.l #1,IO_LENGTH(a1) ; number of tracks to play move.l 4.w,a6 jsr _LVOSendIO(a6) ; send command If you need to gain extra memory, you can shut down the cdtv.device (apparently) by issuing a CDTV_STOP command to the device. @endnode @node a570 "Checking for A570" Checking for A570 ----------------- You can tell if you are running on an A570 (as opposed to CDTV) by checking for "A690ID" with the @{" FindResident " link findresident } function. FindResident("A690ID") If it returns NULL then it's not A570, if it returns an address then its an A570 @endnode @node findresident "exec.library/FindResident()" FindResident - find a resident module by name resident = FindResident(name) D0 -96 A1 struct Resident *FindResident(STRPTR); Search the system resident tag list for a resident tag ("ROMTag") with the given name. If found return a pointer to the resident tag structure, else return zero. IN: name - pointer to name. OUT: resident - pointer to the resident tag structure (or NULL) @endnode @node amigacd32 "AmigaCD 32 information" As HTC7 was going to press the AmigaCD32 had been launched in Germany, and UK launch is imminent (July 16th): AmigaCD32 is: 68020 14Mhz processor unit, double speed CD-ROM. Will run AmigaCD, CD+G, CDTV and CD Audio discs. It contains AGA chipset and Kickstart 3.1. It has two joystick/mouse ports, Composite video, RF (PAL), S-VHX and AUX (A4000 keyboard port). There are *NO* other AMiga ports. No RGB (so no monitors...) no Serial or Parallel (so no Parnet!!!!), and most strange of all - no floppy disk drive port :-( It is being sold as a games console to rival Nintendo and Sega. The most interesting new feature is a new piece of hardware to do *fast* chunky to planar pixel conversion. Hopefully this will be fitted to the Amiga 1200 and 4000 in time... Programming is done in the same way as any other Amiga model. There are some new libraries and devies, including lowlevel.library, that allows direct control of the new joypad controller (with 10 buttons) @endnode