Reworking it for the newer blog reminded me that I need to pick up the Z-80 assembler and write more for the venerable Model I!Emulates floppy disk, cassette, Aculab Floppy Tapes, hires graphics, orchestra 80 and printer. His TRS-80 emulator acts like a Model 1 with an Expansion Interface, two 5 1/4 floppy drives and 48K of RAM.I had originally published this text on Sunday, November 8, 2009. He eventually moved to the Macintosh, and wound up writing a TRS-80 emulator for it. Yves Lempereurs Model 1 Emulator for the Macintosh At one time, Yves worked for Funsoft, writing games for the TRS-80 Models 1 and III.
Trs 80 Emulator Code In ThisIn fact, most short-cut keys wont work as the emulator needs There is some C code in this post, but the main point of the post is to provide a way to dump TRS-80 binary CMD files.The TRS-80 Microcomputer System was launched in 1977 by Tandy, and sold throughout their Radio Shack stores. Oh, and, sorry in advance, the backspace button wont leave the page because it is too useful for deleting characters. Instead of using the X-Window system for graphics, it uses the portable SDL library.Note that the backslash () key is the TRS-80 clear key, needed to start Super Nova. It has been ported from Tim Manns excellent X-Windows UNIX emulator xtrs. Sdltrs is a Radio Shack TRS-80 Model I/III/4/4P emulator for Macintosh OSX, Windows, and Linux.For my purposes, I want to write some programs in a cross-assembler or cross-compiler environment and will just load the files to try them out. You really can’t save any information back to the Windows filesystem, but that’s okay. The emulator I’m currently using under Windows is trs80gp which can be found here:I invoke the emulator with the command-line parameters -m1 to force Model I emulation and -na for non-authentic display.While trs80gp does not support any of the Disk-Operating-Systems of yesteryear, it does provide a menu option that will load /CMD executable files and BASIC files. I could see some control-codes and such, but my initial stab at trying to interpret them was not successful. That routine fills the video memory with the all-white character (191) and then returns.I have several /CMD images of games that I have on cassette and began looking through them. In order to do that, I was going to have to determine how to convert a machine-image file into a /CMD file.As a test program, I would use the example routine I published in my post. I chose Pasmo because of the -d option which shows an assembly listing on the standard output device.I would like to be able to package up anything I write into a standard /CMD file so that it can be used with other emulators or on the real hardware itself. The trs80gp site references ZMac which sounds like a great editor, but it doesn’t appear to compile in its current form under Windows.Like some of the others I tried, Pasmo basically generates a binary machine-image file. ![]() However some of the /CMD files in my possession use a value of two in the length byte and seem to have a payload bigger than two bytes in length.The article further explains that each loadable block of data first contains a load-address and states that zero and one are special values that indicate a two-byte load-address will be followed by 254 and 255 bytes of data respectively. The length byte in many of my /CMD files was zero, which I correctly assumed would yield a 256-byte block. While number of my /CMD files parsed correctly just fine, some did not.Roy explains that the 01 record indicates a loadable block of binary data. An unsigned short integer must be 16-bits in width in order for the program below to run correctly.// Dump the record information for a TRS-80 /CMD// Copyright (c) 2009, 2015 by James K. I’ll tinker later and see how the emulators load a record with a length value of three.I should state that my readcmd program is dependent on the Intel representation of a 16-bit integer ( Least Significant Byte followed by Most Significant Byte ). I have seen a small block with a length of four and the payload that follows the load-address is four bytes in length. The value three is a complete mystery to me. The values zero, one, and two are then used for machine-images of size 254, 255, and 256 respectively. Get minecraft for mac free 2017I need to create a load-record that accommodates fifteen plus two bytes for the load address. Address 17129 looks to be the spot where BASIC begins, but I’ve never owned a DOS on a Model I, so I don’t know if that address can change.I noticed that a lot of the games I have begin at address 6C00H, so I chose that as the starting-address for my program.Here is the slightly modified source code from my prior post:My load-module is fifteen bytes in size. Now that I have a way to verify the correctness of a /CMD file, it’s time to try and build my own.I really can’t remember where the first bytes of free memory really start on a Model I. You’ll notice a break out of the main input loop when readcmd encounters this record.My readcmd program was able to parse through all of the /CMD files in my possession. I assume that most /CMD loaders halt interpretation of the file after the 02 record is encountered. ![]() )In the near future, I would like to write a program that will convert a larger memory-image file ( such as the one produced by Pasmo ) into a /CMD file.The source and EXE files for readcmd can be found here, along with the source and /CMD file for the fill program.
0 Comments
Leave a Reply. |
AuthorDerek ArchivesCategories |