Megalextoria
Retro computing and gaming, sci-fi books, tv and movies and other geeky stuff.

Home » Archive » net.micro.trs-80 » Again: What makes the Model 4 work?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Again: What makes the Model 4 work? [message #128059] Mon, 11 November 1985 17:02 Go to next message
marty1 is currently offline  marty1
Messages: 10
Registered: September 1985
Karma: 0
Junior Member
Article-I.D.: houem.408
Posted: Mon Nov 11 17:02:18 1985
Date-Received: Tue, 12-Nov-85 04:57:20 EST
Organization: AT&T Bell Labs, Holmdel NJ
Lines: 26

As long as sob@neuro1.UUCP (Stan Barber) has replied on the net
to my question about how to access the special features of the
Model 4 when I only have a cassette system, let me continue:

Stan says "... you can push info out to certain ports to make
things happen.... but it is hard to use 64K of ram that is empty. 
Once you do the ROM swapout, there is no way to load the ram with
anything....  You cannot use the 4 in III mode with the 80x24
screen without a special driver to cause all the video mapping to
happen right....  Sorry this is such a downer."

OK, no problem!  I just want 80x24 for my terminal emulator.  It
has its own screen driver, it uses ports for RS-232, and I can
copy a keyboard driver.  The Model III screen and keyboard maps
are in the part of the address space that goes away in Model 4
mode, so I have to know what to do instead.  But I have the source
for the terminal program.  I can hack what I need, load it from
cassette in Model III mode, let it swap into Model 4 mode, and run!

So, I'm still asking Stan or anybody else: what info goes through
what ports to get into, use, and get back from Model 4 mode?

		M. B. Brilliant		houem!marty1
		39 McCampbell Road
		Holmdel, NJ 07733	(201)-946-8147
		AT&T-BL Holmdel, NJ	(201)-949-1858
Re: Again: What makes the Model 4 work? [message #132830 is a reply to message #128059] Fri, 15 November 1985 04:03 Go to previous messageGo to next message
sob is currently offline  sob
Messages: 3
Registered: August 1985
Karma: 0
Junior Member
Article-I.D.: neuro1.669
Posted: Fri Nov 15 04:03:22 1985
Date-Received: Sat, 16-Nov-85 09:21:35 EST
References: <408@houem.UUCP>
Reply-To: sob@neuro1.UUCP (Stan Barber)
Organization: Neurophysiology, Baylor College of Medicine, Houston, Tx
Lines: 43


Here is a list of interesting ports for the Model 4.

PORT 84H

Bit 0 and 1 control the enable state of the Model III ROMS and the Video
and keyboard mapping swapout. The following table illustrates this.

BITS   MODEL III ROMS ENABLED		VIDEO/KEYBOARD STATUS
1  0

0  0		YES			  MODEL III MODE
0  1		 NO			  MODEL III MODE
1  0		 NO			  MODEL IV MODE  (IN)
1  1		 NO			  MODEL IV MODE  (OUT)

Bit 2 controls the format of the display.... 0 = 64X16, 1 = 80X24

Bit 3 when on means use reverse video

Bits 4 5 and 6 control RAM bank select accoding to this table.

BITS		Lower 32K RAM		Upper 32K RAM
6 5 4
0 0 0		Bank 0			Bank 1
0 1 0 		Bank 0 			Bank 2
0 1 1		Bank 0			Bank 3
1 1 0		Bank 2			Bank 1
1 1 1		Bank 3			Bank 1

Bit 7 controls what page to map the 64x16 screen into: 0 = page 0, 1=page 1

ports 88-8BH are ports on the CRT controller, but I don't know how they work.
I can tell you that the CRT controller is a 68054. If you get more info here,
please forward it.

90H allows you to sound the sound board.

Hope this helps. Sorry to not be so helpful the last time.
-- 
Stan		uucp:{ihnp4!shell,rice}!neuro1!sob     Opinions expressed
Olan		ARPA:sob@rice.arpa		       here are ONLY mine &
Barber		CIS:71565,623   BBS:(713)660-9262      noone else's.
Re: Again: What makes the Model 4 work? [message #132831 is a reply to message #128059] Fri, 15 November 1985 11:37 Go to previous messageGo to next message
uhclem is currently offline  uhclem
Messages: 20
Registered: May 2013
Karma: 0
Junior Member
Article-I.D.: trsvax.70700051
Posted: Fri Nov 15 11:37:00 1985
Date-Received: Mon, 18-Nov-85 06:30:20 EST
References: <408@houem.UUCP>
Lines: 53
Nf-ID: #R:houem.UUCP:408:trsvax:70700051:000:2414
Nf-From: trsvax!uhclem    Nov 15 10:37:00 1985




How to set your Model 4 screen to 80x24 or 40x24 while staying in Model III
mode.

This is pretty easy.  There is a port called OPREG$ (0x84) which
controls the memory mapping and the CRTC-program select.  It looks liks this:

B7       B6       B5       B4       B3       B2       B1       B0
Page	Fix       Memory   Memory   Invert   80/64    Select   Select
	Upper (0) Bit 1    Bit 0    Video             Bit 1    Bit 0
	Memory    		    (Alt Set
				     Select)

Bit 2 controls if the CRTC is programmed for 80x24/40x24 or 64x16/32x16.
The half-width adjustment is in port 0xEC (MODOUT), bit 2 (MODSEL).

Bits 1 & 0 of OPREG$ decide what memory map to use.  Since you want to
stay in Model III mode, these bits should remain 0.  This keeps the ROMs
selected, and places the keyboard at 0x3800 and the video at 0x3C00.

The Page bit (Bit 7) selects which 1K of the 2K video RAM is addressable
at 0x3C00.  It does not affect which page is shown on the screen in any
mode.  So what you get to do is write code to break your screen requests
up and turn that bit on if you want the upper 1K and off if you want the
lower 1K.

OPREG$ is unknown to the Model III ROM and operating systems, so you
will need to keep a copy of its contents in RAM somewhere as it is a
write-only port.
MODOUT is known, and Model III systems maintain a copy of it at 0x4210.
So if you modify this port, be sure to read the copy at that address,
and/or bits in it, store it back, then write to the port.

(By the way, Bits 6-4 control banking when you have 128K.)

All of the above information can be found in the Model 4/4P Technical Reference
Manual 26-2110, and some of it was in Model III/4 Cassette BASIC Reference
Manual or something like that.  (Should have come with your 16K machine.)


						
						"Thank you, Uh Clem."
						Frank Durda IV
						@ 

"If you took the bugs out it wouldn't be crashy, would it?!?"
Re: Again: What makes the Model 4 work? [message #132835 is a reply to message #128059] Thu, 21 November 1985 10:31 Go to previous messageGo to next message
marty1 is currently offline  marty1
Messages: 10
Registered: September 1985
Karma: 0
Junior Member
Article-I.D.: houem.417
Posted: Thu Nov 21 10:31:59 1985
Date-Received: Sat, 23-Nov-85 01:59:50 EST
Organization: AT&T Bell Labs, Holmdel NJ
Lines: 34

Thank you, Uh Clem (Frank Durda), and you too, SOB (Stan Barber), for
the Model 4 port info.  Checking it out in BASIC was fun; implementing
it in ASM will be boring but useful.  I got everything but sound.

"OUT 132,4" puts up an 80x24 screen (at reduced brightness), with
garbage in the bottom half and the lines out of alignment.  "OUT
132,132" writes on the bottom half (but the last line is out of range
of the screen).  All I need (after installing an RS-232 interface) is a
few obvious but messy fixes in my terminal program.

"OUT 132,8" gets back to 64x16 with reverse video capability. After
"PRINT CHR$(21)" or a POKE to 16420 (to turn off space compression),
setting bit 7 gives ASCII characters in reverse video.  Now the same
characters that control underline mode on the printer (DMP-100) can be
used for "standout mode" on the terminal.  And a reverse-video cursor
might be better than that blinkin' blinking cursor.

Predictably, changing bit 0 or 1 in an OUT to 132 disables the machine
until RESET is pushed, since the ROM goes away.

Is there a noise-maker in the Model 4?  I tried "OUT 144,everything"
following Stan's suggestion that "90H allows you to sound the sound
board" but got no sound.  Am I missing something?  I'd like to have
an audible bell instead of the visible flash I now have.

None of this is in the Model III/4 Cassette (whatever-title) Operation
and BASIC Manual.  The POKE and OUT for double-speed are in there, but
RAM locations and ports are not mentioned for things you control by
sending characters to the screen.

		M. B. Brilliant		houem!marty1
		39 McCampbell Road
		Holmdel, NJ 07733	(201)-946-8147
		AT&T-BL Holmdel, NJ	(201)-949-1858
Re: Again: What makes the Model 4 work? [message #132847 is a reply to message #128059] Wed, 27 November 1985 10:36 Go to previous messageGo to next message
uhclem is currently offline  uhclem
Messages: 20
Registered: May 2013
Karma: 0
Junior Member
Article-I.D.: trsvax.70700054
Posted: Wed Nov 27 10:36:00 1985
Date-Received: Sat, 30-Nov-85 06:45:48 EST
References: <408@houem.UUCP>
Lines: 72
Nf-ID: #R:houem.UUCP:408:trsvax:70700054:000:3561
Nf-From: trsvax!uhclem    Nov 27 09:36:00 1985


<"What do you mean 'It's in Reserved for future use phase'?  Oh, its SCSI.">

 > "OUT 132,4" puts up an 80x24 screen (at reduced brightness), with

That is right.  I take it you have one of the older model units, and when
you changed the screen clocking to the higher rate, the RFI torroids
clip the white signal more obviously.  If this bothers you, you can
fix it real fast by pulling these out, but beware: on some units you
will start picking up herringbone patterns and other harmonic crud
in your video.  In the later units they fixed this, and there may be a TCO
available to cover it.  Check with your local Service shop.

 > garbage in the bottom half and the lines out of alignment.  "OUT

Also right.  The old Model IV ROM only cleared the 1K that was used
in Model III mode, and it was the responsibility of any Model 4 operating
system to clear the other half.  You are just seeing uninitialized 
video RAM.  As to the alignment, the Model IV ROM thinks that every
64th byte is the start of a new line, not every 80th, so things do
get messed up it you try to use the ROM video drivers in 80 column mode.

 > Is there a noise-maker in the Model 4?  I tried "OUT 144,everything"

The port that I gave you is correct, but it finally registered that you
have a diskless system.  Look at the back (not the bottom) and see if
the RS-232 port comes out of the machine at the seam between the top
and bottom of the machine.  If it is not there, then look underneath
and see if it is in the second row, center hole on the bottom.
If the RS-232 port is on the bottom and the machine has no disk drives, 
then it will not have a bell.  It was decided (not by me, so no flames please)
that if the machine could not run Model IV software (no drives), and no
Model III software knew about the bell, then leaving that part off would be
a nice way to cost-reduce the drive-less unit.  If the RS-232 port
comes out the back, then you get one no matter what, since the speaker is
now built onto the motherboard. (The sound stuff gets added with the first
floppy drive on the older units.)
The schematic for the sound board (for machines with RS-232 port coming
out the bottom) is on Page 22 of the Model 4 Technical Reference and is
real big:   |:(?)
		 4   +-----------------------------+---
		+----O----+			   | ^+5
  D0	       2|    P	  |   +--------------------+
3>--------------|D   U1	  |   |	  R1 1.8K	   /
  BLK		| 74LS74  |   +--\/\/\/---+	 ^/ E
  SEN	       3|	  |		  |	/  \		Q1=2N3906
1>--------------|	~Q|------\/\/\/---+---B( Q1 )
  WHT		|    C    |6	 R2 3.6K	\  /\C
		+----O----+			 --  \__/\/\/\/--->QMB6<--+
		     |1				      R3 120 OHM	  |
		     |	VCC (14)=+5					GND
2>----+---+5---------+	VDD (7)=GND
      |				QMB6 is one of those piezo-speakers
     --- C1 .1uf		without the tone generation circuitry.
     ---			Don't use a Sonalert as you will always get
      |				the same pitch.
4>----+---GND
So you can build one if you find you don't have, or you might order a
finished one from National Parts.  With that part-count, it can't be
too expensive.



						"Thank you, Uh Clem."
						Frank Durda IV
						@ 
						
"The crime of copy-protecting bears bitter customers.  The Lawyer knows."(tm)
Re: Again: What makes the Model 4 work? [message #132848 is a reply to message #128059] Wed, 27 November 1985 16:06 Go to previous message
root is currently offline  root
Messages: 85
Registered: June 1984
Karma: 0
Member
Article-I.D.: techsup.-1677885
Posted: Wed Nov 27 16:06:00 1985
Date-Received: Sat, 30-Nov-85 06:46:01 EST
References: <408@houem.UUCP>
Lines: 28
Nf-ID: #R:houem.UUCP:408:techsup:-1677885:000:1139
Nf-From: techsup!root    Nov 27 15:06:00 1985


/* Written  9:31 am  Nov 21, 1985 by houem.UUC!marty1 in techsup:net.micro.trs- */
Thank you, Uh Clem (Frank Durda), and you too, SOB (Stan Barber), for
the Model 4 port info.  Checking it out in BASIC was fun; implementing
it in ASM will be boring but useful.  I got everything but sound.

... 18 minutes of silence accidently deleted.....

Is there a noise-maker in the Model 4?  I tried "OUT 144,everything"
following Stan's suggestion that "90H allows you to sound the sound
board" but got no sound.  Am I missing something?  I'd like to have
an audible bell instead of the visible flash I now have.

None of this is in the Model III/4 Cassette (whatever-title) Operation
and BASIC Manual.  The POKE and OUT for double-speed are in there, but
RAM locations and ports are not mentioned for things you control by
sending characters to the screen.

		M. B. Brilliant		houem!marty1
		39 McCampbell Road
		Holmdel, NJ 07733	(201)-946-8147
		AT&T-BL Holmdel, NJ	(201)-949-1858
/* End of text from techsup:net.micro.trs- */

******
If you have an early cassette model 4, the buzzer was not included.  It 
came with the disk upgrade.  
******
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: DTR on MS-DOS
Next Topic: model III upgrade
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Mar 28 12:57:21 EDT 2024

Total time taken to generate the page: 0.02811 seconds