💾 Archived View for yamato.cities.yesterweb.org › flash99.gmi captured on 2024-06-16 at 12:01:32. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-11-04)

-=-=-=-=-=-=-

Back to Main Page

Flashrom99: Flashrom Cart for the TI-99/4a

+------------------------------------------------------------------------+

Last update: 12-October-2023; Article Published.
All images hosted in Gemini/Gopher spaces unless otherwise specified.
This article can be printed in 6 pages, A4 size.

+------------------------------------------------------------------------+

Credits to Endlos99 for the original Flashrom99 idea & instructions (HTTP)

I will discuss here about the process of assembling your own Flashrom99 according to the instructions above.

If you find any error or have a question, please contact me (email address in main page of my capsule).

First and foremost, I would recommend reading the instructions on the website above, so you can get an idea of the process. I will not discuss here about how to make the FlashROM99, but more about some problems that could happen.

Some parts of the process are not well described. There are also some inconsistencies, missing information and a few guesses that must be done to complete everything. If you don't have (much) experience with this sort of projects, you might not be able to complete it or it would be really difficult.

First things first. What do we need to create the Flashrom99? Basically four things:

Required Tools

You will basically only need a soldering iron, solder and wire cutter to remove the excess leads of resistors anc capacitors after soldering. There might be some other optional accessory, but pretty much these are the only things you might need.

Electronic components

As for the list of electronic components, the next items are required:


Except for the FlashROM99 Board (the very first item in that list) everything else can be obtained from virtually any electronics retailer online. In my case, I always buy everything from DigiKey, as they have a huge inventory of items, reasonable prices and fast shipping times.

Then we have the 62256 RAM chip. The required one must be 32Kb of memory. Unfortunately, manufacturers do not tell you directly this number, you must instead check the technical specification of each chip and do a few calculations to find out this value, so the one that you need to buy is, for example, the AS6C62256

Click here to see an image of the actual unit that I used (19.7 Kb, PNG, 800x800)

There are other models with 32Kb and various speeds, so feel free to check them by yourself.

Next, we have the 74HCT377. There are also a couple of models, but the one I bought were the HCT377N and it works fine.

Click here to see an image of the specific unit that I bought (26.9 Kb, PNG, 800x800)

Now, we have the 74HCT541. Again, there are several variants of this IC, and some of them might not work, but the one that I confirmed to work is the SN74HCT541N.

Click here to see a photo of the 74HTC541N that I used (30.1 Kb, PNG, 800x800)

Another possible problem could be in the SD Card Module. This is a very easy and affordable item to find. If you search online for Arduino SD Card Module, a lot of results will be presented. BUT, there is a small catch here. Not all of them might work with the Flashrom99. You have to make sure that your module matches the pins and configuration of the one I bought.

See detailed photos of the module in the links below:

Front part of the SD Card Module (28.6 Kb, PNG, 800x647)

Back part of the SD Card Module (27.3 Kb, PNG, 800x781)

And pretty much these are the only parts that could be a bit problematic if you are a beginner.

Just as a reference, the dimensions of the micro push button are 7mm by 7mm (might be 8mm, as I manually measured it with a simple ruler). This button is a temporary style button. And the dimensions of the FlashROM board are 80mm by 100mm. Your PCB manufacturer might ask you this information, among other things, to have an estimated price.

With that we have all the possible problems with components solved. The rest of the components are basically straightforward.

Programmer and communication software

The brain of our Flashrom99 is the ATmega8515. We need to flash a firmware so it can work in the way we want.

To program an AVR microcontroller like the ATmega8515, we need some sord of device that is able to write data to the microcontroller, and a special communication software that can give instructions to the programmer. The programmer is tipically connected to the USB port of our computer.

There are several options here and the one I used is the USBASP. This is also a very inexpensive device and can be obtained easily from many online sellers.

Next, for the communication software I used AVRDUDE. If you are in Windows, download the Windows version. If on Linux, then the Linux version.

Click here to download AVRDUDE from its official github page. (HTTP)

In addition to AVRDUDE and all the files in FlashROM99 github page, we need another tool called XAS99.

This is a tool to create the firmware that we need to install into our ATmega8515.

And here we encounter our first pain in the boott. XAS99 has many versions and updates, but only one specific version will work with FlashROM99 source code.

Additionally, the version of XAS99 that we need only works with Python2.

And not only that, but the command line syntax of XAS99 of the version that we must use is different than what FlashROM99 shows in the example in its github.

And if this is not enough, the whole thing doesn't work well in Windows, so if you are using Windows you must do part of the process in Linux and another part in Windows.

Oh, and wait! Yes, also, by default, AVRDUDE has a baudrate too high to communicate with the ATmega8515, so all attemts to cmmunicate will painfully fail!

All of this is totally omited in FlashROM99 or anywhere online, so the process is annoying at very least, but I will describe the steps below.

You can download XDT99 2.0.1 from this link (HTTP)

➡ If you are in Windows: Temporarily, extract everything in XDT99 into a folder in your desktop. You can all this folder like "xdt99".

➡ If you are in Linux: Extract XAS99 somewhere in yout home directory.

explorer.exe .

(Note the white space and the " . " after explorer.exe!)

A new window will open. Move the temporary desktop folder that we extracted a moment ago into this window. This new window is the home directory of your user in your Linux distro. Keep this window open.

