Jump to content

Photo

Detect if CF7+/nanopeb present

TMS9900 CF7+ nanopeb

26 replies to this topic

#1 retroclouds OFFLINE  

retroclouds

    Stargunner

  • 1,388 posts
  • Location:Germany

Posted Wed Aug 15, 2012 8:27 AM

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

Edited by retroclouds, Wed Aug 15, 2012 8:28 AM.


#2 Willsy OFFLINE  

Willsy

    River Patroller

  • 2,073 posts
  • Location:Uzbekistan (no, really!)

Posted Wed Aug 15, 2012 8:40 AM

Have a look at the end of VDP RAM (say, the last 2K) - it will be configured differently compared to a disk controller. You should be able to find a byte or two that changes according to which controller is active.

#3 moulinaie OFFLINE  

moulinaie

    Moonsweeper

  • 303 posts
  • Location:France, Burgundy

Posted Wed Aug 15, 2012 8:54 AM

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.

#4 Willsy OFFLINE  

Willsy

    River Patroller

  • 2,073 posts
  • Location:Uzbekistan (no, really!)

Posted Wed Aug 15, 2012 9:23 AM

LMAO!

#5 moulinaie OFFLINE  

moulinaie

    Moonsweeper

  • 303 posts
  • Location:France, Burgundy

Posted Wed Aug 15, 2012 9:23 AM

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, Wed Aug 15, 2012 9:24 AM.


#6 Willsy OFFLINE  

Willsy

    River Patroller

  • 2,073 posts
  • Location:Uzbekistan (no, really!)

Posted Wed Aug 15, 2012 9:27 AM

One way appears to be to switch on CRU address >1340 and walk the DSR entry chain. If you find PIO (it may not be the first entry) then you have a PEB or a CF7. If you find SIO then you have a nanoPEB.

#7 Willsy OFFLINE  

Willsy

    River Patroller

  • 2,073 posts
  • Location:Uzbekistan (no, really!)

Posted Wed Aug 15, 2012 9:35 AM

There might be something here

#8 InsaneMultitasker OFFLINE  

InsaneMultitasker

    Dragonstomper

  • 710 posts

Posted Wed Aug 15, 2012 9:43 AM

I believe the value (vdp address) in 0x8370 will be 8 bytes less than 'normal' with a nanopeb attached. This difference is what caused Funnelweb to fail and prompted my releasing fixes/changes to Funnelweb's vdp allocation routine.

#9 Tursi ONLINE  

Tursi

    River Patroller

  • 2,719 posts
  • Location:BUR

Posted Wed Aug 15, 2012 12:28 PM

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. :)

#10 InsaneMultitasker OFFLINE  

InsaneMultitasker

    Dragonstomper

  • 710 posts

Posted Wed Aug 15, 2012 3:02 PM

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. ;)

#11 Tursi ONLINE  

Tursi

    River Patroller

  • 2,719 posts
  • Location:BUR

Posted Wed Aug 15, 2012 5:43 PM

I guess one thing I was not considering is with the Nanopeb plugged in, nothing else is. ;) So weird combinations of things are less likely. :)


#12 OLD CS1 OFFLINE  

OLD CS1

    Stargunner

  • 1,765 posts
  • IT Samurai
  • Location:Tallahassee, FL

Posted Thu Aug 16, 2012 1:23 AM


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. ;)

#13 retroclouds OFFLINE  

retroclouds

    Stargunner

  • Topic Starter
  • 1,388 posts
  • Location:Germany

Posted Thu Aug 16, 2012 4:35 AM

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, Thu Aug 16, 2012 4:43 AM.


#14 moulinaie OFFLINE  

moulinaie

    Moonsweeper

  • 303 posts
  • Location:France, Burgundy

Posted Thu Aug 16, 2012 5:09 AM

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.

#15 rocky007 OFFLINE  

rocky007

    Moonsweeper

  • 395 posts
  • Location:Belgium

Posted Fri Aug 17, 2012 12:36 AM

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, Fri Aug 17, 2012 12:38 AM.


#16 OLD CS1 OFFLINE  

OLD CS1

    Stargunner

  • 1,765 posts
  • IT Samurai
  • Location:Tallahassee, FL

Posted Fri Aug 17, 2012 4:52 PM

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?

#17 Lee Stewart OFFLINE  

Lee Stewart

    Stargunner

  • 1,664 posts
  • Location:Maryland

Posted Fri Aug 17, 2012 5:04 PM


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, Fri Aug 17, 2012 5:04 PM.


#18 rocky007 OFFLINE  

rocky007

    Moonsweeper

  • 395 posts
  • Location:Belgium

Posted Sat Aug 18, 2012 1:44 PM

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, Sat Aug 18, 2012 1:46 PM.


#19 OLD CS1 OFFLINE  

OLD CS1

    Stargunner

  • 1,765 posts
  • IT Samurai
  • Location:Tallahassee, FL

Posted Sat Aug 18, 2012 6:25 PM

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 ;)

#20 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • 2,818 posts
  • Location:Denmark

Posted Sat Aug 18, 2012 11:07 PM

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.

:)

#21 retroclouds OFFLINE  

retroclouds

    Stargunner

  • Topic Starter
  • 1,388 posts
  • Location:Germany

Posted Sun Aug 19, 2012 1:44 AM


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.

#22 retroclouds OFFLINE  

retroclouds

    Stargunner

  • Topic Starter
  • 1,388 posts
  • Location:Germany

Posted Sun Aug 19, 2012 2:18 AM


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!

#23 retroclouds OFFLINE  

retroclouds

    Stargunner

  • Topic Starter
  • 1,388 posts
  • Location:Germany

Posted Sun Aug 19, 2012 12:48 PM

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
Attached File  2012-08-19 20.27.33.jpg   90.09KB   26 downloads

Here's the selection menu after the memory viewer was loaded (DIS/FIX 80 file).
Attached File  2012-08-19 20.27.48.jpg   91.43KB   32 downloads

Here's what you get when you go to >4000 without the DSR ROM being enabled
Attached File  2012-08-19 20.29.28.jpg   115.14KB   28 downloads

And here with the DSR ROM enabled. We find the string "CF7+ INSTALLED" at >4091.
Attached File  2012-08-19 20.34.10.jpg   114.76KB   25 downloads


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.

Attached Files


Edited by retroclouds, Sun Aug 19, 2012 1:00 PM.


#24 OLD CS1 OFFLINE  

OLD CS1

    Stargunner

  • 1,765 posts
  • IT Samurai
  • Location:Tallahassee, FL

Posted Sun Aug 19, 2012 9:54 PM

hmmm hehe I have to disagree :-)
I think that is a very clever trick rocky used there, very cool!


Yeah, it is. Simple solutions are sometimes the most impressive. I just happen to like over-engineering things. heheheheh

#25 --- Ω --- OFFLINE  

--- Ω ---

    River Patroller

  • 3,697 posts

Posted Thu Jul 18, 2013 11:34 AM

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"....





Also tagged with one or more of these keywords: TMS9900, CF7+, nanopeb

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users