0 ratings0% found this document useful (0 votes) 2K views84 pagesAtari Portfolio Technical Reference Guide
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
A ATARI Portfolio
Technical Reference Guide
First Edition
September 1989
CONFIDENTIALThe information in this guide is proprietary and confidential. This guide and the information herein
may be used only in accordance with the written agreement under which it was supplied.
Copyright © 1989, Distributed information Processing (DIP), Ltd.
All rights reserved. Copyright in this Portfolio Technical Reference Guide, the software contained in
the Portfolio, and all technical drawings of and relating to the hardware design ("the Copyright
Material”) Is vested in Distributed information Processing Limited ("DIP"). Accordingly no part of the
‘Copyright Material may be reproduced, stored in a retrieval system or transmitted in any form or by
any means without the prior written permission of DIP.
Atari, the Atari logo and Porttolio™ are trademarks or registered trademarks of Atari Corporation. IBM
PC is a trademark of International Business Machines Corporation. Lotus 1-2-3 is a trademark of
Lotus Development Corporation. MS-DOS is a trademark of Microsoft Corporation. Turbo C, Sidekick
are trademarks of Borland Corporation. XTALK is a trademark of Microstul Corporation.
AVATART
Atari Corporation
1196 Borregas Avenue
‘Sunnyvale, CA 94086CONTENTS
1 Technical Overview of Portfolio.
2 Hardware
2.1 System Description...
2.2 System Memory.
2.3: Memory Cards...
2.4 Custom ASIC Chip.
2.5 Power Supply Uni
2.6 Portfolio Expansion Port......
2.7. Peripheral Design Issues.
2.8 LCD Display...
3 Software
3.1. General Description... 31
3.2 Differences Between Portfolio BIOS and IBM PC BIO: 3-4
3.3 System Specific BIOS.......... ee
3.4 Differences Between MS-DOS and Portfolio DOS.............3-23
3.5. Device Drivers and Peripheral Software.......... 3-24
3.6 Memory Cards...
3.7 Screen Handling.
3.8 Power Management.
3.9. Special File Formats...
3.10 IBM PC Development. system.
4 Peripherals
4.1 Portfolio Serial Communications...
4.2 Smart Parallel Interface File Transfer Protocol +1 Description
4.3 IBM PC Card Drive...
4.4 EPROM Writer Adaptor Boards,
Appendixes
A Example .RUN Program...
B_ Diagram of Portfolio Character Set.
C Example Peripheral Design.1 TECHNICAL OVERVIEW OF PORTFOLIO
The Atari Portfolio is the first product that provides the functionality of a standard
desktop PC in a package which can fit into a pocket.
The main requirements for the Portfolio technology are that the product should be
pocketable, compatible, have low power consumption and above all be inexpensive
to purchase.
The Portfolio is the size of a video cassette (VHS) and weighs less than one pound
(450 grams).
The Portfolio provides a high degree of software compatibility with the industry
standard desktop microcomputer, the IBM PC. This is achieved by supplying a PC-
compatible BIOS, MS-DOS-compatible operating system as well as Lotus 1-2-3 file-
compatible spreadsheet. The Portfolio also provides an expansion bus connector
which allows peripherals to be connected to the product.
The Portfolio is inexpensive to manufacture as the software is provided on and runs
from ROM and with the large scale integration of system logic, using an ASIC, the
overall component cost and size are reduced.
The Portfolio uses credit card-sized memory cards instead of magnetic disks, and a
LCD display. These components have a low power consumption and hence the
product can use the consumer standard AA batteries and achieve a long battery life.
This Technical Reference Guide describes the Portfolio technology in detail and
provides the necessary information for a third party to develop hardware and
software applications for the Portfolio. This document only provides information
specific to the Portfolio technology. If you want information on the standard IBM PC
hardware, BIOS, or MS-DOS then the following publications should provide the
required information:
BM Personal Computer Publications:
Technical Reference (BIOS and Hardware)
Disk Operating System (PC-DOS)
Microsoft Press Publications ISBN Reference
Peter Norton Programmer's Guide 0-914845-46-2
The MS-DOS Encyclopedia 1-556 15-049-0
IBM ROM BIOS (Quick Reference Series) 1-55615-135-7
MS-DOS Functions (Quick Reference) 1-556 15-128-42. HARDWARE
2.1. System Description
OSCILLATORS
POWER SUPPLY KEYBOARD
CONTROL,
ON BOARD RAM.
e0ces 4B MDA 124KB
SYSTEM COMPATIBLE SYSTEM
Loaic
INCLUDING
CHARACTER| DEDICATED | LCD
EXPANSION ASIC GENERATOR | VIDEO DRIVE
PORT ROM RAM
VIDEO CONTROLLER
TONE DIALLER 128KB ROM A
AND SOUNDS
CARD MEMORY 128KB ROMB
BLOCK DIAGRAM OF PORTFOLIO SYSTEM2.1.1 Microprocessor Unit
The Portfolio uses an 80C88 MPU, the same processor as the original IBM PC. It is
the CMOS static version which allows the MPU clock to be halted when no
processing is taking place and hence power consumption is kept to a minimum. The
Portfolio is faster than the original IBM PC, the clock running at 4.9152MHz instead
of 4.77MHz. However, the Portfolio processor uses minimum mode, so bus lock
cannot be used. (See section 2.6 for more details.)
2.1.2 System RAM
The current Portfolio uses four 32 KByte Static RAM chips, giving a total of
128KBytes, These have a very low standby current which allows them to maintain
their contents for extended periods with minimal drain on batteries.(See section 2.2
for more details.)
2.1.3 System ROM
The current Portfolio has in total 256 KBytes of ROM which contains all of the BIOS,
DOS, command processor and application software. This ROM currently comprises
of two 128 KByte chips. (See section 2.2 for more details.)
2.1.4 LCD Display
The LCD is a 240 x 64 pixel display. It is driven by a set of LCD screen drivers which
are controlled by a graphics LCD controller. The screen behaves in the same way
as an IBM PC monochrome text screen (MDA). The controller also uses a dedicated
Video RAM chip and a character generator ROM. For graphics it is pixel compatible
provided the PC-compatible BIOS is used. (See sections 2.2.2, 2.8 and 3.7.)
2.1.5 Tone Dialler + Sound
The Portfolio speaker is driven by a Dual Tone Multiple Frequency (DTMF)
telephone dialler chip. This produces all the necessary dual tones required for tone
dialling plus a set of melody tones for musical applications. The keyboard click also
uses this circuit. (See section 3.3.1.)2.1.6 ASIC
This circuit contains most of the system logic. (See section 2.4 for more details.)
2.1.7 Keyboard
The Portfolio uses a 63-key QWERTY 'switch-matrix’ keyboard. The ASIC
generates a set of physical scan-codes which are translated by the BIOS to IBM PC-
compatible scan-codes.
2.1.8 Memory Card Connector
The Portfolio contains a memory card connector on the side of the product. Credit
card-sized memory cards can be inserted into this connector. allowing for data and
programs to be accessed by the Portfolio software. (See section 2.2.4, 3.6.)
2.1.9 Expansion Port
On the right-hand side of the product there is a 60-pin connector which provides the
necessary signals for various peripherals. (See section 2.6, 2.7 and 3.5.)
2.1.10 Power Supply Unit
This supplies all the power required in the system. It produces various supply lines.
The circuit includes a switching regulator that steps up the voltage from 3 AA cells to
5V. The regulator may be switched off. (See section 2.5 and 3.8 for more details.)
232.2
2.2.1
FFFFF
E0000
0000 |
1000 —
VIDEO RAM MDA 4K BYTES
B0000 —
NOT USED
‘0000 oe —___|
NOT USED
9F000 |--———__——. —$—$_____]
EXPANSION RAM AREA UP TO
512K BYTES
‘3F000
00000
SYSTEM MEMORY
Memory Map
SYSTEM ROM A - (128K BYTES)
‘SYSTEM ROMB - (128K BYTES) CREDIT CARD MEMORY
(EQUIVALENT TO
A: OR B:)
MIRROR OF VIDEO RAM (NOT USED)
124K BYTES
(INCLUDING C:)
SYSTEM RAM-
Diagram of Portfolio Memory Map
(all addresses in hex)
242.2.2 RAM
There is a total of 128 KBytes of on-board RAM provided with the Portfolio.
4 KBytes of this RAM are mapped to BO000h to make up the video RAM which is
compatible with the IBM PC MDA screen. This gives a total system RAM of 124
KBytes.
The system RAM can be expanded up to 636 KBytes by use of memory expansion
peripheral(s).
The Portfolio allows the user to have an internal RAM disk (known as C:) which can
be user configured. This RAM disk uses the top of the system RAM.
2.2.3 System ROM A
This contains the BIOS, operating system and some of the application software. The
reset vector sits at FFFFOh. This ROM cannot be mapped out of the memory map.
2.2.4 System ROM B
This contains the rest of the application software. This ROM may be switched out of
the memory map and replaced by either the internal memory card or an external
memory card on a peripheral. The BIOS disk services would normally perform this
switching function. (See section 3.6.)
252.3. Memory Cards
The Portfolio uses credit card-sized memory cards which are specially designed for
the Portfolio. There are similar memory cards available from other vendors. DO
NOT use these cards with the Portfolio as they may harm the card and the Portfolio.
These come in three main types: RAM, OTPROM and Mask ROM. (See below for
explanation.)
The cards are formatted to look like MS-DOS disks. It is possible to run a program
directly rom a card and hence reduce the amount of system RAM required. (See
section 3.6.3 for more details.)
2.3.2 RAM cards
The RAM cards are currently available in three main sizes: 32, 64 and 128 KBytes.
The cards are made up of Static RAM and each card contains a lithium back-up
cell. This cell will maintain the data on a card when it is not in a Portfolio for a year
or more.
2.3.3 OTPROM cards
The One Time Programmable ROMs cards that are currently available are 64 and
128 KBytes. They are read-only cards and would typically be used for holding fixed
data or software. They can be programmed in a standard EPROM programmer like
anormal PROM (see section 4.4)
2.3.4 Mask ROM
These cards are "factory programmed’ and have a low unit cost. This makes them
suitable for issuing mass production software. Currently available only as 128 KByte
option.
2.3.5 Future Card Sizes
The Portfolio BIOS contains support for ROM and RAM cards of greater than 128
KBytes. If these become available, they will be made up of 128 KByte pages with a
page register at offset OOOAN. It is imperative that NO application software uses this
memory card location, no matter what the card capacity
262.3.6 Memory Card Pin-out
Below is a pin out of typical memory cards. Differences between the various card
types are highlighted. (Pin 1 is on the right with the connections up and pointing to
you.)
Pin COMMON RAM OTPROM Mask ROM
32k 64k 128k
1 AIG
2 AIS
3 VBB VPP NC VPP NC
4 Al2
5 AT
6 AG
7 AS
8 A
9 AB
10 AZ
WAL
12 AO
13 DO
14 (Ot
18 D2
16 = GND
17 D3
18 (DA
19 DS
20 «DS
21 07
2200 (CE
23° AIO
24 OE OE OENVPP OF (OE
25 ANT
26 AG
27 AB
28 ANB
2900 ANA
30 WE NC NC PGM NC
31 vee
32. CDET
NC__No internal connection.
VCC Operating supply: 5 Volts.
GND__ Signal ground
CDET This is the small pin (internally connected
to GND), used to detect presence of card.
Ax Card address line x.
Dx_ Card data line x.
VBB Card battery voltage.
PGM — OTPROM program line. OV in program mode.
VPP OTPROM program voltage.
12.5V Program mode, 5V normally
OE —_Lowto indicate a read cycle.
WE —_Low to indicate a write cycle.
272.4 Custom ASIC Chip
The Portfolio custom ASIC chip provides most of the necessary system logic. Itis a
gate array implemented using silicon gate CMOS technology, which allows for very
low power and high speed operation.
This Application Specific Integrated Circuit (ASIC) is used to generate all the select
lines for the memory, memory cards and other system blocks. It also contains
several system control functions. These functions are controlled using a set of
registers which control the various parts of the system such as memory chip size.
2.4.1. System Clock
The clock is 4.9152MHz, with a 50% duly cycle produced by a crystal oscillator. The
clock can go in to a stop mode. A custom chip interrupt will cause the clock to
restart,
2.4.2. Timer
The system timer tick count is generated from a 32768Hz crystal oscillator which will
generate an interrupt every 1 second or every 128 seconds.
2.4.3 Keyboard Controller
The keyboard controller will scan an eight by eight push to make key-switch matrix.
A pressed or released key will cause an interrupt. The processor will obtain the scan
code from a control register
2.4.4 Interrupt Handler
This controls the critical error for the memory cards, keyboard and tick count
interrupt. This is extended outside the ASIC to allow for external peripheral
interrupts.
2.4.5 Soft Contrast for LCD
A control register holds the contrast value for the LCD display.2.5 Power Supply Unit
The Portfolio has several power supply lines and control lines. These are used for
various purposes and have different power characteristics as explained below. They
are all available on the expansion bus.
When batteries and a power supply are connected
the Portfolio will be supplied by the higher voltage (
he Portfolio simultaneously,
ial source”)
(See section 3.8 for software issues.)
2.5.1 Power Modes
i) NO POWER MODE
This is the state when no initial source is connected to the Portfolio (e.g. changing
batteries). If an initial source has been supplied and then removed, the system RAM
will be backed up by an internal capacitor
ii) OFF MODE
This is the state the Portfolio goes into when the OFF’ command is used. The
custom chip and RAM are powered directly from the initial source.
iii) STANDBY MODE
This is the state that the Portfolio will be in while waiting for a key press. The whole
system is powered from the output of the internal five volt regulator. However, the
‘system clock CCLK is halted in order to stop the processor and save power.
iv) RUN MODE
This the state in which the Portfolio is actually processing. The whole system is
powered from the output of the five volt regulator and the system clock CCLK is
running, thus causing maximum power usage
2.5.3 VCC (Memory Card supply voltage)
This line follows 5VS. It is designed to be used by an external memory card so that
plugging in and pulling out a card will not cause spikes on 5VS. This line should not
be used for any other purpose.
292.5.2 SVS - Five Volt switched supply line
This is the output of the five volt regulator. During STANDBY and RUN modes, this
line will supply five volts. At any other time this line will float low. Peripherals may be
designed that use this supply.
5VS is capable of supplying up to 40 mA at SV +/- 5% to a peripheral. This assumes
that the main unit is taking maximum power. The Portfolio will run correctly outside
the 5% supply tolerance: however, this is not recommended.
Use of 5VS by a peripheral will decrease the unit's battery life. Also, since alkaline
batteries develop a voltage drop (due to internal resistance) the low battery warning
will occur when the batteries are less depleted than if the peripheral was not
plugged in.
2.5.4. VRAM (Memory Power Supply)
This is the supply for the system RAM:
STANDBY and RUN 4.5V
OFF initial source voltage - 0.5V
NO POWER current voltage across a capacitor.
During NO POWER Mode the voltage will decay, so care should be taken that no
current is taken from this line or the system RAM could be corrupted. When the cold
reset switch is pressed this line is pulled to GND through a small resistor.
2.5.5 VEXT (External voltage)
This is the external power supply voltage connected directly to the external jack
socket. This enables peripherals with their own power source to make use of the
Portfolio external power supply. It is possible to supply the Portfolio via this
connection. However, care should be taken to avoid external power supply contlicts.
2.5.6 BATD (Battery detection signal)
This control signal is used to isolate system RAM from the rest of the circuit when
the batteries are removed. It would normally carry the initial source but when the
initial source is removed, it is pulled to GND. This line could be used by a peripheral
to access the initial source.2.6 Portfolio Expansion Port
The Portfolio uses a 60-pin expansion connector which can take custom designed
peripherals. (See section 4 for more details on current range of peripherals.)
2.6.1 Expansion Port Connector Pin-out
Location of pin 1 - If you are looking into the Portfolio expansion port then the top
pin on the right is 1 and the bottom right is 2.
ABUF
REDY
BCOM
NMD1
DTR
PDET
ccLK
HLDA
IACK
IoM
AIB
AI6
Ala
Al2
Ato
AB
HLDI
GND
OAT
OAS
OA3
OAt
ADO
AD2
AD4
ADE
INT
VEXT
BATD
5VS
vs
vec
Nec
WAKE
INT
MRST
HLDO
DET
. AIS
. AIT
. AIS
ANB.
ANT
. Ad
. VRAM
ALE
NMIO
OA6
OA4
. OAZ
AO
ADI
ADS
. ADS
. ADT
RDI
. EACK
. NWRI
BBUF
2-112.6.2 Explanation of expansion pin names
This section explains the functions of the expansion port. It assumes a knowledge of
80C88 minimum mode. Detailed Timing for relevant signals can be found in a
microprocessor data sheet, ideally OKI MSM80C88ARS-2.
REDY
vcc
BCOM
NCC1
NMD1
DTR
DEN
PDET
HINT
output
This line indicates to the CPU that the custom chip is ready. This line is
active high.
output
This is the Credit Card power supply.
output
This is the communications select line, used for peripheral
implementations. It is low if /O locations 807X are being accessed. This
signal is active within 100nS of I/O address being valid (see section 2.7).
output
This is the external credit card chip select line. It is low if the external
credit card is selected. See BCOM for timing.
input
This is the external credit card detect line. It goes low to indicate that a
card is plugged in.
input/output
This is the 80C88 data direction signal. During CPU HOLD this line may
be driven.
input/output
This is the 80C88 data enable signal. Low indicates a data cycle. During
CPU HOLD this line may be driven
input
This is the peripheral detection line. It should be tied high on a terminating
peripheral that has a PID. (See section 2.7 for more details.)
output
This is the internal interrupt request line to the CPU (INTR). It goes high to
indicate an interrupt request.|ACK
EINT
EACK
CCLK
MRST
HLDI
HLDO
HLDA
input/output
This is the 80C88 interrupt acknowledge line (INTA). It goes low to
request an interrupt vector after an IINT. During CPU HOLD it may be
driven by external hardware.
input
This is the external interrupt request line. It may be driven high by external
hardware on a terminating peripheral to request an interrupt. This interrupt
line has lower priority than the on board interrupts. This signal is level
triggered
output
This is the external interrupt acknowledge line from the Portfolio. It goes
low to request an interrupt vector after an EINT. It follows \INTA on the
processor, but is delayed by up to 40nS.
output
This is the main processor clock (4.9152MHz, 50% duty cycle). Since the
clock pauses when no processing is taking place, dynamic logic should
not use this line. It may be used for synchronising peripheral logic. During
halt mode this line is high. This signal is only available to terminating
peripherals.
output
This indicates system reset. MRST will normally be high, except when a
terminating peripheral is installed. The terminating peripheral will experi
ence a short reset when inserted. If a terminating peripheral is installed
then MRST goes high to indicate system reset. MRST will remain high at
any time the reset key is pressed. It will also go high when the main
computer system powers up. Under these conditions MRST will remain
high for over 300mS.
input
This is the hold request line and will drive HOLD on the 88C88. It may be
driven high by external hardware to requisition the system bus.
output
This is the 80C88 hold request line (HOLD). HLDI should be used to
request a HOLD.
output
This is the 80C88 hold acknowledge line (HLDA). It goes high to indicate
that the bus is now free. This state will be called CPU HOLD.WAKE
CDET
10M
VRAM
5VS
GND
VEXT
ALE
A8-A19
input
This line is used by a peripheral to wake up the main computer when it is.
powered down. This line is set low to request wake up. Wake up can be
confirmed by waiting for a falling edge on MAST. It will take 300-400mS
for wake-up to be confirmed. When wake up is confirmed, the wake input
should be released.
input
This signal is tied low to indicate to the main computer that an external
credit card drive is present.
input/output
This is the 80C88 memory access select line. If high then a I/O cycle is
taking place, if low then a memory cycle. During CPU hold this line may
be driven.
output
This is the RAM power supply. It will backup RAM when the batteries are
removed, therefore any current taken from this line should be pAs.
output
This is the switched 5V output. There are two 5VS lines.
output
Signal ground line.
output
This is the external power supply line.
input/output
This is the address latch signal from the CPU. It latches the address bus
on its falling edge. During CPU HOLD this line may be driven.
input/output
These are the upper part of the address bus from the CPU. During CPU
HOLD these lines may be driven.
ADO-AD7 input/output
These are the multiplexed address/data bus from the CPU. During CPU
HOLD these lines may be driven.
OA0-0A7 output
These are the lower latched address lines.NRDI input/output
This is the 80C88 \RD signal. It goes low to indicate a CPU read cycle.
During CPU HOLD this line may be driven.
NWRI input/output
This is the 80C88 \WR signal. It goes low to indicate a CPU write cycle.
During CPU HOLD this line may be driven.
BATD output
This is the detect line for the batteries. It goes low if the batteries are
removed without a power supply being present. This can be used to
prevent accidental corruption of RAM
ABUF/BBUF input
These are insertion detection pins. A terminating peripheral should have
these lines connected to the adjacent 5VS line. (See section 2.7 on
peripheral design.)
NMIO output
This is the 80C88 non-maskable interrupt request line.
2.6.3 Comparison between IBM and Portfolio expansion bus
The IBM PC and Portfolio expansion buses are analogous; however, the
implementation of these buses are very different. See the comparison below:
1BMPC
a) UO is partially decoded.
b) AO-A19 are latched address
¢) DO-D7 are buttered data
4d) IRQ2-IRQ7 are inputs to
the interrupt controller.
e) IOR/IOWIMEMRIMEMW are
MAX mode bus control signals
1) DRQ1-DRQ3/DACKO-DACK3/AENITC
are DMA control signals
9) VO CH RDY inserts wait
states for slow /O.
h) ALE is address latch enable.
i) OSC is 14.31818 MHz Clock.
}) CLK is 4.77 MHz, 33% duty
cycle clock
k) IOCHCK
Portfolio
NO MUST be fully decoded.
OA0-OA7 are latched address A8-A19 are
address lines DIRECT from the processor.
‘ADO-AD7 are multiplexed address/data lines
DIRECT trom the processor.
EINTIEACK allow connection of peripheral
with an interrupt controller.
NRDI/NWRIJIOM are MIN mode bus control
signals.
No analogous signals, however, enough control
signals exist to allow DMA control on a peripheral.
No analogous signal.
ALE is address latch enable
No equivalent signal.
CCLK Is 4.9152 MHz, 50% duty clock which halts.
No signal.
215TYPICAL TERMINATING PERIPHERAL
BBUF
ABUF
SVS MAIN
sVS
PERIPHERAL,
PDET
MRST Loaic
eee
INT
<< SSsSsSssSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
EACK
—___________»
BCOM
>
DECODE
—_—),
OA0-0A3 Loic >
>
READ AT
vy 807F
PID REGISTER
t
‘ADO-AD7
v
Nec1 EXPANSION
——).
ROM
t EXPANSION BUS
(TOWARDS PORTFOLIO)
2162.7 PERIPHERAL DESIGN ISSUES
There are two types of peripheral that can be connected to the Portfolio. These
peripherals either continue the system bus ("Through Peripheral") or not
(“Terminating Peripheral"). Different considerations are required for designing these
types of peripherals. Appendix C illustrates an example peripheral design. (See
section 3.5 for software issues.)
2.7.1 Terminating Peripherals (see diagram)
A peripheral of this type signals its presence to the Portfolio by having PDET tied
high. If PDET is high then the Portfolio expects to see a Peripheral Identifier(PID).
This is read from I/O location 807Fh. The returned number must be in the range
40h-7Fh. Please note that identifiers under 40h and over 7Fh are reserved for use
by DIP and must NOT be used by non-DIP applications
A read at I/O location 807Fh should NOT be used by any peripheral in ANY way
other than as stated above.
A terminating peripheral can have an expansion ROM which contains support
software for the peripheral. This eliminates need for software to be supplied
separately. The chip select for this ROM should be connected to NCC1. At various
times during a boot sequence, the ROM will be checked for an identifier. If this is
present then the software contained on the ROM will be executed. (See section 3.5
for more details.)
The Portfolio has only limited expansion bus buffering. To make best use of this the
following rules should be obeyed
i) ABUF and BBUF should be tied to the adjacent 5VS lines. This will cause the
processor to hold while a connector is half in.
ii) Only OAO-OA3 should be used. BCOM should be used for higher addressing on
peripherals.
iii) Peripherals using the external interrupt facility should be reset by MRST into a
state where interrupts are disabled until the vectors are set up correctly. This is to
prevent spurious interrupts occurring before the interrupt vector is set up.TYPICAL THROUGH PERIPHERAL
BBUF
ABUF
svs
svs
PDET
— LINE >
‘OA0-0A3. DRIVER
— >
< >
LINES | ON EXPANSION BUS NOT EXPLICITLY MENTIONED
<< >
v
>
PERIPHERAL
>
ad ciRcUIT
_
SIGNAL TO LATCH ADO ON WRITE.
AT 807C. LATCHED VALUE CALLED 'D'
’
Nec1 D-0 Noct
—»} —Neciout)=Nect | ?F
(IN) ADO noe (out)
>| “sMe=Nect
NCC1(OUT)=5V
SMC SELECT LINE FOR
SET “DRIVE B:" MEMORY CARD
GND v
EXPANSION BUS EXPANSION BUS
(TOWARDS PORTFOLIO) (AWAY FROM PORTFOLIO)
2182.7.2 Through peripherals (see diagram)
On these peripherals the system bus is continued so that further peripherals can be
connected to the system. For example, a memory expansion unit would be this type
of peripheral. In order that terminating peripherals will operate correctly the following
recommendations should be taken into account when designing "through"
peripherals.
i) ABUF and BBUF should not be connected to 5VS, but brought straight through
the peripheral.
ii) If OAO-OA3 are used on the peripheral, they should be buffered before the
“through” connector.
iii) PDET should not be connected to 5VS, but brought straight through the
peripheral.
iv) The I/O locations 8070-807F should not be used so as to provide compatibility
with terminating peripherals using these locations (such as DIP serial and parallel
peripherals). 807Ch can be used as stated in vi) below.
v) “Through” peripherals risk crashing the system bus as virtually no buffering exists
Itis therefore recommended that these peripherals are only inserted or removed
from the Portfolio when powered down.
vi) To ensure that ROM extensions on terminating peripherals function correctly,
through peripherals which contain a memory card interface must supply logic that
follows the following rules:
* A write of zero to I/O 807Ch will cause NCC1 to be directed to the through
expansion port.
* A write of one to I/O 807Ch will cause NCC1 to be directed to the peripheral
memory card interface.2.7.3 Allocation of Peripheral ID (PID) bytes
The PIDs have currently been allocated as follows:
PID
00h
Oth
02h
03h
04h
05-3Fh
40-7Fh
80h
81-FFh
PERIPHERAL
Communication Card
Serial Port
Parallel Port
Printer Peripheral
Modem
Reserved
User Peripherals
File-Transfer Interface
Reserved
For custom user peripherals a specific PID can be allocated by contacting the Atari
Portfolio Product Manager in writing, describing the use of the peripheral
2-202.8 LCD Display
The Portfolio uses a 240x64 pixel LCD display which uses the "Super-twist"
technology. This corresponds to 8 lines of 40 characters text display.
The circuit includes a graphics LCD screen controller with dedicated screen RAM
chip and character set ROM, used in such a way as to be compatible as possible
with an IBM Monochrome Display Adapter (MDA). (See section 3.7 for more
details.)
The LCD circuit has the following characteristics:
* Full IBM PC Extended character set (see Appendix B)
* Virtual 80x25 MDA screen page with various screen modes
* PC-BIOS compatible pixel Set/Reset for graphics
* Each character is implemented as an array of 6x8 pixels
* Software controlled contrast
* Block or underline cursor
Note: Screen text attributes and various cursor modes are not supported by the
Portfolio.
2-213 SOFTWARE
3.1. General Description
3.1.1 Overview
The Atari Portfolio software is contained on ROM and predominantly executes from
ROM, and hence minimizes the use of RAM. This software provides as much PC
compatibility as possible given the hardware constraints. (See sections 3.2 and 3.4
for BIOS and DOS comparisons.)
This software also includes some more advanced features which enable the
Portfolio to be used more effectively in a portable environment than a standard PC.
Most of these software features are accessed using Interrupt 61H, the Atari Portfolio
specific functions. (See section 3.3.1.)
To aid development of application software for the Atari Portfolio which require the
use of these specific functions there is a TSR (Terminate and Stay Resident)
Emulator program for the IBM PC. This program emulates most of the functions.
(See section 3.10 for more information.)
3.1.2 Portfolio Programming
The Portfolio obeys IBM's own programming guidelines for PC compatibility,
however these are a lot more flexible than the industry-standard definition of a
‘clone’ PC.
Most ‘well-behaved’ PC programs run with no problem on the Portfolio, provided
that they do not go below the BIOS to directly use the hardware. The main
development issues are the screen size and memory capacity. Below are the
various points to take into consideration when developing a program for the
Portfolio.
SCREEN - (See also section 3.7.)
The Portfolio has a 40 column by 8 line text display which uses video RAM at the
same address as the PC Monochrome Display Adaptor (MDA) and uses the same
character set. However the Portfolio LCD controller does not support text attributes
such as bold, underline and reverse or the various cursor sizes. If you want to use
the Portfolio graphics facility then use the standard BIOS pixel read and write
interrupt,
31MEMORY - (See also section 2.2.)
The Portfolio has an internal memory disk C: which can be configured in 8KB
intervals, minimum 8KB. This leaves a maximum of 116 KByte usable RAM of which
10 KBytes are used by the operating system and BIOS. Therefore it is recommended
that programs should not use more than 100KBytes of system RAM. If you want to
use the built-in ‘pop-up’ applications with the external program then allow for some
free RAM (minimum of 17 KBytes).
MEMORY CARDS - (See also section 3.6.)
These memory cards appear to a DOS program like a standard floppy disk. The
Portfolio has DOS resident all of the time and therefore does not need to boot from
a disk. If you want to automatically boot into a program then you can put
AUTOEXEC.BAT on a memory card, overriding C\AUTOEXEC.
RS232/SERIAL - (See also section 4.1.)
The only compatible method for accessing the serial port is through the BIOS.
However most off-the-shelf serial programs go directly to the hardware
KEYBOARD- (See also section 3.2.1.)
The Atari Portfolio supplies full IBM PC scan-code compatibility provided access is
through the BIOS. In other words it is possible to generate every keypress or
combination that a standard PC can generate (SHIFT, CTRL, ALT, NUM PAD). It is
also possible to generate other non-PC key combinations necessary for functions
such as contrast and switching off.
POWER - (See also section 3.8.)
For power conservation, it is recommended that programs are designed which do
not poll the keyboard continuously.
ADVANCED
There are also more advanced features which enable custom programs for the
Portfolio to perform more sophisticated tasks, such as running programs directly
from the memory cards (section 3.6), peripherals with built-in software on ROM
(section 3.5), language information and access to the built-in tone dialler.
3-23.1.3. Troubleshooting
Running well-behaved standard off-the-shelf PC Programs:
* Make sure that the DISPLAY SETUP (see user manual) is set to Static PC for
External programs.
* If the program writes directly to Video RAM then ensure that DISPLAY REFRESH
is set to KEYBOARD or FAST TIMED, whichever is more appropriate.
* Endeavor to allocate enough system RAM.
Although many popular programs are ‘well-behaved’ there are also many programs
which directly address the hardware. This can cause a problem on the Portfolio as
the IO addresses are different. The most common of these incompatibilies occur
with the keyboard and hardware interrupts. The Portfolio does not have a
Programmable Interrupt Controller (PIC) or a dedicated keyboard controller,
therefore some programs which access these such as Basic and XTALK will not
function correctly. The Portfolio also uses a different Timer Tick than a PC which
affects some ‘dirty’ programs such as Sidekick. Another hardware area that differs
on the Portfolio is the use of the speaker, which should be accessed using the
BIOS
3-33.2 Differences Between Portfolio BIOS and IBM PC BIOS
For the purposes of this document, Portfolio BIOS is defined as the program which
communicates between the DOS and the hardware. (See recommended books in
section 1 for more information on the standard PC BIOS.)
There are a few differences between Portfolio BIOS and the standard IBM PC
BIOS. These are generally in areas where the hardware differs to such an extent
that complete compatibility is unobtainable. For example, in the Video Services (Int
10H) the Portfolio only has two screen modes; 80 by 25 Text and 240 by 64
Graphics.
3.2.1. Interrupt differences
The following list highlights the main differences between the DIP BIOS and IBM PC
BIOS:
IntO9H Keyboard
The Portfolio keyboard is not at the same IO address as a standard IBM
PC, therefore any program which requires the keyboard to be at port 60H
will not work correctly.
Int 10H Video Services
Service 00H, Mode 07 to OAH are supported, but only in Text or Graphics
mode. Service 01H, Cursor size is set to either block or ulline. (See
section 3.7.)
Int 13H Disk
The Portfolio has modified Memory Card/Disk services 0 to 05H and 83H.
(See section 3.3.2 for more details.)
Int 15H Extended
No Extended services are available.
Int 16H Keyboard
Only service 0, 1, 2, 4 are supported.
Int 18H BASIC
Not supported.
Int 1AH Clock
Only services 0-07H supported
Int 1CH Timer tick
Invoked less frequently than IBM PC (see section 3.3.1).
3-43.2.2 Portfolio BOOT procedure
Ona COLD boot (batteries removed, COLD Reset switch pressed, then batteries
replaced), the BIOS executes a limited Power On Self Test (POST) to verify system
integrity. This will destroy data in system memory (both programs in the Transient
Program Area and those on internal drive C:). The Portfolio system then performs
BIOS and DOS initialization before jumping to the COMMAND processor. This will
always reset the machine unless there is a hardware fault.
On a Hardware WARM boot (WARM Reset switch pressed or batteries replaced
without pressing the COLD Restart switch), the Portfolio performs BIOS and DOS
initialization before jumping to the COMMAND processor
On a Software WARM boot (Ctrl-Alt-Del on keyboard), the sequence of operations
is similar to those for a Hardware warm boot. The difference between the two is that
a Hardware warm boot also resets the ASIC and Processor which may be
necessary if the interrupts have been disabled because the keyboard will not
recognize user key presses.
353.3. System Specific BIOS
3.3.1. Int 61H - DIP extended BIOS services
Function
OH
7H
8H
9H
BH
DH
EH
FH
10H
11H
12H
15H
16H
17H
18H
19H
1AH
1BH
1CH
1EH
1FH
20H
24H
26H
28H
2CH
2DH
2EH
30H
Description
Service Initialization
Format Credit Card Memory (CCM)
Get size of Internal disk
Format Internal disk
Determine if CCM present
Get Screen size
Get/Set Screen mode
Get/Set Cursor mode
Get/Set virtual screen position
Move virtual screen position
Screen refresh
Sound generation
Melody tone
Dial number
Mute states
Get Serial port parameters
Get Peripheral ID byte
Set Peripheral ID byte
Preset Peripheral IO data
Get/Set Clock tick speed
Get-key/Tick Screen refresh
Disable revectoring of Int 9H
Get/Set ROM space state
Get/Set Power State
Get/Set Language
Get BIOS version number
Turn system off
Enable/Disable status line
File transfer via smart cable
Note: There are other reserved Int 61H services which are used internally by the
Operating system. It is not recommended that these services are invoked by
applications software, as they may be modified or deleted in future versions of the
software
36Fn 00H Service Initialization 3.10
Parameters:
AH 00H
Returns:
None
Note: This service should be called once only as part of its initialization by any
application program that intends to use any Int 61H function calls.
Fn 07H Format Credit Card Memory 2.3, 3.6, 3.32
Parameters:
AH 07H
AL Drive number (0 or 1)
Returns:
CF Set if error during format
AH Error code (See INT 13H)
Note: Drive number 0 selects drive A:, and drive number 1 selects drive B:. This
service should not be used to format the internal disk (drive number 2)
Fn 08H Get size of Internal disk 3.3.2
Parameters:
AH 08H
Returns:
AX Segment Address of disk
BX Size of disk in Kbytes
Fn 09H Format Internal disk 3.3.2
Parameters:
AH 09H
BX _ Size of disk in Kbytes
Returns:
It CF=1
BX Maximum size possible (K)
Note: The system is rebooted if successful. All files on drive C: will be lost.
37Fn OBH Determine if CCM present and valid 2.3, 3.3.2, 3.6
Parameters:
AH OBH
AL Drive number (0 or 1)
Returns:
CF=0 Card present and correct
If CF=1
AH Error code (See Int 13H)
Note: This can be used to determine if a valid CCM is in the specified drive. Drive
number 0 selects drive A:, and drive number 1 selects physical drive B:
Fn ODH Get screen size
Parameters:
AH ODH
Returns:
AX Physical screen size
DX —_Logical screen size
Note:
AH/DH Row number
AL/DL Column number
Fn OEH Get/Set screen mode
Parameters:
AH OEH
AL=0 Get mode
AL=1 Set mode
DL New mode
Returns:
If AL=0,
OL Mode
If AL=1
DL Old mode
3-8
2.8,3.7,2.1.4
2.1.4, 2.8, 3.7Note: The mode is changed by setting one of the following mode bits in DL:
Clear bits (00H)80 by 25 mode
bit 0 (01H) 40 by 8 mode
bit 1 (02H) Tracked mode
bit 7 (80H) Graphics
These bits are mutually exclusive. When changing to 40 by 8 mode, if the
cursor position or virtual screen origin is off the screen, then the virtual
screen origin will be set to (0.0), the Screen cleared and cursor homed.
Fn OFH Get/Set Cursor mode 2.1.4, 2.8. 3.7
Parameters:
AH OFH
AL=0 Get mode
AL=1 Set mode
BL New Cursor mode
AL=2 Force mode
Returns: If AL= 0
BL Cursor mode
IfAL> 0
BL Old Cursor mode
Note: Cursor mode is as follows:
Cursor off
1 Underline
2 Block
Force mode automatically sets the BIOS cursor size to reflect the Keyboard
Numlock state.Fn 10H Get/Set virtual screen position 2.1.4, 2.8, 3.7
Parameters
AH 10H
AL 0 Get position
AL 1 Set position
I AL=1
DH — Rownumber
DL Column number
Returns:
IfAL=0
DH — Rownumber
DL Column number
Note: The virtual screen position is the top left origin of the 40 by 8 window on the
logical screen
Fn 11H Move virtual screen position 2.1.4, 3.7
Parameters:
AH 11H
AL Number of lines to move cursor
DL Direction to move cursor
1 Up
2 Down
3 Left
4 Right
Returns:
None
Note: This moves the origin of the virtual screen within scroll margins. It only works
if in Static or tracked mode, and has a similar effect to pressing the Alt-
Cursor keys
Fn 12H Screen refresh 2.1.4, 2.8, 3.7
Parameters:
AH 12H
Returns: None
Note: This service copies the contents of the Video RAM to the LCD controller.
and is slightly faster than invoking Int 10H service 0.
310Fn 15H Sound generation
Parameters:
AH
AL
Returns:
None
15H
Sub service:
0 Key-click
1 Beep
2 Alarm
Fn 16H Melody tone generator
Parameters:
AH
cx
DL
30H
31H
32H
33H
34H
35H
36H
37H
38H
39H
3AH
29H
3BH
3CH
3DH
OEH
3EH
2CH
3FH
04H
OSH
25H
2FH
06H
07H
Returns:
None
16H
Length of tone in 10 mSecs intervals
Tone code (See below)
D*5 = 622.3 Hz
ES 659.3 Hz
Fa 698.5 Hz
Fe5 740.0 Hz
GS 784.0 Hz
G*5 830.6 Hz
AS 880.0 Hz
A*5 932.3 Hz
BS 987.8 Hz
cé 1046.5 Hz
Cc*6 1108.7 Hz
D6 1174.7 Hz
D*6 1244.5 Hz
E6 1318.5 Hz
F6 1396.9 Hz
Fe6 1480.0 Hz
G6 1568.0 Hz
G*6 = 1661.2 Hz
AG 1760.0 Hz
A*6 1864.7 Hz
BB 1975.5 Hz
C7 2093.0 Hz
c#7 2217.5 Hz
D7 2349.3 Hz
D*7 2489.0 Hz
2.1.5Fn 17H Dial number 2.1.5
Parameters:
AH 17H
DS:SI String of characters
CX Length of string
Returns:
None
Note: String to be in ASCII. Valid characters are:0123456789ABCD**,
Letters must be in upper case.
Fn 18H Mute states 2.1.5
Parameters:
18H
AL 00 Get mute state
01 Set mute state
02 Get key click state
03 Set key click state
04 Get bleep state
05 Set bleep state
06 —Get alarm state
07 Set alarm state
08 Get DTMF duration
09 Set DTMF duration
WAL= 1,3,5,70r9
DL 0 Off (Muted)
1 On
Returns:
IfAL= 0,2,4,60r8
DL 0 Off (Muted)
1 On
Fn 19H Get Serial port parameters 2.7,4.1,3.5
Parameters:
AH 19H
DX Serial port number
Returns:
It AH=0, Composite parameters in AL
If AH<>0, Error
Note: This service returns composite parameters identical to those used by Int 14H
Service 0 (Initialize).Fn 1AH Get Peripheral ID byte 2.7,3.5
Parameters:
None
Returns:
AH Peripheral ID byte
AL Oif no peripheral installed
Note: This returns the peripheral ID code for the current terminating peripheral.
(See Fn 1BH.)
Fn 1BH Set Peripheral ID byte 2.7,3.5
Parameters:
AH 1BH
AL=0 Set Serial ID
AL=1 Set Parallel ID
DL Current peripheral ID
Returns:
None
Note: There may be peripherals designed that contain circuitry that is similar to the
Serial or Parallel peripherals. In order that these peripherals may use existing
BIOS services they must identify themselves as being software compatible.
DL should be set to the Peripheral ID code. (See Fn 1AH.)
Fn 1CH Preset/Return Peripheral data 2.7, 3.5, 4.1
Parameters:
1CH
Preset Data values
Return Data values
Table entry number
Data value
10 address
Data value
10 addressNote: This service is used to preset peripheral IO data in a table associating an lO
address with a data value. Service 0 will actually output the data to the
specified |O locations. On Power-up, the table entries will be scanned for
non-zero IO address values, and the associated data will be written out. This
would typically be used to restore Interrupt numbers following Power-up. The
first four table entries out of 10 max are reserved.
Fn 1EH Get/Set Clock tick speed 2.4, 3.8
Parameters:
AH 1EH
AL Subservice
0 Get speed
1 Set speed
WAL =
BX Clock tick speed
0 Tick every 128 seconds
1 Tick every second
Returns:
AL=0
BX Clock tick speed
0 Tick every 128 seconds
1 Tick every second
Note: 1 sec speed uses much more power.
314Fn 1FH Get-key/NMI invoked screen refresh 2.8, 3.7, 3.8
Parameters:
1FH
AL=0 Get refresh state
AL=1 Set refresh state
IAL=1
DX New state
Returns:
If AL=0
Dx Current state
WAL=1
DX Old state
Note:
DH _ Refresh on NMis state
DL _ Refresh on keys state
DHIDL=0 Revectoring disabled
DHIDL=1 Revectoring enabled
It bit 7 of the state is set, then the state is unchanged.
Fn 20H Disable revectoring of Int 9H 3.2
Parameters:
AH 20H
AL=0 Get revectoring of Int SH state
AL=1 Set revectoring of Int SH state
WAL=1
DL=0 Disable revectoring
DL=1 — Enable revectoring
Returns:
If AL=0
DL=0 = Revectoring disabled
DL=1 — Revectoring enabled
Note: This is used to automatically revector Int 9H to the BIOS. This prevents
applications software from setting up its own Int 9H. Note that the Portfolio
keyboard IO address is not IBM compatible. This service is automatically
invoked on a boot.
3-15Fn 24H Get/Set ROMICCM space state 2.2.4
Parameters:
24H
Get ROM state
Set ROM state
If AL=1
DL New ROM state
DH New CCM state
Returns:
If AL=0
OL Current ROM state
DH Current CCM state
If AL=1
DL Old ROM state
DH Old CCM state
Note: ROM state in DL is as follows:
DL=0 Normal applications ROM
DL=1 CCM Drive A:
DL=2 CCM Drive B
DL=3 Expansion ROM
CCM state in DH is as follows:
DH=0 CCM Drives Disable(d)
DH=1 CCM Drive A: Permanently enable(d)
DH=2 CCM Drive B: Permanently enable(d)
CF=0 No error
CF=1 Invalid option or error
Note: This service should be used with care, as it can swap either Memory cards
or an extension ROM into the C000:0 to ODFFF:F address range. This range
is normally used by the internal applications ROM. Its primary use is to allow
advanced users direct access to extension ROMs and Memory cards.
3-16Fn 26H Get/Set Power control 2.1.10, 2.5, 3.8
Parameters:
AH 26H
Al Get Power control state
AL=1 Set Power control state
IfAL=1
DL New state
Returns
If AL=0
DL Current state
Wf AL=1
DL Old state
Note:
Normal Power-down on low battery
D Prevent Power-down but display warning
DL=2 Prevent Power-down with no warning
This is used to prevent the Portfolio from powering down on a low battery.
Itis not recommended for use except for conditions in which a power down
might be critical to an application or peripheralFn 28H Gel/Set Text/Keyboard language
Parameters:
28H
Get Languages
Set Languages
Language table pointers
DX New languages
Returns:
If AL=0
DX Current languages
If AL=1
DX Old languages
if AL=3
ES:CX Keyboard table pointer
ES:DX Language table pointer
Note:
DH Text language
DL _ Keyboard language
Both DH and DL will be 1, 2 or 3, corresponding to the language in the
ROM.
If bit 7 of the language/keyboard code is set, then it remains unchanged.
The tables consist of a count byte, followed by the language identification
codes for the resident languages. These are as follows:
ENGLISH
FRENCH
GERMAN
SPANISH
ITALIAN
SWEDISH
DANISH
Nonsons
3-18Fn 2CH Get BIOS version number
Parameters:
2CH
Returns:
DS:BX Address of BIOS version number
Note: The version number consists of a Major and Minor version number, followed
by a'$ terminator. A typical example is: '1.050$"
Fn 2DH Turn system off 2.1.10, 2.5, 3.8
Parameters:
AH 2DH
Returns:
None
Note: This is similar to typing OFF at the command line.
Fn 2EH Enable/Disable system status line
Parameters:
AH 2EH
AL=0H Disable status line
AL=1H_ Enable status line
DH = Row number
DL Column number
Returns:
None
Note: This is similar to invoking the status line using the LOCK key.
3-19Fn 30H File Transfer services 42
Parameters:
30H
AL 0 Transmit block
1 Receive block
2 Open ports
3 Close ports
4 Wait 500mS
DS:DX_ Start of Data buffer
IfAL=0
CX Bytes to Send
If AL=1
CX Maximum buffer size
Returns:
IAL=1
CX _ Bytes Received
DL Error Code
No error
Buffer size too small
Timeout on transmission
Checksum failure
Invalid sub-service
Peripheral not installed
aRwONao
Note: This is used by the File Transfer utility built into System Setup
3.3.2 Disk services
The Portfolio Credit Card Memory (CCM)/Disk services are provided at the BIOS
level by Int 13H.
There are six standard diskette sub-services, plus one special service. These are as
below:
OH Reset CCMIDisk system
1H Get CCMIDisk status
2H Read CCMIDisk sectors
3H Write CCM/Disk sectors
4H Verity CCM/Disk sectors
SH Format CCMIDisk track
83H Write CCM/Disk boot sector
3-20Services 0 to 4 are similar to standard IBM PC BIOS disk services. They can access
the three internally supported disk drives A, B and C (referred to as drives 0, 1 and
2 respectively).
Int 13H uses the BIOS Parameter Block (BPB) on the Boot sector (first sector) of
the drive to determine the drive characteristics. During formatting, it is necessary to
use a Format BPB, which is supported by service 83H. This service is used instead
of service 5H to format the first track of a CCM/Disk.
The parameters to service 5 are unlike those on a normal PC as detailed below:
Int 13H Fn SH
Parameters:
SH
DL Drive number
DH _ Side/Head
CH Track number
Returns:
CF=1_ Error code in AH
Note: Writes defined byte onto one track of CCM. Byte is
specified in the Disk base table
The Disk base table is similar to that used by an IBM PC. The table for both CCMs
is pointed to by interrupt 1EH, and the table for the internal disk is pointed to by
interrupt 41H. The format of both disk base tables is as below:
Offset 03H Bytes per sector code (0=80H, 1=100H, 2=200H)
Offset OAH Format data bytes (Normally F6H)
During formatting using Interrupt 61H (see section 3.3.1), the CCM/Disk sector size
is dynamically set according to the disk size. See below:
Disk size Sector size
0 to <=32 Kbytes 80H/128 bytes per sector
>32 to <=64 Kbytes 100H/256 bytes per sector
>64 Kbytes 200H/512 bytes per sector
This ensures that a small disk size allows a reasonable number of sectors. Since
Portfolio DOS allocates one sector per data cluster, this allows the same number of
small data files on a 32K CCM as a 128K CCM.There are various Int 61H services that provide extended disk services (see section
3.3.1):
Int 61H Fn 7H Format a CCM
Int 61H Fn 8H Get the size of the Internal Disk
Int 61H Fn 9H Format the Internal disk
Int 61H Fn OBH Determine if a valid CCM is present.
Note: A CCM may also contain a BIOS extension which does not affect the
operation of the CCM, but can modify the Operating system or Power-down/Power-
up sequence. (See section 3.5.)
3-223.4 Differences Between Portfolio DOS and MS-DOS
For the purposes of this manual, Portfolio DOS is defined as the program which
communicates between the Command processor or User application, and the BIOS.
It does NOT include the Command processor. (See recommended books in section
1 for more information on the standard MS/PC-DOS.)
There are a few differences between Portfolio DOS and MS-DOS. These are mainly
enhancements to Portfolio DOS 2.11 to make it more DOS 3.XX compatible:
Int 21H Fn 37H Get/Set Country
Portfolio DOS is DOS 3.XX compatible
Int 21H Fn 4BH Execute program
As well as providing standard EXEC services it also allows a program to be
RUN directly off a CCM (section 3.6.3).
Int 28H Keyboard busy
Not supported. This would normally be called during console IO polling,
however Portfolio DOS does not poll the console, but actually waits for a
key using Int 16H Fn OH. (See section 3.8 on power management.)
Int 24H Internal MS-DOS function not fully supported
3-233.5 Device Drivers and Peripheral Software
3.5.1 Device Drivers
Device drivers are used by DOS to communicate with the BIOS. They provide a
standard interface which isolates the DOS from the device specific BIOS. The
Portfolio has the following resident device drivers in ROM:
CON, CLOCK$, PRN, LPT1, AUX, COM1 and Disk driver
CON performs all Console |O
PRNILPT1 perform all Parallel (Printer) 1O
AUX/COM1 perform all Serial |O
CLOCKS special driver to access the BIOS Clock
These are all character devices that process strings of characters one character at a
time. They are all identified by their names.
The Disk device driver is a Block device which requires all |O to be done in blocks. It
addresses all the normal Portfolio disk drives (A, B and C). It has no name.
It is possible to replace these resident device drivers (and add new ones) by the use
of installable device drivers. These may be loaded by DOS using the 'DEVICE="
command in CONFIG.SYS. If a character device is loaded that has the same name
as one of the above device drivers, then it replaces it. This mechanism is used by
programs such as ANSI.SYS which is actually a CONsole device driver with added
features.
If a Block device driver is added, it supplements the existing Disk device driver. An
example of this is the Virtual disk driver VDISK.SYS, which would add drive D:.
The structure of an installable device driver is compatible with any MS-DOS 2.11
device driver.3.5.2 Peripheral Design
There is a special design issue associated with Portfolio peripherals, due to the
Portfolio auto power-down power conservation feature. This means that most
peripheral devices will need to be re-initialized on power-up. (See Appendix C for
more information.)
There are two methods provided to fulfill this requirement
1) Int 61H Fn 1CH
This service stores a list of O addresses and associated data values, which will be
output on a power-up. If all initialization specific IO writes are made via this service,
then they will automatically be repeated on all power-up sequences.
A typical use for this service might be to restore an interrupt number in an interrupt
driven serial peripheral
2) Use a ROM extension. This would generally be required when the sequence of
operations during power-up could not be supported by the Int 61H service. This will
require the peripheral to contain an extension ROM. (See 3.5.3.)
There are two exceptions to the above. The serial port parameters are read during
the power-down sequence and correctly re-programmed on the subsequent power-
up. The Parallel port is also initialized on Power up.
Each peripheral is identified to the Portfolio by its Peripheral ID code (PID) (see
section 2.7). This is actually a hardware IO location on the peripheral which may be
read using Int 61H Fn 1AH.
The other software issue associated with custom peripheral design concerns the
Serial or Parallel peripherals. If the custom peripheral wants to use existing BIOS
services then they must identify themselves as being hardware compatible:
Int 61H Fn 1BH configures the BIOS to recognize a peripheral to be Serial or
Parallel compatible
3-253.5.3. ROM Extensions
ROM extensions are sections of code that can be executed at various stages during
the BOOT sequence, and during Power Up and Power Down. They may be ona
Credit Card Memory (CCM) or on a extension ROM on a peripheral. A typical use of
such an extension is to modify the operating system or initialize custom peripherals.
There are three main types of extensions: A Specific BIOS extension, a Specific
DOS extension, and Common extensions:
* The Specific BIOS extension is invoked after BIOS initialization.
* The Specific DOS extension is invoked after DOS initialization.
* The Common extension is invoked before and after both BIOS and DOS.
initialization, before Command processor initialization and during Power-Down and
Power-Up.
The ROM extensions are searched for on Drive A, then the extension ROM and
then Drive B. If a valid extension is found and executed, then the search for that
Particular type of extension is terminated.
The format of a ROM/CCM extension is as follows:
Offset Size
OOH = dw 2 ‘Identification code
02H = db 2 :Number of 512 byte
:blocks(unused)
03H db 5 dup (2) ‘Specific BIOS/DOS exten
40H db 'DIPROM!" = _:OEMuser text
50H db 5 dup (?) :Pre-bios jmp vector
55H db 5 dup (?) :Bios-ext jmp vector
5AH db 5 dup (2) :Pre-dos mp vector
51H db 5 dup (?) :Dos-ext jmp vector
64H db 5 dup (2) :Post-dos jmp vector
68H db 5 dup (?) :Power-Down jmp vector
6eH = db 5 dup () :Power-Up jmp vector
The extension vectors occupy the first 128 bytes of the CCM/ROM. The vectors are
positioned so as to allow a valid BIOS Parameter Block (BPB) on a CCM so that it
can be used both as an extension CCM and as normal. The Identification code at
Offset 0 determines the main extension type as below:
AASSH ‘Specific BIOS extension
55AAH ‘Specific DOS extension
5555H ;Common extensions
3-26Thus, if the word at Offset 0 is AASSH, then after BIOS initialization a FAR CALL will
be made to Offset 3. The 5 bytes following this offset allow for a shortnormal/far
ihe extension code. If the word was 55AAH, the call would be made after
alization. If the word is 5555H, then all the common extensions would be
called at the appropriate times.
Note: All the jump vectors must be set up to a suitable return when using a
common extension, even if they are not used.
All ROM extensions must preserve the processor registers. Extreme care must be
taken when using extensions, especially those which are invoked half way through
the boot sequence, as these may adversely affect the operation of the Portfolio. The
Pre-BIOS extension is called almost immediately ‘on jumping from the Reset vector.
and so has no stack set up. It must return via a FAR JUMP to OFFFE:OH. All the
other extensions must return via a FAR RET. It is recommended that the Post-DOS
extension is used in preference to those preceding it.
The OEM user text field at Offset 40H is to allow an OEM to identify the ROM.
See Appendix C for examples of using an Extension ROM.3.6 Memory Cards
3.6.1 Format
Each credit card memory (CCM) must be formatted before use, this program
creates a format analogous with a standard floppy disk format.
All formatted memory cards contain only 1 sector per cluster as opposed to the 2 or
more found in larger systems. (See section 3.3.2 for more details.)
The Atari Portfolio BIOS has been written to handle future paged Credit Card
Memories (CCM). The BIOS assumes that the page register, is one byte located at
offset 10 (OAH) within the Boot sector (First sector) of the Memory card. For this
reason DO NOT use this memory location in programs.
3.6.2 Autoboot Mechanism
The Portfolio has the ability to invoke AUTOEXEC.BAT from drives other than drive
Cc:
Ifa memory card is in drive A: or B: and AUTOEXEC.BAT file exists, it is executed
in preference to autoexec on C:. B: will have priority over A: if am AUTOEXEC.BAT
exists on both A: and B:.
If itis required that the AUTOEXEC.BAT on drive C: is always executed, terminate
the batch file on drive A: with the command:
C:AUTOEXEC
The CONFIG.SYS file is always loaded from drive C: and cannot be overridden.
3.6.3 Run
ARUN file is a specially written program that can be directly executed from a Credit
Card Memory (CCM) without having to be loaded into the Transient Program Area
(TPA). An obvious advantage of this method of execution is that it minimizes system
memory usage.
A RUN file can be executed from the Command processor by typing RUN
, or by invoking Int 21H Fn 4BH at the DOS level as for a normal
program, but with AL set to 80H.
3-28There are several requirements for the programs which can use the RUN command:
* The program needs to be specially written to be used with the RUN command.
* The program needs to be on drive A: or drive B: and it needs to occupy
consecutive clusters on the disk. This situation cannot be guaranteed if a file is
simply copied to the drive.
* The file needs to have a .RUN extension.
Writing .RUN Programs
Almost all standard programs assume either that their data is in system RAM, or that
they can store data in their code segment. Although a .RUN file is similar to a .COM
file, care should be taken when dealing with data.
The initialization code of the .RUN program has to perform the following (these
points are illustrated in Appendix A):
* Reduce the system memory usage down to the minimum requirement. There must
be at least 10h paragraphs, i.e. the size of the PSP.
* Allocate data and stack using DOS interrupt 21h fn 48h and set ss:sp to point to
this block.
* Copy all initialized variable data from the memory card to the allocated data block
in system RAM.
* The program can then perform most functions it wishes to, including any DOS
calls. The program MUST terminate with DOS interrupt 21h function 4Ch
“terminate process”.
* The program does not need to copy the non-variable (constant) data from the
ROM card into RAM before using it. This data can be used directly from the card.
This means prompts or text messages need not take up any RAM.
The built-in applications can be invoked while a program is being RUN using the hot
keys as usual
If during execution of a RUN file the Credit Card Memory (CCM) is removed from
the drive, the next instruction to be executed on the card will be interrupted by an
error handler. This displays the error message: 'ERROR: Card Access’ and
terminates the process. A RUN file may not EXEC another file from within itself.
Appendix A provides an example of a RUN program which illustrates how to
program a typical RUN program3.7 Screen Handling
The Portfolio BIOS supports two main Video modes, Text and Graphics. The BIOS
Video Interrupt 10H may be used to set the screen mode:
Mode Type PC Resolution Portfolio
Mode 7 Text (80,25) <80,25>
Mode 8 Graphics (160,200) <160,64>
Mode 9 Graphics (320,200) <240,64>
Mode A Graphics (640,200) <240,64>
As can been seen, the Portfolio interpretations of these modes is fairly simple.
The Text modes are actually viewed using a 40x8 window. There are 3 sub-modes:
Static PC, 40x8 and Tracked.
Static PC mode is where the physical screen area acts as a window onto the larger
80x25 text screen. The window may be moved using the Alt-Cursor keys, or Int 61H
Fn 11H.
40x8 mode actually sets the logical screen size to 40 columns by 8 rows. This mode
is intended for use by software written specifically for the Portfolio, such as the the
Command processor and the Internal applications.
Tracked mode is similar to static mode, except that the Screen window positions
itself at the cursor.
This mode can be set using Int 61H Fn OEH.
The Video RAM (VRAM) for the text screen is at segment OBOOOH therefore it is
possible to write directly to the Video RAM, but any screen refreshing must be
invoked by the application. There is only one text page.
There are other Int 61H Video services:
Int 61H Fn ODH get the logical and physical screen sizes
Int 61H Fn OFH Set cursor size
Int 61H Fn 10H Set the virtual screen window origin
on the 80 by 25 screen
Int 61H Fn 12H Force a screen refresh.
In Graphics mode, the Graphics screen has a 240 by 64 pixel resolution and can be
written to or read from using BIOS pixel read/write Int 10H Fn OCH or Fn ODH
respectively. The Atari Portfolio has three cursor modes: Block, Underline and Off. If
the cursor size is set in the BIOS then either Block or underline mode will be set up.
3-30