The folder structure must be exactly like in this image (2.53Kb, PNG, 182x587)

Please, ignore the ".zone.identifier" files, as they were created by WSL2. Just remember that all the files and folders of FlashROM99 and XDR99 must be together in the same folders, meaning, FlashROM99 files must NOT be in their own sepparate folder inside XDR99.

If everything went fine, you might be able to type pithon2 and a python2 command prompt will fire up.

Write "quit()" to exit it.

The reason why we use Linux in this step is because under Windows, python has some small issues and complications for this specific project. They can be resolved but it is much faster and straightforward to do this on Linux.

Also, you need Python 2 because the version of XAS99 that we must use is designed exclusively for Python 2.

python2 ../xas99.py menu.a99 -b -R -I ../lib

Do not change the order of parameters in that command. They must be exactly in that order, also note the capital letters -R and -I. Last one is capital "i", not L. You can also copy and paste the whole string from here to your terminal if you want.

If you don't see it or you had some message on the terminal, it means there was some error, so please review the error and try to fix it.

python2 mkmenu.py

This will create a binary file called "menu_6000.bin" that is needed to display the menu in the TI-99 when you insert the FlashROM99 cartridge. You don't need to do anything with this file at this moment.

➡ For Windows WSL2: you need to install all the compilation software, specifically, you need "make" and "gcc-avr", as well as all the required support libraries and related packages. This is very easy. Just type this command:

sudo apt-get install make binutils gcc-avr avr-libc uisp avrdude flex byacc bison

Feel free to copy-paste the command directly on the terminal. That will install all the needed tools.

➡ For Linux: please read the "For Windows WSL2" above and install the packages that you need. Most likely "make", "binutils" and some of the other tools are already pre-installed, so you will have to check one by one depending on your linux distro.

make

After a couple of seconds the process will finish and if everything worked without surprises, you will see a new file called "flashrom.hex". This is the actual file that you have to install or flash into the ATMega using the USBASP programmer.

At this point, we are almost finishing the process. You should have two files: "menu_6000.bin" and "flashrom.hex" in the "ti" and "avr" directories respectively.

➡ For Windows: you might need to download a specific USB Driver. You can use a tool called Zadig that will help you install the correct driver.

You can download Zadig from this link. Select WinUSB driver to install (HTTP)

➡ For Linux: according to ChatGTP, USBASP is recognized by the OS without installing additional drivers. Since I don't have Linux installed, I cannot confirm this.

To connect the ATmega8515 to the USBASP, please follow the next diagrams:

Pinout of the USBASP port (2.14Kb, PNG, 269x176)

Pinout of the ATmega8515 microcontroller (17.3Kb, PNG, 800x751)

You need to connect to the corresponding pins in the USBASP the next pins in the ATmega8515:

- ATMega Pin 6   ->  USBASP MOSI (pin 1)
- ATMega Pin 7   ->  USBASP MISO (pin 9)
- ATMega Pin 8   ->  USBASP SCK (pin 7)
- ATMega Pin 9   ->  USBASP RESET (pin 5)
- ATMega Pin 40  ->  USBASP VCC (pin 2)
- ATMega Pin 20  ->  USBASP GND (pin 3, 4, 6 8 or 10)

➡ For Linux: move to the directory "avr" and type the next command:

avrdude -p atmega8515 -P /dev/ttyACM0 -c usbasp -B100 -U flash:w:flashrom.hex

➡ For Windows: copy the file "flashrom.hex" from the directory "avr" into the AVRDUDE directory that you downloaded at the very begining. Close the WSL2 Linux terminal window. Do **not** close yet the Linux Home directory window (the one we opened with "explorer.exe . " before). Open a normal Windows command line and move to the directory where you extracted AVRDUDE. Type the next command:

avrdude -p atmega8515 -c usbasp -B100 -U flash:w:flashrom.hex

➡ ** Note for Linux users ** as I don't have Linux, I am not sure if the "-P /dev/ttyACM0" will work like that or you need to specify another device. Please check by yourself.

After executing that command, please wait until the process of flashing the firmware is completed. This might take a little bit.

If your ATmega is a brand new one, you don't need to execute any other command. If you are reusing an older one, run the next command:

➡ For Linux:

avrdude -p atmega8515 -P /dev/ttyACM0 -c usbasp -B100 -U lfuse:w:0xe4:m

➡ For Windows:

avrdude -p atmega8515 -c usbasp -B100 -U lfuse:w:0xe4:m

This command will disable the built-in bootloader, if you previously activated it. Remember that this is only needed if your ATmega has been used for other things before.

Additionally, you MUST use this commands with exactly these parameters. Do NOT use the commands from FlashROM99 github because they are missing the baudrate, so they will not work!

➡ For Windows: if you accidentally closed the Linux Home Directory, you can access your linux folders and filesystem by clicking on the "Linux" quick access icon when you open any explorer window. You should navigate to "/Linux/Ubuntu/home/<user_name>/XDT99".

With that last step, you should have a shiny, fresh and working FlashROM99!

You can now copy games and software to the root of the SD Card. When you insert the FlashROM cartridge in the TI99, you will see a list of the games and software in your SD Card.

I recommend reading the FlashROM99 page in github (link at the top) to know what exact game images are supported.

You can download some sample games from FlashROM99 page (HTTP)

If you have any doubt, you can contact me. I wil try my best to help you solve your questions.