This web page was last updated March 20, 2015 by SJC
Mega
Speedy Usage and Programming Information
(c)
2014-2015 Matthias Reichl
When
powering up the 1050 or when pressing the reset button the
Mega
Speedy enters configuration mode. On powerup or if the switch positions have
been changed configuration starts with the user-configurable default mode.
When pressing reset configuration starts with the previously selected mode.
Pressing reset a second time loads the user-configurable default mode. The
currently selected mode is shown on the display and the rotary encoder lights
up to indicate that the mode can be changed by turning the knob. After
approximately 3 seconds of idle time the selected mode is automatically
activated.
If
you press the rotary encoder down the selected mode is activated immediately
and will become the new default mode. You can choose between 10 drive modes,
each having 4 separate ROM slots, and the flasher mode where you can boot the
flasher directly from the Mega Speedy (just boot the Atari with the drive door
open). The flasher mode is indicated by showing "FL" on the display,
for the other modes the first digit indicates the drive mode and the second
digit the ROM slot (1-4):
"E"
Mega Speedy
"S"
Super Speedy
"y"
Speedy
"o"
original 1050
"t"
1050 Turbo
"H"
Happy
"U"
US Doubler
"A"
Super Archiver
"d"
1050 Duplicator
"u"
SuperMax
The
Mega Speedy ships with the following ROMs installed (all other ROM slots are
empty, you have to flash them yourself before you can use them):
Flasher
Speedy
ROM V1.6 + Flasher Mega Speedy
slot
1: Speedy ROM V1.6 + flasher
slot
2: Speedy ROM V1.6 + flasher
slot
3: Speedy ROM V1.6 + flasher
slot
4: Speedy ROM V1.6 + flasher
Super
Speedy
slot
1: Speedy ROM V1.5 + Super Copy
slot
2: Speedy ROM V1.5 + Super Copy
slot
3: Speedy ROM V1.5 + Super Copy
slot
4: Speedy ROM V1.5 + Super Copy
Speedy
slot
1: Speedy ROM V1.4 + Bibo DOS
slot
2: Speedy ROM V1.4 + HSS Copy
slot
3: Speedy ROM V1.4 + Floppy 2000 Utilities
slot
4: Speedy ROM V1.4 + Bibo DOS
Original
1050
slot
1: 1050 ROM rev. L
slot
2: 1050 ROM rev. K
slot
3: 1050 ROM rev. J
slot
4: 1050 ROM rev. L
1050
Turbo
slot
1: 1050 Turbo ROM V3.5
slot
2: 1050 Turbo ROM V3.4
slot
3: 1050 Turbo ROM V3.5
slot
4: 1050 Turbo ROM V3.5
1050
Duplicator
slot
1: 1050 Duplicator ROM V3.00
slot
2: 1050 Duplicator ROM V3.10 (track buffer off)
slot
3: 1050 Duplicator ROM V3.00
slot
4: 1050 Duplicator ROM V3.00
Note: The flasher mode is just another Mega Speedy ROM slot
that you are usually not supposed to touch so that you'll always be able to
use your drive, even if you screwed up with all the other drive slots. In the
stock ROM the flasher is also bootable from the 4 Mega Speedy ROM slots. By
using the optional switches you can select between 2-4 default configurations.
As long as the encoder lights up you can toggle the switches to select one of
the default configurations. Pressing the encoder down will update only the
currently selected configuration; the other configurations are not changed.
If
you have the Mega Speedy configured to "Flasher" mode and boot with
the drive door open the Mega Speedy menu is shown. From there you can
configure the drive mode and also start the flasher or MyPicoDos. Select the
desired mode and slot, then press RETURN to activate it. Approximately 5
seconds later the Atari will automatically reboot. If you activate a config
with SHIFT+RETURN the current configuration is saved to the EEPROM and will
show up as the default config the next time you start the config menu.
Just
use the "Switch drive mode" option in the flasher and select the
drive mode and ROM slot. Note: this option doesn't change the stored default
configuration.
The
flasher allows you to program drive ROMs to the flash, backup flash contents
to file, test drive ROMs by uploading them to the Mega Speedy RAM and to
switch the drive mode. If you set the Mega Speedy to "Flasher" mode
and boot with the drive door open you can start the flasher directly from the
Mega Speedy menu. You can also load the flasher from the megaspeedy.atr, it is
the FLASH.COM file. But note that the Mega Speedy has to be either in
"Mega Speedy" or "Flasher" mode. If you load the flasher
from disk you'll be prompted to enter the drive number on startup. You can
also later switch to another drive number by using the "restart"
option in the flasher. After selecting the drive the flasher checks if the
drive is in Mega Speedy / Flasher mode and uploads code to the drive to enable
the flasher functionality. If the drive isn't in Mega Speedy / Flasher mode
you'll see an error message and can select another drive. The currently
selected drive number and the active mode will be shown on screen. After using
the "switch drive mode" or "run drive code from RAM"
functions the drive will show up as "not initialized". If you
switched to a Mega Speedy mode you can use the "restart" option to
continue using the flasher. Otherwise use "quit" to exit.
Note:
pressing BREAK aborts the currently selected option and brings you back to the
main menu. Use this if you accidentally selected the wrong option.
Choose
the "Program drive ROM" option, enter the desired drive mode and ROM
slot number, and then enter the filename of the ROM image. The ROM image is
uploaded to the Mega Speedy and then flashed to the selected slot. The ROM
image has to be a plain 4096, 8192, 16384 or 32768 bytes file, without a COM
header! Uploading a file with a COM header will render the slot unusable
unless you reflash it. If in doubt, first test by running the drive ROM from
RAM.
Note:
you can't update the currently active ROM slot. Switch to a different ROM slot
before, for example by using the "Switch drive mode" option,
followed by "Restart".
The
option "Run drive code from RAM" allows you test drive ROMs by
running them from the Mega Speedy RAM. The contents of the flash memory aren't
altered by this option. Choose the mode and enter the filename. After
uploading the file to the Mega Speedy RAM the Mega Speedy is automatically
configured to use this
Note:
if you want to continue using the flasher you have to use the
"Restart" option so that the drive is reconfigured to support the
flasher function (this only applies to uploading Mega Speedy mode ROMs to the
RAM). Otherwise just exit the flasher or reboot your Atari.
With
this option you can configure the Mega Speedy drive mode. Select the mode and
slot number that should be activated.
Note:
use "Restart" if you want to continue using the flasher.
The
config and flasher ROM slots work like the Mega Speedy slots, but if you screw
up here you'll brick your Mega Speedy. If this happens you have to use an
EPROM/flash programmer to reprogram the flash with the megaspeedy-stock.rom
file. The config slot is particularly critical, it is the one that is
activated when powering up. If this ROM doesn't work your 1050/Mega Speedy
won't function at all. The flasher slot is a little bit less critical. As long
as you have a working Mega Speedy / flasher ROM in one of the 4 Mega Speedy
ROM slots, you can still use one of these to reprogram the flasher slot. If
none of these works, you won't be able to use the flasher anymore and have to
dig out your EPROM/flash programmer.
So,
be careful!
The
stock flasher and config ROM images are included in the megaspeedy.atr and as
separate files in the "roms" directory and are named FLASHER.ROM and
CONFIG.ROM, respectively. As a security measure you have to enter the sentence
"PROGRAM FLASHER ROM" or "PROGRAM CONFIG ROM" before
flashing starts.
Note:
programming the flasher ROM slot won't work if you set the Mega Speedy to
"flasher mode" - the flasher forbids programming the active ROM
slot.
In
this case you have 2 options:
-
Switch
to one of the Mega Speedy modes, then restart the flasher.
-
Run
the flasher ROM code from Mega Speedy RAM, then restart the flasher.
In
both cases the Mega Speedy isn't using the flasher slot anymore so you can
reprogram it.
Use
the "Backup drive ROM" function to save the contents of a drive
slot, the flasher or the content slot in the Mega Speedy flash ROM to a file.
Choose the desired slot and enter the filename. Then contents of the slot will
then be read from the flash and stored in that file.
The
"Show ROM info" function displays a map of the current contents in
the flash ROM, together with ROM version information (if available). Config
ROMs are displayed as "Config" plus the build date. For example:
"Config 20150106". Flasher ROMs are displayed as "Flasher"
plus the build date and the version of the Speedy ROM. For example:
"Flasher 20150106 1.6". Speedy ROMs in one of the Mega Speedy slots
are displayed as "Speedy" plus the Speedy ROM version. For example:
"Speedy 1.5". Unknown ROMs in the Mega Speedy slots are displayed as
"Unknown", empty ones as "Empty". For the Super Speedy,
Speedy, 1050 Duplicator and original 1050 slots the ROM versions are
displayed. Unknown ROM versions are shown as "?", empty slots as
"-". All other modes don't contain version information, so the map
only shows if the slot contains data (shown as a big dot) or if is empty
("-").
"List
directory" allows you to display the DOS directory. You have to enter a
file mask (eg "*.*" or "*.ROM") but may leave out the
"Dx:" at the beginning - in this case "D:" will be used.
Always
use the "Quit" option of the flasher, as that will soft-reset the
Mega Speedy and disable the uploaded flasher support code in the Mega Speedy.
The
Mega Speedy mode is based upon the Super Speedy mode and adds several
enhancements. This section only lists the items that were added or enhanced.
For general Speedy programming information like RAM and ROM memory locations
please read the original Speedy docs. At the time of writing this README they
were available here:
https://atariwiki.org/wiki/Wiki.jsp?page=Das
SPEEDY-System
$0000-$0FFF
zero page, stack, FDC, RIOT
$1000-$1FFF
unused
$2000-$3FFF
same as $0000-$1FFF
$4000-$5FFF
track display and density LEDs
$6000-$6FFF
$A000 RAM bank select
$7000-$7FFF
Mega Speedy config registers
$8000-$9FFF
fixed 8k RAM bank
$A000-$BFFF
switchable 8k RAM bank
$C000-$DFFF
switchable 8k ROM bank
$E000-$FFFF
fixed 8k ROM bank with Speedy drive ROM
$00000-$73FFF
free
$74000-$75DFF
reserved
$75E00-$75EFF
6810 replacement RAM
$75F00-$75FFF
second 6810 replacement RAM for US Doubler
$76000-$77FFF
fixed 8k RAM bank for Happy, Speedy etc
$78000-$7FFFF
reserved for running drive code from RAM
The
flasher uses $30000-$3FFFF as temporary storage when programming the flash
$00000-$0FFFF
Speedy ROM slots (4x16k)
$10000-$1FFFF
Super Speedy ROM slots (4x16k)
$20000-$27FFF
1050 Turbo ROM slots (4x8k)
$28000-$2FFFF
Happy ROM slots (4x8k)
$30000-$33FFF
original 1050 ROM slots (4x4k)
$34000-$37FFF
US Doubler ROM slots (4x4k)
$38000-$3BFFF
SuperMax ROM slots (4x4k)
$3C000-$3FFFF
Super Archiver ROM slots (4x4k)
$40000-$5FFFF
Mega Speedy ROM slots (4x32k)
$60000-$67FFF
1050 Duplicator ROM slots (4x8k)
$68000-$6FFFF
unused / reserved (32k)
$70000-$77FFF
Flasher ROM slot (32k)
$78000-$7FFFF
Config ROM slot (32k)
(r)
Indicates a read-only register
(w)
Indicates a write-only register
(r/w)
indicates a read/write register
Unused
bits should be set to 0 unless otherwise noted.
$4000
(w) Display Lo / second digit
$4001
(w) Display Hi / first digit
Bit
7: unused
Bit
6-0: Segments G-A (0=off, 1=on)
$4002
(w) Density LEDS
Bit
7-3: unused
Bit
2-0: Density LEDs (DD,
$4003
(w) Buzzer
Bit
7-1 unused
Bit
0: Buzzer output, toggle to produce a tone
$6000
(w) RAMBANK - 8k RAM bank at $A000
Bit
7-6: unused
Bit
5-0: bank number (0-63)
Note:
RAM banks 58-63 are reserved see RAM memory layout.
Super
Speedy ignored bits 7-5 and supported 24 banks
$7000
(w) ROMBANK - 8k ROM bank at $C000
Bit
7: 0=512k mode, 1=32k mode
Bit
6: unused
Bit
5-0: bank number (0-63, 0-3 in 32k mode)
In
512k mode (bit 7=0) the bits 5-0 are used to select one of the 64 8k flash ROM
banks. This allows access to the whole flash memory. In 32k mode bits 5-2 are
ignored. The selected bank number is constructed using bits 6-3 from ROM_BASE
and bits 1-0 from this register. Bit 7 of ROM_BASE is respected; if it is set
to 1 a read-only RAM bank is selected. This allows switching between the 4 8k
blocks of the Mega Speedy ROM without having to care about the absolute memory
position and whether it's located in flash or RAM.
$7000
(r) ROMBANK - 8k ROM bank at $C000
Bit
7: 0=512k mode, 1=32k mode
Bit
6: unused
Bit
5-0: bank number (0-63, 0-3 in 32k mode)
In
512k mode bits 5-0 are read back as written before.
In
32k mode bits 5-2 come from CFG_ROM_BASE bits 6-3, bits 1-0 read back as
written before.
Default
value on powerup is bit 7=1, bit 1-0=2 (the 3rd of the 4 8k blocks in the Mega
Speedy ROM).
$7010
(rw) ROM_BASE - drive ROM base address in 4k
granularity
Bit
7: 0=ROM mode, 1=RAM mode
Bit
6-0: 4k bank (0-127)
Depending
on the MODE bits 0-2 are ignored. Base address of the drive ROM must always be
a multiple of the drive ROM size. In RAM mode the data is read from RAM
instead of flash ROM. Writing to the RAM is not possible via the ROM area.
$7011
(rw) MODE - select drive mode
Bit
7-4: unused
Bit
3-0: drive mode (0-15)
Drive
modes:
0:
Config (same as Mega Speedy)
1:
Speedy
2:
Super Speedy
3:
Mega Speedy
4:
original 1050
5:
1050 Turbo
6:
Happy
7:
US Doubler
8:
Super Archiver
9:
SuperMax
10:
1050 Duplicator
11-15:
reserved, do not use
$7018
(r) Encoder and switch inputs
Bit
7-5: unused
Bit
4: switch 2
Bit
3: switch 1
Bit
2: encoder button/pushed
Bit
1: encoder input B
Bit
0: encoder input A
All
inputs are active-low (0=closed, 1=open).
$7019
(w) Encoder LED
Bit
7-1: unused
Bit
0: Encoder LED (0=off, 1=on)
$7020
(w) I2C data lo, clock lo
$7021
(w) I2C data lo, clock hi
$7022
(w) I2C data hi, clock lo
$7023
(w) I2C data hi, clock hi
Bit
7-0: unused
Writing
to these registers sets the I2C SDA and SCL lines.
$7020
(r) I2C data input
Bit
7: I2C SDA input
Bit
6-0: unused
Reads
back the status of the I2C SDA line
$7030
(w) Centronics data lo, clock lo
$7031
(w) Centronics data lo, clock hi
$7032
(w) Centronics data hi, clock lo
$7033
(w) Centronics data hi, clock hi
Bit
7-0: unused
Serial
interface to the 74LS164 shift register in the optional Centronics interface.
8 bits of data have to be shifted out, starting with the MSB (bit 7). The
74LS164 clocks on the rising edge of the CLK line (low-to-high transition).
$7034
(w) Centronics /STROBE lo
$7035
(w) Centronics /STROBE hi
Bit
7-0: unused
Control
the /STROBE pin on the centronics interface. Set it to low after shifting out
a byte to the serial shift register.
$7038
(r) Centronics busy
Bit
7: busy signal
Bit
6-0: unused
Read
the status of the busy signal.
Bit
7 is set to 1 if either the printer is busy, no printer is connected or the
optional centronics interface is not connected at all.
$7040
(rw) Disk RPM control
Bit
7-1: unused
Bit
0: slow/fast RPM (0 = 269 RPM, 1 = 288 RPM)
Default
value is 1 (288 RPM)
$7041
(rw) FDC write gate
Bit
7-1: unused
Bit
0: write gate (0 = force low write signal, 1 = normal mode)
The
FDC write gate controls the data written to disk. In normal mode the unaltered
data from the FDC write output pin is used. Setting bit 0 of this register to
0 during a sector write forces the data to logic low. This can be used to
create fuzzy sectors.
$7048
(r) Raw test inputs
Bit
7-4: unused
Bit
3: FDC write input from 2793 pin 31
Bit
2: Ready input from U1/CA3086
Bit
1: Super Archiver A11 input from 6532 pin 10
Bit
0: 1050 Turbo speed input from 2793 pin 16
This
register is used during production testing to monitor the raw input signals to
the CPLD.
The
reset code of the Speedy firmware was enhanced so that all extended functions
(RPM control, FDC write gating, state of centronics output signals) are
properly initialized. The last instruction of the RESET2 code (the JSR $9F84
at $E0D5, which calls the optional user definable reset hook) was replaced
with "JSR $FEA0", the extended reset code. The extended reset code
at $FEA0 initializes the extended functions registers and then jumps to the
user reset hook at $9F80:
LDA
#$01
STA
$7040 ; set disk speed to 288
RPM
STA
$7041 ; normal FDC writes
STA
$7033 ; set centronics data
and clock to high
STA
$7035 ; set centronics strobe
to high
JMP
$9F80
The
original Speedy and Super Speedy ROMs are 16k and are mapped to $C000-$FFFF.
The 32k Mega Speedy ROMs consists of 4 8k blocks. By default the 3rd
block is mapped to $C000-$DFFF, this block can be bank switched. The 4th block
is always mapped to $E000-$FFFF.
You
can use an original Speedy ROM in one of the Mega Speedy slots by prepending
some arbitrary 16k of data at the beginning – they won't be used unless you
manually bank switch them in. An easy way to achieve this is to just store the
original ROM twice in a file. Copy the original ROM to a new file, then append
the original ROM to the newly created file and you are done. To switch the 8k
ROM bank at $C000 just write $80-$82 to ROMBANK ($7000) to select one of the 3
banks. When you are finished always set ROMBANK back to the default $82.
When
you boot with the drive door open the Speedy sends the contents from
$C000-$C07F when sector 1 is requested. Serving other sectors from the ROM is
not supported. So your initial boot code has to fit within one sector. This
code then must load additional data from the Speedy ROM via special Speedy
commands.
If
one sector is not large enough for your boot code, do 3-stage loading. The
code in sector 1 loads the second-stage loader (which can be as large as you
want) and then runs it. Use the second-stage loader to load additional data
blocks and finally run the loaded code. An easy way to load a (large) data
block from ROM with a single SIO call is by having code present in the Speedy
ROM (eg at $C100) and executing it via the $4D ("jump with
complete") command. Setup SIO with command=$4D and DAUX=address of the
code in the Speedy (eg $C100). Set DBUF and DBYT according to the destination
address and the length of the data block. Then do a normal SIO read call. The
code in the Speedy (at $C100 in this example) then transmits a data block from
the ROM (of course the length of the block should match the length you used in
the SIO call). That's all! By having multiple code-blocks in the Speedy ROM
and issuing various SIO calls you can easily load multiple blocks of arbitrary
size to different memory locations.
If
you bank-switch the Speedy ROM block at $C000 be sure to set it back to the
default ROM block, otherwise a subsequent boot attempt might read the wrong
data for the boot sector. You can find an example how this is implemented in
the "speedy-flash.src" file, that's the code to create the bootable
config menu.
Starting
with V1.5 the Speedy ROM checksum code (entry point ROMTST, $FFB7) checks the
full 16k ROM area $C000-$FFFF. Up to V1.4 this entry point only checked the
ROM from $E000-$FFFF.
This
means that if you change the ROM code at $C000-$DFFF, for example if you add
or change the bootable code, you should also update the ROM checksums. If you
don't do that, the Speedy will still function as normal, but the ROM test on
the Speedy system software disk will report an error. To check and optionally
update the ROM checksums use the "romcsum" tool on your PC which you
can find in the src directory. It is available both as C source code (romcsum.c)
and as a Win32 console application (romcsum.exe). romcsum supports both 16k
(Super) Speedy ROM dumps and 32k Mega Speedy ROM dumps with ROM versions 1.5
and higher. ROM version 1.4 and below are not supported. If started with one
argument, the filename of a ROM dump, it reads the specified file and verifies
the checksums of the individual pages. Pages with wrong checksums are
reported. If all checksums are correct it prints "Checksum OK". If
started with two arguments, an input and output filename, it reads the ROM
data from the input file and writes a dump with updated checksums to the
output file. The original file will not be changed.