Jump to content
IGNORED

Stuart's TI-99/4A - Internet Web Browser


Omega-TI

Recommended Posts

Kevan, try the attached when you have a moment. This works on Classic99.

 

I've got the disk name set to BROWSER, maybe if you hard code it simply as DSK1.FAVS

This is driving me nuts, every time I try it, it locks up.

 

** EDIT **

 

gallery_35324_1027_167334.jpg

 

The good news is that >> ONCE << I received the above message without it locking up. I tried it a second time and it locked up just like normal.

Link to comment
Share on other sites

Thanks, both of you. My benchmark is usually real hardware, so yes, I suspect Win994A, but I just wanted to be sure. :) Identifying why the file is wrong will certainly point the finger.

 

 

Tursi:

 

I've added the >FF termination byte and it now loads the FAVS file fine in Classic99, but I've just tried on my TI+NanoPEB and it won't work, just like Kevan is finding.

 

I suspect the problem is this: using bitmap mode on the VDP, you've got to have either the 6K pattern generator table or colour table in the upper half of VDP RAM, from >2000 to >37FF. This is overwriting the disk controller reserved area in VDP RAM from >37D8, and messing up the disk access. Although Classic99 reserves this area, it doesn't actually use it for file access - is that correct? Does that sound like a reasonable reason why accessing the FAVS file works in Classic99 but not on real hardware?

 

Anyone:

 

So what I should be able to do to get round this is call the disk controller DSR sub-program that does a "CALL FILES(1)" - this will move the disk controller reserved area in VDP RAM towards the end of VDP RAM, away from the colour table - correct? How do I call the sub-program - through the PAB? Is it just a standard PAB where everything is ignored apart from the name length and name fields? I then call this with BLWP @DSRLNK followed by DATA 10?

Link to comment
Share on other sites

Yep, very likely! The good news is that if you don't need multiple files open at the same time, doing the equivalent of CALL FILES(1) will move the disk buffers up above the second bitmap table, like you say.

 

This code has worked for me in the past, it's what my CF7 Slideshow uses. This does not use DSRLNK and it explicitly sets 1 file (see the line I marked with <---)

 

SAVE 	BSS 2

* We need to implement a CALL FILES(1) before use to make loading work better
* That puts the top of VRAM at >3BDB. With that there, we can load everything
FILES
	MOV R11,@SAVE		* save return address, assume DSR trashes everything
	
	LI R0,>0100
	MOVB R0,@>834C		* 1 file desired <----- 
	
	LWPI >83E0		* GPLWS
	LI R12,>1100		* We assume the disk base since this is intended for the CF7 anyway <---
	SBO 0			* turn on the ROM
	MOV @>400A,R1		* get pointer to the subprogram list
FILELP
	JEQ FILEDON		* no subprograms
	MOV *R1+,R3		* link to next item
	MOV *R1+,R2		* address of this one
	MOV *R1+,R0		* we are looking for length 1, name >16
	CI R0,>0116
	JEQ FILEGT
	MOV R3,R1		* nope, get next
	JMP FILELP

* Found it
FILEGT
	BL *R2			* go ahead and call it
	NOP			* skipped on success

FILEDON
	LI R12,>1100		* We assume the disk base since this is intended for the CF7 anyway <----
	SBZ 0			* turn off the ROM
	LWPI >8300		* our own WS back  <----- adapt to your workspace
	
	MOV @SAVE,R11		* get back return address, no telling what the DSR did
	B *R11
But note, too, that this code assumes a CRU base of >1100. I have this larger adapted code in libTI99, but I am uncertain how well tested it is. This doesn't use DSRLNK either but does a full search for the FILES subprogram.

 

#define DSR_FILES_COUNT	*((volatile unsigned char*)0x834C)

unsigned int __attribute__((noinline)) searchdofiles(unsigned int base) {
	unsigned int ret;

	*(unsigned int*)0x83f8 = base;		// GPLWS R12

	// TODO: we could rewrite the rest of this in C, just adding support for SBO, SBZ and the actual call which
	// needs to be wrapped with LWPI....
	__asm__(
	"seto %0		; not found\n\t"
	"lwpi 0x83e0		; gplws\n\t"
	"sbo 0			; turn on the rom (set above)\n\t"
	"mov @0x400a,r1		; get pointer to the subprogram list\n"
"filelp\n\t"
	"jeq filedon		; no subprograms\n\t"
	"mov *r1+,r3		; link to next item\n\t"
	"mov *r1+,r2		; address of this one\n\t"
	"mov *r1+,r0		; we are looking for length 1, name >16\n\t"
	"ci r0,0x0116\n\t"
	"jeq filegt\n\t"
	"mov r3,r1		; nope, get next\n\t"
	"jmp filelp\n"
"filegt\n\t"
	"lwpi 0x8300\n\t"
	"clr %0			; mark success in gcc workspace\n\t"
	"lwpi 0x83e0\n\t	; we aren't done yet\n\t"
	"bl *r2			; go ahead and call it\n\t"
	"nop			; skipped on success (we ignore failure, then)\n"
"filedon\n\t"
	"sbz 0			; turn off the rom (we assume r12 was not altered, it shouldn't be!)\n\t"
	"lwpi 0x8300		; our own ws back\n\t"
	: "=r" (ret)
	);

	return ret;
}

