[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::amiga_v1

Title:AMIGA NOTES
Notice:Join us in the *NEW* conference - HYDRA::AMIGA_V2
Moderator:HYDRA::MOORE
Created:Sat Apr 26 1986
Last Modified:Wed Feb 05 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:5378
Total number of notes:38326

392.0. "Anyone have morerows?" by MORRIS::SMCAFEE (Steve McAfee) Sun Mar 22 1987 19:42

    
    Does anyone out there have MoreRows available for downloading?
    
    Our system was having various problems for about two weeks in
    February.  I think I must have missed the Usenet posting.
    
    regards,
    
    steve mcafee
    
    
T.RTitleUserPersonal
Name
DateLines
392.1MoreRows from USENETWORDS2::BURTONWhat world is this anyway?Mon Mar 23 1987 11:31109
    
    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);
}
    
392.2What is MoreRows???KIRK::KYZIVATPaul KyzivatMon Mar 23 1987 15:300
392.3COUGAR::SMCAFEESteve McAfeeMon Mar 23 1987 15:3716
    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
    
    
392.4Works great!ANGORA::SMCAFEESteve McAfeeMon Apr 06 1987 16:5021
    
    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
392.5ECC::JAERVINENMay all your loops be infiniteWed Apr 08 1987 08:2232
    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.
    
392.6COUGAR::SMCAFEESteve McAfeeTue Apr 14 1987 00:4518
                              
    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
392.7ECC::JAERVINENDown with gravity!Tue Apr 14 1987 09:302
    Add Dpaint2 to the list of programs that fail..