Jump to content
IGNORED

Detect if CF7+/nanopeb present


retroclouds

Recommended Posts

Does anyone know how to detect (using assembly languague) if a TI-99/4A console is running with a CF7+/nanopeb ?

 

In XB:

100 PRINT "Look at the left side of your computer"
110 PRINT "Is there a CF7 or Nanopeb attached (Y/N) ?"
120 INPUT A$
130 IF A$="Y" THEN ... here code if CF7
140 IF A$="N" THEN ... here code if no CF7

 

Guillaume.

  • Like 2
Link to comment
Share on other sites

Does anyone know how to detect (using assembly languague) if a TI-99/4A console is running with a CF7+/nanopeb ?

 

In my XMOUNT routine, I use a portion of code to find the address of CALL MOUNT. I think you can use this!

If CALL MOUNT exists, then a CF7 is attached!

 

 LI R12,>1100 CRU FOR DSR
 SBO 0	    ENABLE >4000

 CLR R10

FNDROM
 LI R0,>4000
 MOVB *R0,R10	
 CI R10,>AA00 SIGNATURE
 JNE NOCF7
 AI R0,10	 GOTO ROUTINES POINTER
NEXT
 MOV *R0,R0	 NEXT ROUTINE
 JEQ NOCF7 	 NO MORE, EXIT
 MOV R0,R1
 AI R1,4		 GOTO LEN+NAME
 MOV *R1+,R2
 CI R2,>054D	 5 M
 JNE NEXT
 MOV *R1+,R2
 CI R2,>4F55	 O U
 JNE NEXT
 MOV *R1,R2
 CI R2,>4E54	 N T
 JNE NEXT
 JMP CF7OK

 

Just provide the CF7OK label if CALL MOUNT is found and NOCF7 label if not found.

Please let me know if it works!!! (it's a cut from my program, and there can be errors...)

 

Guillaume.

Edited by moulinaie
Link to comment
Share on other sites

I would not count on the VDP free address to detect the NanoPeb - any device is allowed to change that.... if you care specifically about it and don't want to ask the user, look for something it does that nothing else does. CALL MOUNT and DSR name testing as suggested might be a good one, but doesn't the IDE card have it too? You could checksum the DSR at >1100, maybe, but that might vary between revisions of the device. Doing a combination of tests might be the most accurate way...

 

I guess it really boils down to what you need to know and how accurate you need it to be across systems. :)

Link to comment
Share on other sites

I would not count on the VDP free address to detect the NanoPeb - any device is allowed to change that.... if you care specifically about it and don't want to ask the user, look for something it does that nothing else does. CALL MOUNT and DSR name testing as suggested might be a good one, but doesn't the IDE card have it too? You could checksum the DSR at >1100, maybe, but that might vary between revisions of the device. Doing a combination of tests might be the most accurate way...

 

I guess it really boils down to what you need to know and how accurate you need it to be across systems. :)

Agreed, I wasn't suggesting the address is fool-proof, only noting the difference. The DSR name check is fairly definitive and if there is a concern about a duplicate device within another card, there is often another DSR name or routine that can be tested. As usual, many ways to skin a cat - some are a bit bloodier than others. ;)

Link to comment
Share on other sites

Does anyone know how to detect (using assembly languague) if a TI-99/4A console is running with a CF7+/nanopeb ?

 

In XB:

100 PRINT "Look at the left side of your computer"
110 PRINT "Is there a CF7 or Nanopeb attached (Y/N) ?"
120 INPUT A$
130 IF A$="Y" THEN ... here code if CF7
140 IF A$="N" THEN ... here code if no CF7

 

Guillaume.

 

FAIL. He asked for assembly. ;)

Link to comment
Share on other sites

ok, How about if I turn on the ROM ...

LI R12,>1100 ; CRU FOR DSR
SBO 0 ; ENABLE >4000
CLR R10

 

... and then search in the rom for a string matching 'CF7'.

 

