English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. Blitz Basic

 
 
Thread Tools
Old 14 May 2017, 13:54   #1
earok
Registered User
 
Join Date: Dec 2013
Location: Auckland
Posts: 3,539
Simple way to check that the game is running on a CD32?

There's certain things that I'd like to enable by default if the game detects it is running on a CD32, such as CD music, NVRAM saving and CD32 Pad support,

Does anyone know if there's any simple way to check that we're running from a CD32? Perhaps a peek somewhere that checks that the Akiko chip is present..?
earok is offline  
Old 14 May 2017, 15:22   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
If game uses cd.device to play cd audio (Does not use direct hardware access to CD hardware), it probably is not good idea to do any hardware checks because it would be incompatible with any A1200/A4000 CD32 emulator.

Attempting to open cd.device is probably easiest way. Pad can be easily checked if lowlevel.library opens and reports inserted CD32 pad. nonvolatile.library for NVRAM.
Toni Wilen is online now  
Old 14 May 2017, 15:27   #3
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 4,332
Doesn't the CD32 have a certain OS version (exec.library version?) you could check for?
idrougge is offline  
Old 15 May 2017, 01:17   #4
earok
Registered User
 
Join Date: Dec 2013
Location: Auckland
Posts: 3,539
Thanks guys, I'll keep those in mind

Dwelling on it further, I could handle the three things separately perhaps -

- Nonvolatile can still be used on NVRAM-less systems (saves to ENV or ENVARC I believe)
- CD.device could still be used for CD music on A1200s I presume
- CD32 pads may be used by A1200 owners, and some CD32 owners may prefer one or two button joysticks

Embarrassingly enough I have no experience with opening libraries in Blitz.. I'll see what I can work out.
earok is offline  
Old 15 May 2017, 08:43   #5
musashi5150
move.w #$4489,$dff07e
 
musashi5150's Avatar
 
Join Date: Sep 2005
Location: Norfolk, UK
Age: 42
Posts: 2,351
On graphics.library v40+, check the ChunkyToPlanarPtr. If it's NULL, there's no Akiko hardware = no CD32.

Last edited by musashi5150; 15 May 2017 at 11:06.
musashi5150 is offline  
Old 15 May 2017, 20:18   #6
Cylon
Registered User
 
Join Date: Oct 2014
Location: Europe
Posts: 470
One could also check for resources/ports only existing on CD32 (or CDTV for that matter), like bookit, cdplayer or similar.
Cylon is offline  
Old 15 May 2017, 21:44   #7
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
Use FindResident() to check for the presence of freeanim.library, it's exclusive to CD32.
Leffmann is offline  
Old 15 May 2017, 22:33   #8
earok
Registered User
 
Join Date: Dec 2013
Location: Auckland
Posts: 3,539
thanks guys much appreciated
earok is offline  
Old 14 September 2017, 13:17   #9
earok
Registered User
 
Join Date: Dec 2013
Location: Auckland
Posts: 3,539
Found the simplest check: The "InitCD32" command in Acid's cd32lib

Seems to be able to tell at a ROM level, eg in my WinUAE setup, just changing the ROM (and the ROM alone) from CD32 to A1200 changed the result from true to false.

Edit: Watching the behavior in Snoopdos, it appears the command just opens "CD.Device" (part of the CD32 rom?)

Last edited by earok; 14 September 2017 at 13:23.
earok is offline  
Old 14 September 2017, 14:41   #10
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
Quote:
Originally Posted by earok View Post
Edit: Watching the behavior in Snoopdos, it appears the command just opens "CD.Device" (part of the CD32 rom?)
It's part of the CD32 extended ROM, but it's also available on Aminet for installation in Workbench, though I don't think it's very commonly used.
Leffmann is offline  
Old 16 September 2017, 12:13   #11
earok
Registered User
 
Join Date: Dec 2013
Location: Auckland
Posts: 3,539
Quote:
Originally Posted by Leffmann View Post
It's part of the CD32 extended ROM, but it's also available on Aminet for installation in Workbench, though I don't think it's very commonly used.
thanks.

I did a bit of digging and it seems that perhaps Worms uses the function to work out if there's a CD32 pad plugged in. Except - some A1200 users were using CD.Device to play the game, and ended up getting stuck without having a pad installed, so there was a fan patch to fix the problem.
earok is offline  
Old 18 September 2017, 15:19   #12
Amiga1992
Registered User
 
Join Date: May 2001
Location: ?
Posts: 19,645
So I guess if you replace the kickstart ROMs for standard ones, there's no way to tell a CD32 from an A1200?
Is there any way to check for the presence of the bootup animation? Like, a certain byte at a certain memory location.
Amiga1992 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
CD32 / SX32 VJ Gear ! DJ's and VJ's check it out! VJagentONE MarketPlace 4 22 September 2014 14:14
Simple tutorial required for running Amiga emulator on a Mac Pauly79 support.FS-UAE 1 10 February 2014 12:38
Using CD32 pad on A1200 running CD32 games issue RetroPaul support.Games 23 14 October 2013 23:51
What game is this CD32 running? Cauterize Looking for a game name ? 2 19 September 2011 10:54
simple menu for cd32? thinlega New to Emulation or Amiga scene 0 02 January 2002 23:09

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 10:37.

Top

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