Justin Payne Posted March 4, 2016 Share Posted March 4, 2016 I'd like to start doing some assembly programming but my Model 3 is packed away so I'd like to do it one my PC and then test it out on an emulator. I saw some software out there but I figured before I started to struggle trying to find the right program, I figured I'd go the source. What is the best, and free, solution to accomplish this? Quote Link to comment Share on other sites More sharing options...
George Phillips Posted March 4, 2016 Share Posted March 4, 2016 I'd like to start doing some assembly programming but my Model 3 is packed away so I'd like to do it one my PC and then test it out on an emulator. I saw some software out there but I figured before I started to struggle trying to find the right program, I figured I'd go the source. What is the best, and free, solution to accomplish this? Having built the trs80gp emulator and heavily modified zmac I can't speak without bias, but I do think they make a pretty good pair for TRS-80 development on Windows. trs80gp: http://members.shaw.ca/gp2000/trs80gp.html zmac: http://members.shaw.ca/gp2000/zmac.html I tend to run things on the command line. I'll edit my Z-80 source, assemble it with "zmac source.z" and then run it with "trs80gp zout\source.cmd". Repeat until done. trs80gp has a little debugger built in and some profiling and tracing tools as well. And since printer output is automatically routed to a "trs80-printer.txt" file you can use "out ($f8),a" for simple "printf"-style debugging, too. My hacked zmac accepts a pretty wide range of assembler syntax and very good macro support. If you're keen on it, ask me about getting the latest version of trs80gp which features crude but helpful source-level debugging. Quote Link to comment Share on other sites More sharing options...
Justin Payne Posted March 5, 2016 Author Share Posted March 5, 2016 Well, heck. My searches never found your site. I will be looking into this further, even if your opinion of your software is bias. So far the only emulator for the TRS-80 model 3 I've run is on MESS and it had some room for improvement. I'll definitely give yours a shot. Thanks much for the suggestion and I'll be in touch soon after I get a better feel for it. Oh, wait. you did say, "Ask me about getting the latest version of the TRS80gp" so...hey, how can I get the latest version of the TRS80gp? I hear it that it's helpful with source-level debugging but it's features are somewhat crude. Quote Link to comment Share on other sites More sharing options...
Justin Payne Posted March 5, 2016 Author Share Posted March 5, 2016 So, did the reading thing and I see you call out some limitations like, "No disk support". Idealy, what would be the best option was to be able to develop in a modern IDE (Eclipse), using a plug-in like WUDSN, and then just launch the emulator with code from the IDE. Of course, that's not possible with your emulator so what would be the process for me to code in windows and then load that code into your emulator. If I had to take a guess, what I'll really need to do is code in your emulator using some Assembler application. Am I waaaay off base? Quote Link to comment Share on other sites More sharing options...
George Phillips Posted March 6, 2016 Share Posted March 6, 2016 So, did the reading thing and I see you call out some limitations like, "No disk support". Idealy, what would be the best option was to be able to develop in a modern IDE (Eclipse), using a plug-in like WUDSN, and then just launch the emulator with code from the IDE. Of course, that's not possible with your emulator so what would be the process for me to code in windows and then load that code into your emulator. If I had to take a guess, what I'll really need to do is code in your emulator using some Assembler application. Am I waaaay off base? That just means that version can't emulate floppy disk drives. Unless your program wants to read or write files it doesn't matter. trs80gp can still load a program which serves well enough for games, demos and such. I don't know much about WUDSN, but it does look it could be used to drive zmac and trs80gp, though it might not have the fancy editor features it does for 6502 programming. Here's a more explicit example. Create a file called "fill.txt" and put in this code: org 32000 start: di ld hl,15360 ld de,15360+1 ld bc,1024-1 ld (hl),191 ldir jr $ ; loop forever end start Now assemble it: zmac fill.txt And then you can run it: trs80gp zout\fill.cmd trs80gp will come up and the screen will be filled will all white pixels. Quote Link to comment Share on other sites More sharing options...
+sm3 Posted March 20, 2016 Share Posted March 20, 2016 There is also the emulators and development tools by Matthew Reed: http://www.trs-80emulators.com/#DevelopmentTools While there is no IDE for it like Eclipse, you can just use your favorite text editor or something to build your source. Only the registered version allows you to interact directly with virtual disk files, however, his TRStools software allows you to insert files, create virtual disks etc.. so the limitation isn't that bad to me. I went ahead and licensed my copy though. I wanted to encourage him to continue to make and support this software. www.trs-80emulators.com/ Quote Link to comment Share on other sites More sharing options...
Justin Payne Posted March 27, 2016 Author Share Posted March 27, 2016 (edited) So, what does, "File too short" mean? I got that error when I ran the following code. org 32000 ld bc,64 ld hl,15360; Screen start ld de, 21H Loop: ldi ; 16x LDI ldi ldi ldi ldi ldi ldi ldi ldi ldi ldi ldi ldi ldi ldi ldi jp pe,Loop ; Loop until bc = zero end Loop Edited March 27, 2016 by Justin Payne Quote Link to comment Share on other sites More sharing options...
George Phillips Posted March 28, 2016 Share Posted March 28, 2016 So, what does, "File too short" mean? I got that error when I ran the following code. I assume you got that error from trs80gp? It means that the file it tried to load ended unexpectedly. For example, a .cmd file that has just said to load 256 bytes of data but there is not that much left in the file. trs80gp can't load Z-80 assembly directly so I'd need to know the command you issued to trs80gp and how you assembled the source code. Quote Link to comment Share on other sites More sharing options...
Justin Payne Posted March 28, 2016 Author Share Posted March 28, 2016 I was just using that zmac command above. In fact, your example worked like a charm. That's when i started playing around and got the error message that I had no explaination for. I think the code I wrote looks right but I'm new to the z80. Quote Link to comment Share on other sites More sharing options...
George Phillips Posted March 30, 2016 Share Posted March 30, 2016 I'll need some explicit steps. I've tried several ideas but cannot reproduce what you're seeing. You will want to add a " jr $" after the "jp pe,loop" so that the Z-80 infinite loops there rather than running off into uninitialized memory. With that fix the code copies 64 bytes from the top of the screen to memory locations 0x21 .. 0x21 + 63. I don't imagine that's what you intended to do. Quote Link to comment Share on other sites More sharing options...
Justin Payne Posted March 30, 2016 Author Share Posted March 30, 2016 Ok. I'll get you those steps tonight and I think you are right that what the code is doing is not what I intended to do. I'll reanalyze that as well. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.