It must be in there somewhere because that is what is displayed on the title screen when I turn on the TI-99/4A.

Perhaps not as elegant as walking the DSR chain, but I want to have compact code and we're talking assembly folks.

Scanning a few kilobytes should be fast right ?

 

What do you think ?

 

EDIT: Perhaps I should tweak my CPU memory viewer tool to enable the ROM and take a peek or else is the CF7 rom dumped somewhere ?

Edited by retroclouds
Link to comment
Share on other sites

ok, How about if I turn on the ROM ...

LI R12,>1100 ; CRU FOR DSR
SBO 0 ; ENABLE >4000
CLR R10

 

... and then search in the rom for a string matching 'CF7'.

 

It must be in there somewhere because that is what is displayed on the title screen when I turn on the TI-99/4A.

Perhaps not as elegant as walking the DSR chain, but I want to have compact code and we're talking assembly folks.

Scanning a few kilobytes should be fast right ?

 

What do you think ?

 

EDIT: Perhaps I should tweak my CPU memory viewer tool to enable the ROM and take a peek or else is the CF7 rom dumped somewhere ?

 

Not so silly the idea to look for CF7 string...!

But the routine I gave you is only 58 bytes long, not too much! And really fast as there are few routines in the chain.

 

Peeking somewhere in the ROM is also a good idea but you must be sure of several things:

- are there different ROM versions for the CF7?

- parsing every other possible ROM to be sure that your PEEK is really for the CF7 only.

 

Guillaume.

Link to comment
Share on other sites

for XB :

 

