ascrnet Posted November 6, 2019 Share Posted November 6, 2019 Hi all, Friends I publish this program that I developed to detect easily and quickly the hardware that our ATARI has, I would like to try it and tell me if it detects well. Any suggestions or improvements will also be welcome. XEX : https://github.com/ascrnet/HW-Detect/releases Source code : https://github.com/ascrnet/HW-Detect Regards 2 1 Quote Link to comment Share on other sites More sharing options...
Rybags Posted November 6, 2019 Share Posted November 6, 2019 Does it give CPU speed? A quick/dirty method would probably be to see how many register increments could be done in a certain VCount duration. Does it give extra Ram info like type (Rambo, Compy) and if seperate Antic access is available? Quote Link to comment Share on other sites More sharing options...
ascrnet Posted November 7, 2019 Author Share Posted November 7, 2019 1 hour ago, Rybags said: Does it give CPU speed? A quick/dirty method would probably be to see how many register increments could be done in a certain VCount duration. Does it give extra Ram info like type (Rambo, Compy) and if seperate Antic access is available? It would be easier to detect the GTIA NTSC CPU speed = 1.79 MHz or PAL CPU speed = 1.77 MHz for the XL / XE / XEGS series what I did is detect RAM from 65kb to 2112kb using the documentation of http://atariki.krap.pl/index.php/Obsługa_standardowego_rozszerzenia_pamięci_RAM I didn't understand you about the ANTIC, if it's NTSC or PAL?? regards Quote Link to comment Share on other sites More sharing options...
+CharlieChaplin Posted November 7, 2019 Share Posted November 7, 2019 Well, did a fast test with Atari 800 Win emulator. Almost all things worked fine (showed NTSC or PAL correctly, showed Basic Rev. correctly, etc.), but when I set the emulator to 1088k Rambo mode then control characters appeared at various places (top, bottom, etc.). Quote Link to comment Share on other sites More sharing options...
ascrnet Posted November 7, 2019 Author Share Posted November 7, 2019 44 minutes ago, CharlieChaplin said: Well, did a fast test with Atari 800 Win emulator. Almost all things worked fine (showed NTSC or PAL correctly, showed Basic Rev. correctly, etc.), but when I set the emulator to 1088k Rambo mode then control characters appeared at various places (top, bottom, etc.). Thank you, version 1.1 is already fixed. I wait for tests on real hardware. ? Regards Quote Link to comment Share on other sites More sharing options...
+Stephen Posted November 7, 2019 Share Posted November 7, 2019 1 hour ago, ascrnet said: Thank you, version 1.1 is already fixed. I wait for tests on real hardware. ? Regards I'll try to make time to check this out tomorrow on my 1088XLD (PAL, U1MB, stereo, VBXE). Quote Link to comment Share on other sites More sharing options...
Rybags Posted November 7, 2019 Share Posted November 7, 2019 Re CPU speed I was more along the lines of accelerators at 3.6, 7.2, 14.4 MHz. Though of course yes, detecting Antic swaps would also be handy. Though you can only really deduce that by the scanline maximum not matching what would be expected from the GTIA PAL register - and generally GTIA only swaps aren't done so you'd probably not worry too much. If both chips are swapped though and the master clock is still the same, I don't think you'd be able to detect it (though it'd be a rarity and you'd have to ask why anyone would bother). 1 Quote Link to comment Share on other sites More sharing options...
ascrnet Posted November 7, 2019 Author Share Posted November 7, 2019 12 hours ago, Stephen said: I'll try to make time to check this out tomorrow on my 1088XLD (PAL, U1MB, stereo, VBXE). there's no hurry? 11 hours ago, Rybags said: Re CPU speed I was more along the lines of accelerators at 3.6, 7.2, 14.4 MHz. Though of course yes, detecting Antic swaps would also be handy. Though you can only really deduce that by the scanline maximum not matching what would be expected from the GTIA PAL register - and generally GTIA only swaps aren't done so you'd probably not worry too much. If both chips are swapped though and the master clock is still the same, I don't think you'd be able to detect it (though it'd be a rarity and you'd have to ask why anyone would bother). I understand you but I think that 99% of users have the default CPU without acceleration. The same is also true for using different ANTIC and PAL chips. I would like to be able to call the Missile Command in XEGS by pressing a key, I have tried it but without success. Other ideas would be to detect some custom OS like Qmeg among other things. regards Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted November 7, 2019 Share Posted November 7, 2019 57 minutes ago, ascrnet said: The same is also true for using different ANTIC and PAL chips. You can establish whether ANTIC is PAL or NTSC by looping on VCOUNT until it flips over to zero (or reads less than the currently recorded value), which gives you the maximum VCOUNT value. If it reaches $9B, ANTIC is PAL. Coupled with the GTIA PAL bit, you can then denote ANTIC as an FPS value: NTSC/60 PAL/50 PAL/60 or NTSC/50 Since it takes barely any extra code to accomplish this, it's possibly worth including. 1 hour ago, ascrnet said: I would like to be able to call the Missile Command in XEGS by pressing a key You can establish whether the machine is an XEGS by clearing bit 6 of PORTB and checking for RAM in the cartridge address space. If ROM if found, you could initialise and start the cartridge with a few lines of code. I suppose you could do other things such as checking for RAM under the OS, etc, and thereby be able to report the host machine as a 400/800, XL/XE, or XEGS. 2 Quote Link to comment Share on other sites More sharing options...
tebe Posted November 7, 2019 Share Posted November 7, 2019 (edited) http://mads.atari8.info/library/doc/misc.html DetectCPU DetectCPUSpeed DetectEvie DetectHighMem DetectMapRam DetectMem DetectStereo DetectVBXE detect.obx detect.pas Edited November 7, 2019 by tebe 7 Quote Link to comment Share on other sites More sharing options...
xxl Posted November 7, 2019 Share Posted November 7, 2019 test if CPU in addition to unpublished stable commands performs unstable also? Quote Link to comment Share on other sites More sharing options...
ivop Posted November 7, 2019 Share Posted November 7, 2019 37 minutes ago, xxl said: test if CPU in addition to unpublished stable commands performs unstable also? I assume to differentiate between NMOS and CMOS? Could you elaborate? Quote Link to comment Share on other sites More sharing options...
xxl Posted November 7, 2019 Share Posted November 7, 2019 no, there are such differences within NMOS 1 Quote Link to comment Share on other sites More sharing options...
ascrnet Posted November 7, 2019 Author Share Posted November 7, 2019 4 hours ago, flashjazzcat said: You can establish whether ANTIC is PAL or NTSC by looping on VCOUNT until it flips over to zero (or reads less than the currently recorded value), which gives you the maximum VCOUNT value. If it reaches $9B, ANTIC is PAL. Coupled with the GTIA PAL bit, you can then denote ANTIC as an FPS value: NTSC/60 PAL/50 PAL/60 or NTSC/50 Since it takes barely any extra code to accomplish this, it's possibly worth including. You can establish whether the machine is an XEGS by clearing bit 6 of PORTB and checking for RAM in the cartridge address space. If ROM if found, you could initialise and start the cartridge with a few lines of code. I suppose you could do other things such as checking for RAM under the OS, etc, and thereby be able to report the host machine as a 400/800, XL/XE, or XEGS. thanks for the explanation for the detection of the ANTIC ? ok, I detect the XEGS when the OS is version 4. but it doesn't work for me when I call $5000 for the game? 3 hours ago, tebe said: http://mads.atari8.info/library/doc/misc.html Thanks for the information and the example, I will review it? 55 minutes ago, ivop said: I assume to differentiate between NMOS and CMOS? Could you elaborate? The NMOS 6502 / 6502C, CMOS 65c02 and CMOS 65c816 CPUs are detected. It is a routine published in Mads section CPU DETECTION http://mads.atari8.info/mads_eng.html regards Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted November 7, 2019 Share Posted November 7, 2019 1 hour ago, ascrnet said: but it doesn't work for me when I call $5000 for the game The ROM is at $A000-$BFFF, so you should initialise and start as per the OS cart initialisation code using the vectors at $BFFx (have a look at the Altirra OS source code for a good example of this). Quote Link to comment Share on other sites More sharing options...
Rybags Posted November 7, 2019 Share Posted November 7, 2019 To run the Missile Command you'd also want to clear the WARMST flag (08) so that it does it's initial setup properly. Quote Link to comment Share on other sites More sharing options...
tane Posted November 8, 2019 Share Posted November 8, 2019 On 11/6/2019 at 10:16 PM, ascrnet said: Thank you, version 1.1 is already fixed. I wait for tests on real hardware. ? If it's possible to establish whether ANTIC is PAL or NTSC, is it possible to join 2 xex files (NTSC and PAL) into a single one, auto-detecting what part must be executed? Example: let's say having game(NTSC).xex and game(PAL).xex (already compiled .xex). Is it possible to make an unique file game(NTSC-PAL).xex ? Quote Link to comment Share on other sites More sharing options...
Rybags Posted November 8, 2019 Share Posted November 8, 2019 You could but it'd be wasteful to have an entire game replicated in such a way. Generally there's not much in the way of differences. An easy way could be to have a patcher that loads after the main part of the file. Have an Init section before the patcher to see if it's needed and if not, just don't continue the load process. Quote Link to comment Share on other sites More sharing options...
ascrnet Posted November 8, 2019 Author Share Posted November 8, 2019 19 hours ago, flashjazzcat said: The ROM is at $A000-$BFFF, so you should initialise and start as per the OS cart initialisation code using the vectors at $BFFx (have a look at the Altirra OS source code for a good example of this). 19 hours ago, Rybags said: To run the Missile Command you'd also want to clear the WARMST flag (08) so that it does it's initial setup properly. thanks colleagues for the information ? 15 hours ago, tane said: If it's possible to establish whether ANTIC is PAL or NTSC, is it possible to join 2 xex files (NTSC and PAL) into a single one, auto-detecting what part must be executed? Example: let's say having game(NTSC).xex and game(PAL).xex (already compiled .xex). Is it possible to make an unique file game(NTSC-PAL).xex ? Yes it can but it takes a long time since each game is a different world. I think it's easier to patch the game like that. At the moment my knowledge is few to make a patch from PAL to NTSC as you want. ? regards Quote Link to comment Share on other sites More sharing options...
ascrnet Posted November 9, 2019 Author Share Posted November 9, 2019 New version 1.2: custom OS QMeg 4.4 or RC01, Antic, and other small changes are detected.? Regards 2 Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted November 9, 2019 Share Posted November 9, 2019 13 minutes ago, ascrnet said: New version 1.2 There's a bug at the top of .proc @ANTIC. 'max' variable is executed as a BRK instruction and skips first byte of 'LDA VCOUNT', resulting in an 'ANC #$D4' instruction being executed instead on the first loop iteration. Not fatal, though. 1 Quote Link to comment Share on other sites More sharing options...
ascrnet Posted November 11, 2019 Author Share Posted November 11, 2019 On 11/9/2019 at 7:39 PM, flashjazzcat said: There's a bug at the top of .proc @ANTIC. 'max' variable is executed as a BRK instruction and skips first byte of 'LDA VCOUNT', resulting in an 'ANC #$D4' instruction being executed instead on the first loop iteration. Not fatal, though. ? Thank you very much for the warning, I will change it !!!? Regards Quote Link to comment Share on other sites More sharing options...
ascrnet Posted November 14, 2019 Author Share Posted November 14, 2019 Hi all, How can I know if a 600XL has 16K or 64K memory?? Regards Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted November 14, 2019 Share Posted November 14, 2019 (edited) 1 hour ago, ascrnet said: How can I know if a 600XL has 16K or 64K memory? Try to store and retrieve two different known values at address $4000 or higher. Edited November 14, 2019 by flashjazzcat typos Quote Link to comment Share on other sites More sharing options...
Rybags Posted November 14, 2019 Share Posted November 14, 2019 If you want to support an array of memory expansions and older 400/800 then a contiguous Ram test from $3FF0 to $CFF0 in steps of 4K is probably a good idea (so 52K would also work). Not sure how the 52K and 64K schemes work on the 400/800 - I think some use $CFFF as a banking register. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.