This new IOS release (S221116_R230117_Z80.ino in the Files section) brings a new dual-boot mode. Now it's possible choose if boot with the usual Basic or use the new iLoad boot mode.
iLoad (S260117.asm in the Files section) is an Intel-Hex bootloader that allows to load from the serial port a binary program using the Intel-Hex format, and execute it. I've used a large part of the source from this site.
To select a boot mode just push the Z80-MBC Reset button and immediately after push the User button at least until the User led turns off.
The selection works as a toggle switch, and is stored in the EEPROM.
Here it is a video that shows how to switch:
Using the iLoad boot mode it's possible to automate all the process from the source to the execution in the target.
This video shows an automatic Assembler toolchain; only one command from the source assembler to the execution on the target (the source file BlinkDemo.asm used in the video is in the File section):
HOW TO SET UP AN "AUTOMATED" ASSEMBLER TOOLCHAIN
What you need to do:
- Set up a Windows host or a VM (Virtual Machine). I've used a Windows XP SP3 VM onto a linux host;
- Load the Windows driver for your serial-USB adapter. Remember that your dongle *must* have the DTR signal;
- Create a working directory where to store the assembler sources, the assembler program and the two batch files (A.BAT and L.BAT) in the asmbatch.zip file (see the File section). With a text editor search the line:
"C:\Program Files\teraterm\ttermpro.exe" /c=3 /BAUD=9600 /w="Z80-MBC Terminal" /m=LoadZ80.ttl
inside A.BAT and L.BAT and verify that both the path and the COM number (/c=3 means COM3) meet your system; - Download and copy in the previous directory the TASM v3.2 assembler from here. The on-line manual is here;
- Download and install the "Tera Term" terminal emulation from here;
- Set up Tera Term. From the Tera Term "Setup" menu select "Serial port..." and configure the parameters for your COM<n> connection to your serial-USB adapter. Set 9600 Baud, 8N1, Flow control none, Transmit delay 40ms/line. Save configuration with "Save setup..." from the "Setup" menu;
- Copy the file LoadZ80.ttl (see Files section) in the "Tera Term" installation directory, where it is installed the main file ttermpro.exe (for a standard installation for an English Windows version should be "C:\Program Files\teraterm");
- Open the file LoadZ80.ttl with a text editor and go to line 10. Edit the "setdir" parameter to meet your working directory path and name created at point 3. on your system, and save the file;
- Open the DOS command line and go in the working directory (using the CD dos command), attach the serial-USB dongle to the Z80-MBC and for a VM "connect" the dongle to the emulated usb of your VM. All done!
Now it's time to check if it is all ok. From the DOS command line give the command: "A blinkdemo.asm" to check if all the toolchain works as in the video. To load the last compiled program give the command "L" without parameters. To load a specific intel-hex file give the command "L <filename.hex>".
Close Tera Term before every new upload.
iLoad behavior
Please remember that iLoad will take the first address of the intel-hex stream as the starting address of the program, and after the loading will jump to it.
iLoad will check the hex stream for errors, and protects itself if "someone" try to load a program (or a part) over it ("illegal address" error).
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
hello! I have a question... What if my serial ttl usb does not have the dtr pin? Can I still use this with a workaround? Reset when needed manually?
Thanks,
Are you sure? yes | no
Hi, yes it should work (but it isn't very handy...).
Are you sure? yes | no
All this is AWESOME work! I love it. Designing my very own system based on your fantastic work. Truly appreciate it.
Regards,
/Stefan from Sweden
Are you sure? yes | no
Thanks a lot!
Are you sure? yes | no
the iLoad capability works really nicely. Since I'm on a mac and don't have terraterm, I ended up copy&pasting .hex files to "minicom" (minicom is also available for linux.) I also turned the speed up to 19200 with no problems.
Are you sure? yes | no
Thanks! I think it should be possible speed up the serial at 38400, because is the speed that Arduino IDE uses to upload to an Atmega32 with an 8Mhz internal osc (but I haven't tried it...)
Are you sure? yes | no
copy&paste? bah ...
Are you sure? yes | no