|
I saved the message off the usenet. I haven't tested the program
so I don't know if it works.
Newsgroups: comp.sys.amiga
Path: decwrl!decvax!ucbvax!hplabs!sdcrdcf!usc-oberon!bacall!papa
Subject: Re: Great Program on BBS (morerows: how it works)
Posted: 28 Feb 87 07:24:16 GMT
Organization: CS&CE Depts, U.S.C., Los Angeles, CA
Well, probably by now other people have found out how morerows works, but
here it is anyway. Morerows uses an "undocumented", and I understand
unsupported, feature of the Preferences structure. Preferences stores its
data in the :devs/system-configuration file. I compared the file before and
after having executed "morerows -rows 35 -columns 64". The files are
identical besides 2 bytes, which have the appropriate values 35 and 64
(23 and 40 in hex). This is the binary hex output from "od" on my favourite
UNIX BSD system:
0000000 0008 0500 0000 0000 0100 a086 0000 0000
0000020 0c00 0035 0000 0100 0700 20a1 0000 0000
0000040 0000 00fc 007c 00fe 007c 0086 0078 008c
0000060 007c 0086 006e 0093 0007 8069 8003 c004
0000100 c001 6002 8000 4001 0000 8000 0000 0000
0000120 0000 0000 0000 0000 0000 0000 0000 0000
0000140 0000 0000 fffe 220d 0000 ca0f 0200 5a00
0000160 ff0f 0200 800f 0000 8100 2c00 0100 0000
0000200 4243 5f4d 504d 3153 3030 0030 0000 0000
0000220 0000 0000 0000 0000 0000 0000 0000 0000
0000240 0000 0000 0500 4b00 0100 0000 0100 0200
0000260 2000 4200 0000 0000 0000 0000 0000 0000
0000300 0000 0000 0000 0000 0000 0000 0000 0000
0000320 0000 0000 0000 0000 4023 0000 0000 0000 <------ This is it!
0000340 0000 0000 0000 0000
0000350
It looks as if the system-configuration file has an almost one to one
correspondence with the Preferences structure from intuition.h. Whenever
one executes a SAVE of Preferences, the system-configuration file gets
rewritten with the new Preferences data.
The bytes with value 40 and 23 are located in the padding area at the end of
the Preferences structure. After some experimentation, I found that those
values are stored in padding[34] and padding[35]. The following is a
reinterepretation of the original "morerows" by Neil Katin. Now, is this
going to be a "supported" feature in the future? I'd love to see that.
It is things like these that me me really love the Amiga. At the Developer's
Conference the notes mentioned the "magic program morerows (poof!)". Why
was this feature implemented, not documented, advertised and never really
distributed, I don't know.
Note that I have not tested this with incorrect values (like col > 64), so
use this at your own risk. How about posting the original source by Neil
Katin? I did not really write this one, just reverse-engineered it.
Enjoy.
-- Marco Papa
/*
* mymorerows.c
* Marco Papa - Felsina Software
* ...!sdcrdcf!bacall!papa
*/
#include <exec/types.h>
#include <intuition/intuition.h>
#define INTUITION_REV 1L
struct IntuitionBase *IntuitionBase;
main(argc, argv)
int argc;
char *argv[];
{
struct Preferences *PrefBuffer;
char *malloc();
BYTE rowsizechange, columnsizechange;
IntuitionBase = (struct IntuitionBase *)OpenLibrary("intuition.library", INTUITION_REV);
if( IntuitionBase == NULL ) {
puts("Can't open intuition library");
exit(TRUE);
}
PrefBuffer = (struct Preferences *) malloc((unsigned) sizeof(struct Preferences)+20);
GetPrefs(PrefBuffer, (long) sizeof(struct Preferences)+20);
if (argc>2) {
rowsizechange = atoi(argv[1]);
columnsizechange = atoi(argv[2]);
PrefBuffer->padding[34] = rowsizechange; /* 35 */
PrefBuffer->padding[35] = columnsizechange; /* 64 */
SetPrefs(PrefBuffer, (long) sizeof(struct Preferences)+20, TRUE);
} else {
printf("current rowsizechange = %d\n", (int) PrefBuffer->padding[34]);
printf("current columnsizechange = %d\n", (int) PrefBuffer->padding[35]);
}
free(PrefBuffer);
CloseLibrary(IntuitionBase);
}
|
| re .1
Thanks. As soon as I get time I'll try to compile it with Lattice.
Unfortunately I still haven't sent in for my 3.10 update, so if
i compile it it may not work with 1.2. (Does anyone out there have
a compiled version for 1.2? )
re .2 Morerows modifies an otherwise inaccessable field in your
system-configuration file. The modification allows you to utilize
more of the scan lines on your terminal screen. (I believe)
regards,
steve mcafee
|
|
Finally compiled morerows and it worked great. It makes the workbench
screen much larger than my 1080 can handle however. Maybe the sony
1311 can get more lines, I don't know. Any my workbench now fills
every possible pixel on my monitor.
I'll try to find time to load the executable up tonight in an arc
file. There weren't any instructions with it so I'll have to write
some. Basically you run the program, go into preferences, save
preferences, and re-boot.
I'll put the arc in ANT::BIPOLAR:[SMCAFEE.PUBLIC]MOREROWS.ARC.
I would appreciate it if one of you folks who maintains a public
directory could add it to yours as I am running low on disk space...
Sometime tonight...
regards,
steve mcafee
|
| Well, I tried some of this last night and found out some of the
problems the hard way...
I tried the program too but decided it is easier to use FileZap
to directly patch the system-configuration file at the bytes mentioned
earlier.
I have a PAL Amiga which probably makes a difference - I coudn't
make the values given work.
After a couple of hours hacking (pretty slow as you have to continually
reboot) I had a screen that would hold 33 lines of text, 81 characters
wide in a maximum-sized bordered window. I am using a VR241 so picture
size isn't a problem (the *standard* display is too small if you
use a VR241).
With the standard settings, a PAL Amiga can display 30 lines of 77
chars in a bordered window (a total of 32 lines * 80 chars without
borders). The values I use above were 24 and 32 (decimal).
The values seem to define the number of pixels added to the display
at the bottom and right. The trick is you have to *first* move your
WB screen to the upper left corner and save the setting; if the
additional pixels go beyond some point on the screen, you get
garbage... also, after having succesfully changed things as described,
moving the screen around in preferences destroys it but moving it
back makes it ok again (don't let loose of that mouse button!).
Needless to say, not all SW works in this mode... as I am relatively
satisfied with the 32 lines a PAL Amiga has with the non-hacked
configuration I reset everything.
|
|
Finally uploaded morerows. I haven't been able to dialup for over
a week. Anyhow you can find it in
ant::bipolar:[smcafee.public]morerows.arc
I downloaded it successfully so I know the file is OK. If someone
who is maintaining an amiga directory wants to take this go ahead
(so that I can delete it).
I've only had one program that it didn't work properly with. That
was missile command. The program ran, but the spaceships were trashed.
Also some programs may not allow you to resize the window to the actual
full screen (Scribble! does for those of you who have it).
regards,
steve mcafee
|