• Updated 2023-07-12: Hello, Guest! Welcome back, and be sure to check out this follow-up post about our outage a week or so ago.

System 6 Browser Development Opinions

porter

Well-known member
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?

 

porter

Well-known member
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.

 

porter

Well-known member
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

 

madmax_2069

Well-known member
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.

 

Bunsen

Admin-Witchfinder-General
Yes, I remember there used to be something like that for WAP phones. That;s where I got the idea

 

porter

Well-known member
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

Code:
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?

 

porter

Well-known member
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).

 

madmax_2069

Well-known member
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.

 

porter

Well-known member
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".

 

tomlee59

Well-known member
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!

 
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.

 

porter

Well-known member
Are there any OS routines for converting UTF-8 or ISO8859-1 to Mac Roman on System 6?

 

paws

Well-known member
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...

 

porter

Well-known member
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?

 
Top