68kMLA Classic Interface

This is a version of the 68kMLA forums for viewing on your favorite old mac. Visitors on modern platforms may prefer the main site.

Click here to select a new forum.
System 6 Browser Development Opinions
Posted by: porter on 2008-08-21 21:33:30
Okay, I'll admit I'm a bit rusty on some System 6 details....

(a) seeing as "FindFolder()" is System 7 upwards, where should your preferences file live and how do you determine the appropriate ioVRefNum and ioDirID for use with PBHOpen()?

( B) having WaitNextEvent() is all good to work with MultiFinder but how do you wake up a process given you don't have a process manager, process number and no WakeUpProcess()? Do you just use PostEvent with a null event and hope?

Posted by: porter on 2008-08-22 00:21:32
how do you determine the appropriate ioVRefNum and ioDirID
Wouldn't you know, next I open Inside Macintosh Volume V, and there on page 5, SysEnvirons(), SysEnvRec.sysVRefNum is a working directory reference.

Posted by: porter on 2008-08-27 02:31:28
I've got some stuff compiling and working but have some interesting issues....

(a) none of my versions of MPW will produce a binary that works on 6.0.8. I have 3.4b7 and 3.5, both have SC rather than MPW C. Perhaps that is part of the problem.

( B) THINK C 5.0 is producing a binary that works, but I have to fudge "memset" with my own implementation rather than the one from the ANSI lib. Is the whole of ANSI on THINK C 5.0 a pile of poo or just the ones they wrote in assembler? I have tried both the 4 byte and 2 byte ints to see if either made a difference, but no.

My current development environment pathway is interesting to say the least, partly down to lack of common networking and floppies...

Windows laptop -> G3 B& W running Tiger + MPW -> Quadra 605 -> Mac Plus

Posted by: madmax_2069 on 2008-08-27 14:58:39
i honestly think it'd be easier to come up with a new protocol for forums
What about a proxy that turns the pages into html for primitive browsers?
there was a browser for newton that did that. it used a server to convert a site to be displayed properly on the newton then sent everything to the client.

Posted by: Bunsen on 2008-08-28 09:30:27
Yes, I remember there used to be something like that for WAP phones. That;s where I got the idea

Posted by: porter on 2008-08-28 11:15:41
Technical question:

I want to use temporary files and put them somewhere near the application binary. How, on system 6.0.x do I find the vRefNum(work directory hopefully) and name of my application?

I can use

Handle h=GetResource('SIZE',1);short resFile=HomeResFile(h);
to get a handle on the applications resource fork, but how do I turn that into a filepath I can use?

Posted by: equant on 2008-08-28 20:00:35
Off the top of my head (ie "maybe wrong"), I think you want CurApName and CurApRefNum.

Posted by: porter on 2008-08-28 20:22:44
Off the top of my head (ie "maybe wrong"), I think you want CurApName and CurApRefNum.
Excellent. Inside Macintosh, II-58 describes GetAppParms() which does exactly what I want. Thanks.

Progress so far, running on a Quadra 605, it has successfully

(a) downloaded HTML pages and parsed them, including following redirection links.

( B) downloaded and displayed GIF files in glorious dithered monochrome.

© as many internal objects as possible (except WindowRecords and MacTCP buffers) are held in unlocked Handle to allow efficient relocation.

I have a few more tasks...

(i) efficient rendering of the HTML indexed from the "Y" coordinate to allow quick scrolling of large documents.

(ii) implementation of the temporary files

(iii) a busy/progress indicator

(iv) table layout logic

That should provide a useable read only browser. (no forms, cookies or printing yet).

Posted by: madmax_2069 on 2008-08-28 20:31:27
Yes, I remember there used to be something like that for WAP phones. That;s where I got the idea
but the only bad thing about that is if the server goes down the browser is useless.

Posted by: porter on 2008-08-28 22:09:43
but the only bad thing about that is if the server goes down the browser is useless.
The technical term being "single point of failure"

Posted by: porter on 2008-08-29 02:03:55
Woot! Major milestone in the testing department..

i. Built using THINK C 5.0

ii. System 6.0.8 on a 4Mb Macintosh Plus

iii. MacTCP 2.0.4 using MacIP over LocalTalk Bridge 2. 1 to a MacIP gateway

iv. Successfully downloaded and displayed a GIF file from an IRIX box using HTTP, "http://indy/outbox/images/sgi_banner.gif".

Posted by: Bunsen on 2008-08-29 08:08:03
And the crowd goes wild!

Posted by: porter on 2008-09-01 19:12:43
http://news.bbc.co.uk/2/hi/technology/7593106.stm... but will it run on System 6 we all ask.
Posted by: tomlee59 on 2008-09-01 20:41:37
Woot! Major milestone in the testing department..
i. Built using THINK C 5.0

ii. System 6.0.8 on a 4Mb Macintosh Plus

iii. MacTCP 2.0.4 using MacIP over LocalTalk Bridge 2. 1 to a MacIP gateway

iv. Successfully downloaded and displayed a GIF file from an IRIX box using HTTP, "http://indy/outbox/images/sgi_banner.gif".
Super! You da man!

Posted by: Mike Richardson on 2008-09-01 23:33:20
i honestly think it'd be easier to come up with a new protocol for forums
What about a proxy that turns the pages into html for primitive browsers?
there was a browser for newton that did that. it used a server to convert a site to be displayed properly on the newton then sent everything to the client.
What if there was a sever, that had like a special copy of Firefox running, that basically downloaded the entire page, rendered it at whatever resolution (512x384) or maybe at a larger resolution and then scaled it down. Then it takes and makes the image a big image map and makes all the links clickable, and then sends the image and the map as a super simple HTML page on a web server. You could use crappy old browser v1.0 that already exists to view a modern page.

Posted by: porter on 2008-09-04 11:27:47
Are there any OS routines for converting UTF-8 or ISO8859-1 to Mac Roman on System 6?

Posted by: paws on 2008-09-04 15:31:23
Are there any OS routines for converting UTF-8 or ISO8859-1 to Mac Roman on System 6?
I think System 6 predates Unicode by a good few years, if not most of a decade...

Posted by: porter on 2008-09-04 15:41:55
After a round trip including "Prog_With_TEC_Mgr_1.5.pdf" I found this interesting file which maps the Mac Roman charset to the Unicode equivalents. This means that as UTF-8 is actually a form of Unicode I can do the mapping from that.

The ISO-8859 would need similar mapping tables.

ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/APPLE/ROMAN.TXT

Posted by: porter on 2008-09-04 18:39:24
I think I've noticed a difference between System 6 and System 7 upwards WaitNextEvent.

With 7 and later, if you give it a timeout, it effectively ignores it if you are the front application and keeps giving you the null events.

With 6, if you tell it you'll wait for a minute, even if you are the front application it will not do anything for a minute unless there is an event, eg osEvt/mouseMovedMessage. Has anyone noticed this before?

Posted by: returningmacuser on 2008-09-15 11:28:13
So, what's the status on the project?

< 5 >