English Amiga Board


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

 
 
Thread Tools
Old 14 May 2017, 14:54   #1
earok
Moderator

 
Join Date: Dec 2013
Location: Auckland
Posts: 1,529
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  
AdSense AdSense  
Old 14 May 2017, 16:22   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,791
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 offline  
Old 14 May 2017, 16:27   #3
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 3,050
Doesn't the CD32 have a certain OS version (exec.library version?) you could check for?
idrougge is offline  
Old 15 May 2017, 02:17   #4
earok
Moderator

 
Join Date: Dec 2013
Location: Auckland
Posts: 1,529
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, 09:43   #5
musashi5150
move.w #$4489,$dff07e
musashi5150's Avatar
 
Join Date: Sep 2005
Location: Norfolk, UK
Age: 36
Posts: 2,284
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 12:06.
musashi5150 is offline  
Old 15 May 2017, 21:18   #6
Cylon
Registered User

 
Join Date: Oct 2014
Location: Europe
Posts: 466
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, 22:44   #7
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,023
Use FindResident() to check for the presence of freeanim.library, it's exclusive to CD32.
Leffmann is offline  
Old 15 May 2017, 23:33   #8
earok
Moderator

 
Join Date: Dec 2013
Location: Auckland
Posts: 1,529
thanks guys much appreciated
earok is offline  
Old 14 September 2017, 14:17   #9
earok
Moderator

 
Join Date: Dec 2013
Location: Auckland
Posts: 1,529
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 14:23.
earok is offline  
Old 14 September 2017, 15:41   #10
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,023
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, 13:13   #11
earok
Moderator

 
Join Date: Dec 2013
Location: Auckland
Posts: 1,529
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, 16:19   #12
Akira
Registered User

Akira's Avatar
 
Join Date: May 2001
Location: New York
Posts: 18,192
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.
Akira is offline  
AdSense AdSense  
 


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 15:14
Simple tutorial required for running Amiga emulator on a Mac Pauly79 support.FS-UAE 1 10 February 2014 13:38
Using CD32 pad on A1200 running CD32 games issue RetroPaul support.Games 23 15 October 2013 00:51
What game is this CD32 running? Cauterize Looking for a game name ? 2 19 September 2011 11:54
simple menu for cd32? thinlega New to Emulation or Amiga scene 0 03 January 2002 00: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 01:15.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.29326 seconds with 14 queries