1 CALL CLEAR :: CALL SPRITE(#1,32,2,1,1,3,0)::ON ERROR 5

2 OPEN #1:"DSK1.CFTEST",FIXED,OUTPUT :: CLOSE #1

3 CALL POSITION(#1,X,Y)

4 IF Y<4 THEN PRINT "CF7 ACTIVE" :: END

5 PRINT "CF7 NOT ACTIVE"

 

of course, it also detect in same way : Classic99 or TI Ramdisk...

Edited by rocky007
  • Like 1
Link to comment
Share on other sites

for XB :

 

1 CALL CLEAR :: CALL SPRITE(#1,32,2,1,1,3,0)::ON ERROR 5

2 OPEN #1:"DSK1.CFTEST",FIXED,OUTPUT :: CLOSE #1

3 CALL POSITION(#1,X,Y)

4 IF Y<4 THEN PRINT "CF7 ACTIVE" :: END

5 PRINT "CF7 NOT ACTIVE"

 

of course, it also detect in same way : Classic99 or TI Ramdisk...

 

Okay, that looks really damned neat. Can someone break this down as to why it works?

Link to comment
Share on other sites

for XB :

 

1 CALL CLEAR :: CALL SPRITE(#1,32,2,1,1,3,0)::ON ERROR 5

2 OPEN #1:"DSK1.CFTEST",FIXED,OUTPUT :: CLOSE #1

3 CALL POSITION(#1,X,Y)

4 IF Y<4 THEN PRINT "CF7 ACTIVE" :: END

5 PRINT "CF7 NOT ACTIVE"

 

of course, it also detect in same way : Classic99 or TI Ramdisk...

 

Okay, that looks really damned neat. Can someone break this down as to why it works?

 

I would guess it has something to do with speed. The sprite will have gone practically nowhere by the time the file is opened/created and closed if the CF7 is attached. If it's going to a floppy or some other electro-mechanical device, it will have moved quite a ways.

 

...lee

Edited by Lee Stewart
Link to comment
Share on other sites

yep, it's really simple : this program just open a file on DSK1. As TI99 don't have clock, i use a sprite to calculate the time this operation need to be finished.

As Lee perfectly explained, on CF7 or emulator, the operation is really fast, so the sprite can't move more than 4 pixels.

Edited by rocky007
Link to comment
Share on other sites

yep, it's really simple : this program just open a file on DSK1. As TI99 don't have clock, i use a sprite to calculate the time this operation need to be finished.

As Lee perfectly explained, on CF7 or emulator, the operation is really fast, so the sprite can't move more than 4 pixels.

BORING!

 

Far too simple to be exciting. I was expecting something like the CALL SPRITE created the sprite in VDP RAM area directly affected by the CF7 which the CALL POSITION detected. You guys will have to come up with some more exciting examples if you expect to keep your reputations as wizards ;)

Link to comment
Share on other sites

Does anyone know how to detect (using assembly languague) if a TI-99/4A console is running with a CF7+/nanopeb ?

 

I was wondering why on earth you want to detect CF7.

 

:)

 

That's part of my secret plan to rule the world! :-)

 

Hehe, just thought it be interesting to find out. You know that my main target is the unexpanded TI-99/4A, still I think some cool stuff is possible with the CF7.

Link to comment
Share on other sites

yep, it's really simple : this program just open a file on DSK1. As TI99 don't have clock, i use a sprite to calculate the time this operation need to be finished.

As Lee perfectly explained, on CF7 or emulator, the operation is really fast, so the sprite can't move more than 4 pixels.

BORING!

 

Far too simple to be exciting. I was expecting something like the CALL SPRITE created the sprite in VDP RAM area directly affected by the CF7 which the CALL POSITION detected. You guys will have to come up with some more exciting examples if you expect to keep your reputations as wizards ;)

 

hmmm hehe I have to disagree :-)

I think that is a very clever trick rocky used there, very cool!

  • Like 1
Link to comment
Share on other sites

So this evening I took the test and patched my memory viewer tool.

Long time ago this tool was just an example for the spectra2 functionality (to show that it is not only for games).

You currently need an 8K supercart to test this (but could be tweaked for mini memory as well).

 

Here we have the TI title screen with the CF7+ in place

post-16219-0-16317800-1345401493_thumb.jpg

 

Here's the selection menu after the memory viewer was loaded (DIS/FIX 80 file).

post-16219-0-39546900-1345401448_thumb.jpg

 

Here's what you get when you go to >4000 without the DSR ROM being enabled

post-16219-0-50433300-1345401883_thumb.jpg

 

And here with the DSR ROM enabled. We find the string "CF7+ INSTALLED" at >4091.

post-16219-0-33404800-1345401548_thumb.jpg

 

 

I was hoping to find a hidden message from Jaime somewhere, but nope there's nothing there. Well I admit I didn't look to close.

 

If you want to have a peek yourself, the object file is included.

Just put it on a CF7+ volume, mount the volume on your TI-99/4A, insert your supercart, load the DIS/FIX 80 object file "DSK1.MEMVIEW", return to the TI title screen and you are ready to roll.

 

By the way, the memory viewer is using the spectra2 virtual keyboard functionality. Due to this you can move up/down left/right in memory by using the joystick :D

Thinking about it more, it's actually very cool "navigating" through memory this way. Could imagine doing some kind of primitive GUI with a few icons, etc.

 

 

NOTE: You can toggle between "VIEW/EDIT" mode by using the space bar (or pressing fire button). You can't really edit at this time, but you do have a cursor that allows for a more easy navigation.

MEMVIEW.zip

Edited by retroclouds
  • Like 2
Link to comment
Share on other sites

  • 10 months later...

for XB :

 

1 CALL CLEAR :: CALL SPRITE(#1,32,2,1,1,3,0)::ON ERROR 5

2 OPEN #1:"DSK1.CFTEST",FIXED,OUTPUT :: CLOSE #1

3 CALL POSITION(#1,X,Y)

4 IF Y<4 THEN PRINT "CF7 ACTIVE" :: END

5 PRINT "CF7 NOT ACTIVE"

 

Sweet, I like your out-of-the-box thinking/solution! A TI version of the "Kobayashi Maru"....

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...