This is the documentation for MONO_EMU.PRG v3.00
Mick West
April 1988
The mono emulator lets you use the high resolution mode on
the atari ST, using a normal TV or monitor - i.e., you don't have
to fork out œ150 on an Atari SM125 High-rez mono monitor, if you
want to run programs such as Signum, PCB designer, various Midi
programs, PD utilities etc.
This is the Third major version of the program. The first
was printed in Popular Computing Weekley in Vol 6 Nos 43 & 44.
This version has a number of improvements:
o It will now run on both the old and new versions of TOS
o It can (must actually) be run from an AUTO folder
o It works with SNAPSHOT.ACC
o It is twice as fast as versions 1 and 2
o It does not crash if you run it on a mono monitor
so you can leave it in the AUTO folder
How to use it.
--------------
Just copy it ( MONO_EMU.PRG ) into an AUTO folder. Then boot
from this disk. It will load automatically and display a short
message. There will be a prompt at the bottom of the screen
asking you to input a number from 10 to 80. This controls how
often the screen is updated and also, how much your program is
slowed down by the emulator. An input of 10 gives a rather jerky
display, but there is no noticeable decrease in speed. Using 80,
is very smooth but the ST runs at about 56% of its normal speed
If you just press " Return", you will get the default setting of
40, the ST will run at 75% of its normal speed and the display
will be quite smooth enough
After entering the speed, you should be returned to a
monochrome desktop with a grey background and little icons. You
should now be able to load and run any monochrome program.
The mono emulator uses about 34K of memory, so if you have only
got 512K of RAM then you may encounter problems with some of the
larger programs. This is more likely if you have some desk
accessories loaded.
You should use the mono emulator from an AUTO folder. If you
simply load the program in the normal way, you will get a squashed
half-screen version of the desktop. If you now go up to the
Options menu, select "Set Preferences" and then click "OK", you
will get the normal mono desktop back, but the menus and the dialog
boxes will be squashed. Most odd!
The New Roms.
-------------
The original mono emulator used lots of ROM addresses and
only worked with the right ROM. Version 3.00 only uses one ROM
address, used to tell TOS to configure itself to being in mono
mode. I have not yet worked out how to do without this routine.
If anybody does find a way that will be compatible with all the
ROMs, then please do write and tell me.
As the ROM call is different for each version of TOS, the
program has to detect which version of TOS is installed and then
alter itself accordingly. To do the detecting, it checks the
date-of-creation bytes, which are stored at address $FC0018 in the
ROM. The program then searches through a table until it finds
this date; then takes the address of the ROM routine from the
table and inserts it in the program. If the date is not found,
it will print a message saying so, and default to the V1.08 TOS
though it will then probable crash.
At the moment (11 April 1988) the table only has entries for
two TOS's, the old and the new British versions. These have dates
of 20/11/85 and 22/4/87, with corresponding ROM routines at $FCA76A
and $FCA914. However, if you do not have one of these, do not
despair; all is not yet lost. It is not very difficult to change.
All you need to do is find the ROM creation date (which is simply
whatever is stored in the long word at $FC0018) and then find
the corresponding ROM routine.
The ROM routine is called from the XBIOS routine "SETSCREEN"
and the easiest way to find it is to set up a bit of code like:
MOVE.W #1,-(SP)
MOVE.L #-1,-(SP)
MOVE.L #-1,-(SP)
MOVE.W #5,-(SP)
TRAP #14
ADD.L #12,SP
RTS
Then use a debugger (I used K-Seka) to single step through the ROM
call, until you have got past the JMP (A0) instruction in ROM.
Then you should come across a bit of code like:
FC0982 TST.L $0004(A7)
FC0986 BMI $FC098E
FC0988 MOVE.L $0004(A7),$044E(A5)
FC098E TST.L $0008(A7)
FC0992 BMI $FC09A4
FC0994 MOVE.B $0009(A7),$FF8201.L
FC099C MOVE.B $000A(A7),$FF8203.L
FC09A4 TST.W $000C(A7)
FC09A8 BMI $FC09CE
FC09AA MOVE.B $000D(A7),$044C(A5)
FC09B0 BSR $FC0726
FC09B4 MOVE.B $044C(A5),$FF8260.L
FC09BC CLR.W $0452(A5)
FC09C0 JSR $FCA76A.L <--- this is it
FC09C6 MOVE.W #$0001,$000452.L
FC09CC RTS
This is from the old British ROM, in which the number is
$FCA76A. The routine should be the same in other TOS's, so you
should be able to find it quite easily. If you do have problems,
get in touch with me.
When you have got the two numbers, you need to add them to
the source code. The table is right at the end. Insert them in
the place indicated by the comment, but be sure they are before
the line 'DC.L $0,$0'. For example suppose the numbers you find
are $02061986 and $FCA822 then you should add the line :
DC.L $02061986,$00FCA822 ; German (or wherever)
If you do find any new ROMs, please sent the numbers to me,
so that I can keep up to date.
This really is a tedious way of doing things so if anyone
does come up with a way of doing without the ROM call, which is
compatible with all ROMs then PLEASE let me know. In the meantime
this will have to suffice.
If you want to write to me with any numbers, problems,
comments, money (it is shareware you know, and it saved you œ150),
or anything else then write to:
MICK WEST
27, LYNTON DRIVE
SHIPLEY.
WEST YORKSHIRE,
BD18 3DJ
ENGLAND
Distribute!