void files(unsigned char count) {
	DSR_FILES_COUNT = count;
	unsigned int dsrbase = 0x1000;
	while (searchdofiles(dsrbase)) {
		dsrbase+=0x100;
		if (dsrbase >= 0x2000) break;
	}
}
I've never done it with DSRLNK.. I would expect the code to be a lot smaller. ;)
Link to comment
Share on other sites

Yep, very likely! The good news is that if you don't need multiple files open at the same time, doing the equivalent of CALL FILES(1) will move the disk buffers up above the second bitmap table, like you say.

 

This code has worked for me in the past, it's what my CF7 Slideshow uses. This does not use DSRLNK and it explicitly sets 1 file (see the line I marked with <---)

Thanks Tursi. I was rather hoping that someone might have some example code. ;-)

 

Just tried using DSRLNK and the following seems to do the job.

PABADR  EQU  >1D00          VDP RAM address for PAB.

PABSP   BYTE >01,>16        Program name length and program name for sub-program in Disk Controller DSR that
*                           sets the number of file buffers.

        LI   R0,PABADR      Copy PAB for sub-program to VDP RAM.
        LI   R1,PABSP
        LI   R2,2
        BLWP @VMBW

        MOV  R0,@>8356      Set up pointer to sub-program name length byte in VDP RAM.
       
        LI   R0,>0100       Set number of disk files in the byte required by the sub-program.
        MOVB R0,@>834C
       
        BLWP @DSRLNK        Call the sub-program.
        DATA 10
Edited by Stuart
  • Like 2
Link to comment
Share on other sites

Okay, here's the deal, WEB_O is an E/A 3 file, meaning it's a PITA to load, I figure once the program is completed and finalized it'll probably be turned into an average easy to load E/A 5. Anyway since I'm doing a lot of testing, loading, resetting and re-loading, I thought I'd automate the process with a simple AUTO-BAT file with my Super Cart and 4A/DOS. Wrong-O! For some reason the FIX80 command will not work with this program.

 

This is what I get...

 

gallery_35324_1027_58988.jpg

 

"Device Error"? WTF?!? Does anyone have a clue why it's not working?

Link to comment
Share on other sites

 

...

So what I should be able to do to get round this is call the disk controller DSR sub-program that does a "CALL FILES(1)" - this will move the disk controller reserved area in VDP RAM towards the end of VDP RAM, away from the colour table - correct? How do I call the sub-program - through the PAB? Is it just a standard PAB where everything is ignored apart from the name length and name fields? I then call this with BLWP @DSRLNK followed by DATA 10?

 

 

Yep, very likely! The good news is that if you don't need multiple files open at the same time, doing the equivalent of CALL FILES(1) will move the disk buffers up above the second bitmap table, like you say.

...

 

You will also be clear of that area with 2 open files. Doing the equivalent of CALL FILES(2) will start the internal file buffer area at 39DEh for standard floppy controllers—39D6h for the CF7. The highest usable VRAM is reported in scratchpad RAM at 8370h.

 

...lee

Link to comment
Share on other sites

Stuart,

Now that your browser has the ability to store favorites, and you host scripts on your website, I thought of script idea that has a real practical purpose... and gives us yet another reason to turn on the TI.

 

In Windoze 8.1 there is a little weather app, that from just a zip code, gives back:

 

1) Current Temperature

2) Shows the name of the city

3) Current conditions, like fog, rain, etc.

4) Gives the TODAY forecast (i.e. 47/37/ Cloudy)

5) Gives the TOMORROW forecast in the same format..... (This of course is all in TEXT)

 

So if a script could be written to get this information from somewhere and spit it all back to the TI'er at home using your browser, that would be totally awesome. Everyone would use the same URL, but add their postal code at the end.

 

What do you think?

Link to comment
Share on other sites

I just found that if you type "WEATHER" and the ZIPCODE into Google, it comes back (TEXT) with:

 

