- Board-Variant 1.3d4
Page 16:The Bootloader
Page 18:Inserting and Removing the FlashCard from the Lynx
Page 19:Short Introduction to HTerm
Page 20:Error Messages and Common Problems
Page 21:Don’t Do This - EVER
Page 22:History
Page 24:Credits
Page 25:Links
Seite - 2 -
Foreword
During a two week leave in February 2007, I got a little bored.
So I decided to make use of my skills in circuit developing, microcontroller programming
and printed circuit board design in order to refresh my attainments.
Luckily, I had some left over Flash-EEPROMs in my hobbyist-box which, for a long time, I
wanted to put to use.
As a Lynx fanatic, I stumbled upon several demo and games on the Internet, but with
burning EEPROMs being rather time consuming, I impulsively made the decision to build a
FlashCard for the Lynx.
With this FlashCard, I want to give a tool to demo and game developers, which hopefully
will help to increase the homebrew-scene around the Lynx, at least a little. I would be very
glad to see some of the projects, even those already started, being completed with the
help of the FlashCard.
After two years of developing this card, I'm looking forward to using my Lynx only for
playing, for quite some time.
Bernd Thomas June 2009
Seite - 3 -
Terms Of Use
All hints for the correct use of the terminal program refer to HTerm 0.81beta. If you are
working with another version, you have to adjust the settings appropriately.
For HTerm, you have to make the following adjustment from the default setting:
Set “Newline“ to “CR + LF“ (See “Short Introduction to HTerm“ on Page 15 for more
details.)
The handling of the menu and all pop ups of the FlashCard are explained in reference to
the English version.
This manual is only valid for "board 1" FlashCards.
(PCB variants 1.2xx and 1.3xx)
Seite - 4 -
Important: ESD
Electrostatic Discharge (ESD) is an unwelcome phenomenon in electronics.
Describing ESD and its effects in detail would go beyond the scope of this manual. There
are other sources referring to this issue; Wikipedia being one of them.
It is very important that you do NOT touch the FlashCard when you are electrostatically
charged.
You should always discharge yourself of any static prior to touching the FlashCard. You
can do this by simply touching anything made of metal.
It is best not to touch the components or contacts of your FlashCard.
Important: Use of FlashCard with Lynx I & Lynx II
The FlashCard has been designed for use with a Lynx II.
You can also use the FlashCard with a Lynx I. However, due to the enclosed cartridge slot
of the Lynx I, there is a danger of damaging the Card by plugging and unplugging it, as
well as by the opening and closing of the cartridge door with the Card inserted.
I do not recommend the use of the FlashCard in an unmodified Lynx 1!
However, if you insist on using the FlashCard with your Lynx I, you should remove the door
permanently, prior to inserting the FlashCard. Note: No documentation will be provided to
assist you in removing the door.
Naturally, every change you make to your Lynx is done at your own risk.
It is always a good idea to think before you position your screwdriver. ;-)
Important: Miscellaneous
Use the Lynx FlashCard at your own risk. The creators of the FlashCard assume no
liability or responsibility due to damage. No warranty is included with this product or the
documentation. The FlashCard is not intended for use in any way that would violate the
law.
Seite - 5 -
Specifications
For standard FlashCard: (PCB variants V1.2xx)
- 512K Flash ROM
- 128 Byte EEPROM
- 93C46 in 16 Bit Mode, for details see data sheet
- Data interchange by USB as serial connection via terminal program
- LEDs as status indicators and transfer-control
- Button to bring up the menu and confirm entries (“Anykey“)
- Reset button for resetting the microcontroller and USB-connection
Anykey Status LED USB Reset
USB-Transfer LEDs (red=upload, green=download)
Anykey Status LED USB Reset Anykey Status LED USB Reset
- Only at PCB V1.3a4: Additional 8Kb EEPROM (20th anniversary demo)
Anykey Status LED USB Reset
USB-Transfer LEDs (red=upload, green=download)
- Only PCB V1.3d4: two 512K FlashRoms (alternate writing of the FlashRoms make it
possible to clear the unused chip in the background. This means almost no wait time
because there is always a clear FlashRom ready to use.)
Anykey Status LED USB Reset
USB-Transfer LEDs (red=upload, green=download)
Seite - 7 -
Requirements
- Computer with USB port
- available driver for FT232R by FTDI
- Terminal program (8N1, Newline CR + LF)
Driver for FT232R:
http://www.ftdichip.com/Drivers/VCP.htm
Terminal program:
I recommend HTerm, for Windows and Linux:
http://www.der-hammer.info/terminal/
Seite - 8 -
File formats
The following file formats can be accessed by the FlashCard:
- *.bin
- *.lyx
- *.lnx
- *.o
Please note: Firmware 1.0x and 1.1x cannot use *.o files with the FlashCard.
Seite - 9 -
Initial Operation
Connect the FlashCard to your PC by using the provided USB cable.
Caution! Using a USB-Hub can cause malfunctions and/or connection-terminations.
The operating system should automatically detect the device and install the needed USB
drivers. Should the operating system not be able to find those drivers, you can get them
from the FTDI homepage.
The FlashCard’s factory setting for baudrate is 9600 baud. The FlashCard can use
baudrates up to 115200. To change baudrate, see page 11.
Note - If you update the firmware or reset your FlashCard, it will reset to 9600 baud.
Seite - 10 -
The Menu System
Displaying the Menu
After connecting the FlashCard to the computer and establishing the connection to the
Terminal Program (On HTerm: Set the correct COM-Port then click “Connect“ – See Pg 15
“Short Introduction to HTerm“ for more details) you can display the Menu by pressing the
“Anykey“ on the FlashCard.
The menu items are displayed in the following order:
Flash, 93C46, Baudrate, Mode, Language and System
Entering Commands
After entering the Letter / Number command (shown below) in Brackets “[ ]“ you have to
press “Return“ or “Enter.“ The action is then executed or the setting is changed.
Remember, the setting that is marked with a big “X“ is the current one.
After the following actions, a series of equals-sign “=“ will be displayed: FLASH(all),
“93C46“ (all) and SYSTEM (only “system info“) .
Default Settings are displayed as underlined text.
Unexpected Commands or Amount of Data
The FlashCard won't react to unknown or unexpected Commands.
When an unexpectedly large amount of data is sent or if commands are sent while the
FlashCard isn't able to process, the following message might come up:“Stop upload and
press Anykey.“ In this case, abort any running operations and press the “Anykey“ on the
FlashCard.
FLASH
content: xxxxxxxx (Available with Firmware 1.40)
If bin/lyx-file is used, „bin-file“ is shown
If o-file is used, „*.o-file“ is shown
if lnx-file is used, the filename stored in the header of the lnx-file is shown
No content is shown if the Flash-Chip is erased
[w] write [v] verify
Write: After entering “w“ the Flash Memory will be deleted. During the delete process, the
Status-LED will flash red and green and the message “Erasing memory“ will be displayed,
followed by an increasing number of dots. The number of dots will vary depending on how
much memory is in use.
1.01: Depending on how much memory is used, the number of dots will vary. With
128/256K it is up to 40 dots, with 512K it is up to 80.
In case the delete takes abnormally long (more than 100 Dots) the FlashCard should be
Seite - 11 -
disconnected from the USB-Cable and reconnected after 5 seconds.
1.1x and 1.2x: Regardless of how much memory is used, it is up to 40 dots in normal
condition.
1.40: depending on how much memory is used, the erase time will vary. The maximum is
40 dots.
In case the delete takes abnormally long, the FlashCard detects a time out and the
message "erase memory failed - disconnect USB and try again" will be sent from the
FlashCard.
The FlashCard should be disconnected from the USB-Cable and reconnected after 5
seconds.
After a successful delete, the message “Please start upload data“ is displayed.
Now the data can be sent. (To send a Lynx file into FlashCard, push “Send File“ button on
HTerm, and select file from menu)
The end of the transmission is determined by the FlashCard via a Timeout. So, it's not
necessary to send the configured number of KB.
During write operations, the Status-LED will flash red.
Verify: After entering “v“ the message “Please start upload for verify“ is displayed. Now the
data can be verified. (To verify a Lynx file, push “Send File“ button on HTerm, and select
the same file from menu)
When the comparision is successful, the message “Verify successful“ is displayed.
Otherwise, if the two memory positions do not match, the message will read “Warning –
verify not successful.“ “Stop upload and press Anykey,“ and the comparision will be
aborted. During comparision, the LED flashes green.
93C46
[u] write [y] verify [r] read [e] erase [m] modify byte
Write: The EEPROM doesn't need to be deleted before writing. The data is overwritten.
When transmitting less than 128 Bytes, the leftover Bytes are overwritten with “FF“ while
the Status-LED blinks red.
Verify: Analog to FLASH, LED blinks green.
Read: All 128 Bytes are read and outputted. The Status-LED blinks green.
Erase: Deletes the EEPROM.
Modify Byte: This new function is available on Firmware v1.10 and above.
This option allows you to modify one byte of the EEPROM memory.
After selecting “m“ you have to send the address and the data, in Hex-Data.
To switch to Hex in HTerm, change the “Type“ (lower left side, next to the input line) to
HEX and insert the address and data, separated by a space.
For example: 00 30
In this case, the FlashCard will write "30" in hex to hex address "00".
Before 1.40: only 1 byte is changed every time "modify byte" is executed.
1.40: it is possible to change up to 128 bytes every time "modify byte" is executed.
The data can be sent in random order.
Seite - 12 -
BAUDRATE
[9] 9600 [2] 19200*** [3] 38400*** [5] 57600 [1] 115200
Baudrate is set by typing the corresponding number.
The message “Please switch Baudrate of PC and press Anykey“ will appear. The
FlashCard is already set to the correct Baudrate by then. You only have to set the correct
Baudrate in the TerminalProgram and press the “Anykey.“
The currently set Baudrate is marked with an big “X.“
*** 1.40 - 19200 and 38400 baud rates are no longer available
MODE
[a] auto size (a) (Available with Firmware 1.40)
The auto size option is only visible in .lnx mode.
If the data in the header of the .lnx file is not correct, the memory scheme must be
selected manually.
The memory scheme is only visible if .bin/.lyx is selected and if the auto size option is
deactivated in .lnx mode.
[g] 128k [h] 256k/BLL [i] 512k [k] 512k-BLL
128k: Memory scheme of Atari Modules with 128kb memory capacity.
(512 Byte blocksize)
256k: Memory scheme of Atari Modules with 256kb memory capacity and most of
Games/Demos that were developed using the BLL and need less than 256kb of memory
capacity.
(1024 Byte blocksize)
512k: Memory scheme of Atari Modules with 512kb memory capacity.
(1024 Byte blocksize)
512k-BLL: Memory scheme similar to 256k/BLL, for Games/Demos that use BLL and
need more than 256kb capacity.
(1024 Byte blocksize 2 banks)
[l] lnx [b] bin/lyx [o] *.o
lnx: Games/Demos in the File Format *.lnx
bin/lyx: Games/Demos in File Format *lyx or *.bin
o: Games/Demos in File Format *.o
The Memory scheme/File Format is selected by entering the corresponding letter.
The currently selected Memory scheme/File Format is marked by an big “X.“
When changing the Memory scheme / File Format, the menu will be displayed on the
screen.
Note: the “.o“ file format is only possible with Firmware 1.2x and newer
The FlashCard adds a small Bootloader to the o-file. You can load data to the Lynx DRAM
to 0200hex – EFFFhex. The FlashCard uses settings from the standard o-file Header.
LANGUAGE
[0] English [4] Deutsch [6] Francais [7] Espanol [8] Nederlands
Seite - 13 -
After entering the corresponding number, the menu and all messages are displayed in the
newly selected language.
The selected langugae is marked with an big “X.“
When changing the Language, the menu will be displayed on the screen.
SYSTEM
[s] systeminfo [c] credits [x] reset all
System Info: Output the Firmware Version, Languageset Version, Serial Number,
Number of times the memory has been deleted, the Board-Variant and internal
information.
Credits: Show the credits (visible from firmware 1.14)
Reset All:. All settings, except the Baudrate, are reset. Also, the Flash memory and the
EEPROM will be deleted.
Seite - 14 -
Special Functions
20 th & 25 th Anniversary Edition:
SYSTEM
[X] demo (f)
Demo: This is a special bonus feature, added to the Limited Edition 20th anniversary run
only. (PCB V1.3a4) If switched on, a demo will be shown before the uploaded game
begins. The demo can be aborted by pressing A or B on the Lynx.
If the FlashCard is inserted into the Lynx, it is possible to activate and deactivate the demo
as long as the status LED is flashing. The LED color changes from red to green.
After the next start up of the Lynx, the demo mode will be changed.
Note: The demo might cause some games not to run properly. If you encounter a problem,
switch off the demo by entering [f] on HTerm. The menu will now show "[ ] demo (f)".
Board-Variant 1.3d4
“Writing“ of FlashCard before 1.40: normally the unused Flash Memory chip is erased in
the background and no delete message will appear. In rare cases, it is possible the Flash
Memory chip will need to be erased before writting.
1.40: 2 Modes for the FlashCard are available.
- Fast Erase Mode: same as versions before 1.40
- Bank Mode: 2 banks with 512K are available.
If bank mode is used, the Flash Memory chip must be erased before writing.
In the menu,“FLASH – Content“ will show the contents of both banks. The number shown
in “SYSTEM - Use Bank“ will be the active bank.
All FlashCard commands will be performed to the active bank.
It is possible to switch between the banks if the FlashCard is inserted into the Lynx.
As long as the LED is flashing, it is possible to press Anykey to change to the other bank.
The LED color will change after pressing Anykey.
Red means Bank 1
Green means Bank 2
To use the changed bank, the Lynx must be switched off and on again.
Seite - 15 -
The Bootloader
The Bootloader is independent software on the FlashCard. It‘s task is writing new
Firmware versions in the memory of the microcontroller. The bootloader can not be
exchanged.
The FlashCard‘s Bootloader is equipped with multiple security systems that prevent the
Card from malfunctioning if an error occurs during an upgrade attempt.
Using the Bootloader (Bootloader V1.00)
Since the bootloader has the transmission speed set to 2400 Baud, independent of the
setting in the Firmware, you must first switch HTerm to 2400 baud.
To activate the Bootloader, Press and hold “Anykey.“
While still holding “Anykey,“ press “Reset,“ hold for one second and release “Reset.“ (This
disconnects the FlashCard from the PC and HTerm.) Continue holding “Anykey.“
After about 4 seconds of holding “Anykey,“ the Status-LED will glow green. While still
holding “Anykey,“ hit the “Disconnect“ button on HTerm, then hit it again to “Connect.“ (Try
to do this before the Status-LED turns red.)
About 3 seconds later, the Status-LED will glow red. Now you can release “Anykey.“ The
Status-LED will glow yellow, meaning the bootloader is now ready to write a new Firmware
to the Microcontroller.
If reconnecting was successful, you should see "send data“ in HTerm’s Received Data
window
Note: After you release “Reset,“ the computer will be able to reconnect with the FlashCard.
However, depending on your computer’s setup (processor type, CPU speed, etc) the
reconnection might take more, or less, time than indicated.
Also, the “send data“ text is only visible if you are able to click the “Connect“ button in
HTerm before the “send data“ text is sent by the FlashCard. This occurs between the
green and red Status-LEDs. Even if “Connect“ is not clicked quickly enough, it probably
won‘t matter. The important thing to remember is, as long as the Status-LED glows yellow,
the FlashCard is ready to accept the new Firmware.
Now you can send the new Firmware Version to the Card by clicking the "send file“ button
and choosing the new firmware file.
Once transfer is complete, hit “Reset“ on the FlashCard
On HTerm, hit the "disconnect“ button, then the "connect“ button, then change the
Baudrate to 9600 baud.
Hit “Anykey“ – this should display menu on data window
Hit "S“ - this should display system info, including the newly updated
firmware version number.
If the Firmware doesn't work or a different file is sent, the first security system will abort the
update process and the message “Data does not match to this board – please reset“
appears. The Status-LED will glow red until a reset is done. In this case, the old firmware
is not overwritten and does still work.
Should a faulty file be accepted accidentially, another security system will stop the
FlashCard from becoming unusable.
The FlashCard can be overwritten by starting the Bootloader again. This is always
Seite - 16 -
possible regardless of the state or the version of the Firmware.
Bootloader V1.01
Same as Bootloader V1.00.
After the Firmware update is complete the message “press reset“ will be send from the
FlashCard.
Bootloader V1.01d (only PCB V1.3d4)
Same as V1.01.
The Firmware File
The filename has the following pattern:
“Firmware Vxxx yyyymmdd Language Vxxx.fcb1“
This way it's easy to find out which firmware file you have.
The meaning of the extension fcb1 is FlashCard Board 1.
Only PCB V1.3d4
It is not possible to use firmware before 1.14 with PCB V1.3d4.
The Bootloader V1.01d will not use non-valid firmware.
Seite - 17 -
Inserting and Removing the FlashCard From the
Lynx
There is nothing special about inserting the FlashCard. Simply push the Card into the
cartridge slot gently but firmly, then turn on the Lynx.
Before removing the Card, make sure the Lynx is turned off.
While using the Lynx with the FlashCard, do not press the“Reset“ or “Anykey“ buttons on
the Card.
Seite - 18 -
Short introduction to HTerm
A few basic things about HTerm:
A - Sets how the data sent by the FlashCard is displayed.
B - Sets the format in which the data sent to the Card is displayed.
C - Sets the format of the input data.
D - Selects which data to send. (Push this button after selecting “W“ to write to FlashCard)
E - Sets the COM-Port the PC assigned to the Card. *
F - Sets the Baudrate.
G - Connects the Card to the Terminal. Press “Disconnect“ to close the connection
between the Card and the Terminal.
H - Set Newline to “CR+LF“
* In case you don't know which COM port to use, you can find out by starting HTerm
without connecting the Card via USB. Select the Drop-Down list, and see which ports
exist.Then connect the Card, and after the OS recognizes it, click the “R“ Button and
consult the Drop-Down menu again to see the added COM-Port.
Note: If you unplug the FlashCard from the computer’s USB port, you will need to press
“Disconnect“ in HTerm, and when plugging the FlashCard back into the computer, you will
need to press “Connect“ in HTerm before you can use the Card. This is because HTerm
can not detect if the FlashCard has been removed.
Seite - 19 -
Error Messages and Common Problems
Message “Erase memory failed disconnect usb and try again“ appears:
Just disconnect the USB-Cable and reconnect again after 5 seconds.
If that doesn't help, just do a “reset all“ via the menu.
One or all “X“s are missing on the menu:
Do a “Reset All“ and the “X“s should show up again.
Program not working after upload:
First, check the Card settings.
Is the Memory-scheme correct? Is the Memory Capacity correct? Is the file format set to
the correct value? Does the Lynx file work at all in an Emulator? (e.g Handy)?
Note: some of the demos you can find in the internet do not work on a Lynx system.
They only work with an Emulator.
Note: some .lnx-files do not have correct data in the header. This may cause problems
with the Auto Size mode.
The Card doesn't react any more:
Connect the FlashCard to USB. Press and hold “Anykey,“ then press “Reset.“ Hold for 1
second, then release “Reset“ while still holding “Anykey.“ Wait 4 seconds until the StatusLED turns green. Release “Anykey.“
The card is then reset to the default Value of 9600 BAUD.
Note: If you continue to hold “Anykey“ until the Status-LED turns from green, to red, to off,
you can then release the “Anykey“ without having to reset the Baudrate or jump in the
Bootloader.
By pressing the “Reset“ Key, the PC connection has been reset.
Seite - 20 -
Don't do this - EVER
Reading via EEPROM Burner
Under no circumstances should you attempt to read the FlashCard memory with an
EEPROM Burner. Some EEPROM Burners output 12V on some pins even when it is not
reading. This has no effect on regular EEPROMs because they do not have a problem
with this current. However, the FlashCard can not handle this current, and damage is very
possible.
Connecting via an USB-Hub
When using a USB-Hub, malfunctions and “Connection Aborts“ can occur, so we advise
you to only use the Card with your Motherboard‘s USB ports.
Executing “MProg“ (FDTI Tool)
Never execute the “Mprog“ Program by FTDI.
When changing the Settings, the FlashCard might malfunction or even be damaged.
Cleansers /Cleaning with a Brush
Never use cleansers or abrasives to clean the FlashCard. However, the contacts can be
cleaned using Isopropanol (Isopropyl Alcohol).
Never use a brush to clean the Card. There are ESD-aware brushes which can be used,
though.
Removing the FlashCard from an running Lynx
Always power off your Lynx before removing the FlashCard. Removing the FlashCard from
a running Lynx can damage the Card.
Seite - 21 -
History:
Firmware:
1.01: (not avaliable for download – only used with PCB V1.271)
First released Firmware for the FlashCard. (1st and 2nd run FlashCards)
1.10: (not avaliable for download – only used with PCBs V1.27x and V1.3a4)
- add Byte modify for 93C46
- add demo for 20th anniversary FlashCards
- activate time out routine for erasing Flash Memory
- remove one mistake in dutch language
- optimize code
1.11: (available for download – not possible to use with PCB V1.3d4)
- fix write and read bug with 93C46 from manufacturer CSI
- improve erase count routine for 93C46
- bug fix using green LEDs while verify
- bug fix sometimes red status LED do not switch off after verify failt
- optimize erase and time out routine for erasing Flash Memory
1.14: (not avaliable for download – only used with PCB V1.3d4)
- add routine for use of 2nd FlashRom with PCB V1.3d4
1.15: (not avaliable for download – only used with PCB V1.3d4)
- bug fix verify routine for 93C46
1.20: (available for download)
- add o-file support
- optimize code
1.40: (available for download)
- Menu Content
- Auto Size-mode for .lnx-files
- Menu changes
- Can modify 93C46 up to 128 Bytes at once
- Bank mode for 1.3d4 FlashCards
Seite - 22 -
- Code optimation (e.g. Flash erase routine)
Bootloader:
Note: the Bootloader can not be updated.
1.00:
First released Bootloader for the FlashCard. (S/N 1-74)
1.01: (S/N 75 and above)
- add message “press reset“ after Firmware update is complete
- optimize code
1.01d: (only with PCB V1.3d4)
- optimize code for use with PCB V1.3d4
Seite - 23 -
Credits:
Matthias Aschenbrenner
Fadest
Björn Spruck
Luis Caballero-Posadas
Milan Polle
Randy Pearson
Karri
Alex Thissen
Jair Moreno