1) City, State (and the zip code entered)

2) Day of Week and Time of weather observation

3) Current conditions

A) Precipitation

B) Humidity

C) Wind speed

D) and of course Temperature

 

This could be a source of data for a script.

 

Now if you type in "TIME and the ZIP CODE into Google, it comes back with:

 

1) Time

2) Day or week, Month, Day and year, and even the time zone

3) and even tells you your city.

 

If BOTH of these could be accessed in a script and sent back, that would be a lot of information that the new TI browser could deliver from one little saved favorite.

Link to comment
Share on other sites

I just found that if you type "WEATHER" and the ZIPCODE into Google, it comes back (TEXT) with: ...

The weather may be (mostly) text, but there's still a load of other cr*p on the returned page - at least on the page that Google shows me. There are a couple of weather sites that you can send a request and city name to that return the weather details as XML, and it's easy to call this in PHP (passing in a city name specified in the original URL) then create a 'TI page' from the returned XML data. I'll have a play doing this, but first need to try to get my service provider to tweak the PHP configuration to allow PHP to open a remote page.

Link to comment
Share on other sites

Got my PHP configuration sorted rather faster than I was expecting, so point your TI browser to ...

 

www.stuartconnerdownloads.me.uk/getweather.php?l=paris,fr

 

The location formats supported for the "?l=" query apparently include:

-- city,state (assumes US): "seattle,wa", "seattle,washington","new+york,ny"

-- city,state,country: "seattle,wa,us", "seattle,washington,us", "toronto,on,ca", "toronto,ontario,ca"

-- city,country: "paris,fr", "london,uk"

-- zip code: 98109, 90210

 

The query also returns the name of a library png to illustrate the weather. It is in theory possible to use this to also show a weather icon (formed from character definitions) in the browser page, but as there are over 100 of them, I'm not going to start drawing them!

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

This is FREAKING AWESOME Stuart!

It comes back with the current conditions and temperature. I love it. The time is off though, so you could probably remove that if it cannot be fixed. THANKS! It looks like the we have a couple of APPS for the browser now, weather and chat!

 

If there is anyway to add a forecast or other information that would be the bomb!

 

 

 

post-35324-0-73494000-1421046573_thumb.jpg

Link to comment
Share on other sites

Stuart,

I hate to keep bugging you with minutiae, but I have a 'bug report'.... sorry.

First the good news, the FAVS file makes the program much easier to use.

The bad news, one has to enter a URL and go to it BEFORE one can use the "I" command

 

gallery_35324_1027_729.jpg

 

Would it be possible to have the program start in the command entry mode instead of on the URL entry line?

Link to comment
Share on other sites

Just another script idea for Stuart's awesome TI browser...

An IP lookup script similar to the one at: http://ip-lookup.net/domain.php

This way if someone wants to hook up to a BBS system using their TI, they can find the correct IP number for the UDS-10 to use WITHOUT having to use a PC to get it. :)

www.stuartconnerdownloads.me.uk/getwebipaddress.php?w=domain_name

 

The line is getting rather long now and approaching the 80 character limit. Might look at increasing that to 100 characters.

  • Like 1
Link to comment
Share on other sites

Possibly an interactive script might work better, if at all possible. If so, one would not have to type in such a long line. They could put the www.stuartconnerdownloads.me.uk/getwebpipaddress in their FAVS file, then just type in the name when asked and get the result back.

 

It works though, so I'll add Heatwave.com... just in case it ever changes. :)

 

THANKS! -- Your browser is making the TI more useful by the day!

Link to comment
Share on other sites

Okay, so I downloaded the file.. I put the disk image image on my nanopeb using tidir.

 

I mounthed the volume, and when I list the files WEB_O and something like favorites shows up.

 

I use the "Load and Run" feature of the E/A section (Option B) on XB 2.7

 

I type in DSK1.WEB_O for the filename. My NanoPEB starts flashing like crazy reading the card, but then it just asks for the file again.

If I type DSK1.WEB_1, I get like an I/O error... I just wanted to see what happens if I supply an incorrect filename to make sure it was reading.

 

Any ideas?

Link to comment
Share on other sites

Thank you.. I didn't realize that after it loads, it just goes back to the filename prompt.. I pressed enter, and got to the program prompt.. The browser fired up..

 

Looks like I might want to get a UDS-10.. TCPSER did not appear to cut it... I'm using an off the shelf null modem cable.. I better also make a cable per Stuarts instructions (jumpering RTS/CTS), instead of having them crossed over...

 

Best to stick with ongoing standard when getting feet wet. :)

Edited by slinkeey
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...