Hi Chris. I love to follow your videos as you improve your emulator and it's been an awesome journey. It strikes me how we all had to solve similar issues and problems, yet each of us used a slightly different approach. For example, I added the ability to read binary files very early on my emulator, because I wanted to test it before I was able to emulate disk or tape. However, I am using DOS 3.3 binary files convention, which means that the address and length of the binary are stored in the first 4 bytes of the file. Meaning, you don´t need to provide an address. I then can export any binary file from a dsk image and run it directly from the PC. With this technique, I was able to create a small library of games that run of a single binary file and provide instant loading on the emulator. While it is easy to manually add these 4 bytes to any file, you can actually create them with a bsave command on your emulator. the A$ parameter contains the starting address and the L$ contains the length. In your sound example, you can use bsave A$2000, L$FF (or whatever size in bytes you have). Anyways, cool to see how you did this and the reasons as well. Who would imagine we still can learn 6502 assembly on a CS course?
Also, as an idea, it may be possible to detect if a file is using the DOS 3.3 convention by using the length information. Unfortunately, at least in LINUX, the OS reported file size will be in terms of blocksize, so a file will appear bigger than it really is. But if you find that file size is similar to file length (bytes 3 and 4 of the file), where any differences are smaller than blocksize, and that the contents of the file are zero after length bytes, than you can assume this is a DOS 3.3 binary file. For these files, it saves you the need of typing a starting address, and also protects you from typing the wrong starting address.
Ha ha, me too. I did this a couple of months ago, and I forgot that I had used 0x. I'm using $ all throughout the debugger panels, so maybe I'll switch it to $.
Thanx for this video! I'm trying to use your assembler to create the code in VSCode, create the .BIN file, and open it in your emulator. Working great UNTIL ....... Pg 49 of your book (AL07-SAMPLE DATA PROGRAM) tries to introduce hex DATA using the 'HEX' opcode which your assembler throws an error on. What am I to do?!?!
Well, that's an interesting problem. I didn't intend for the assembler in my apple2ts emulator to replace a full featured assembler like Merlin. I just added the assembler in apple2ts to make it easier to do some simple programs. I can certainly think about adding support for HEX. But note that "HEX" isn't a 6502 opcode - it's just something made up by assembler programs (like Merlin) to make it easier to input data.
hi. i used to use a LISA assembler back in college. now i can't find install files for it for Apple DOS. please.make a video showing where to get the Merlin assembler and install it in Apple DOS or cp/m
You can download the Merlin assembler here: archive.org/details/MerlinProMacroAssembler And there are plenty of people on the Facebook Apple II Enthusiasts or Lisa page who would be happy to help you.
Yes, sorry, should have spelled that out. It's TypeScript, which is just a fancier version of JavaScript with strict variable typing and other nice features.
Hi Chris. I love to follow your videos as you improve your emulator and it's been an awesome journey. It strikes me how we all had to solve similar issues and problems, yet each of us used a slightly different approach. For example, I added the ability to read binary files very early on my emulator, because I wanted to test it before I was able to emulate disk or tape. However, I am using DOS 3.3 binary files convention, which means that the address and length of the binary are stored in the first 4 bytes of the file. Meaning, you don´t need to provide an address. I then can export any binary file from a dsk image and run it directly from the PC. With this technique, I was able to create a small library of games that run of a single binary file and provide instant loading on the emulator.
While it is easy to manually add these 4 bytes to any file, you can actually create them with a bsave command on your emulator. the A$ parameter contains the starting address and the L$ contains the length. In your sound example, you can use bsave A$2000, L$FF (or whatever size in bytes you have).
Anyways, cool to see how you did this and the reasons as well. Who would imagine we still can learn 6502 assembly on a CS course?
Also, as an idea, it may be possible to detect if a file is using the DOS 3.3 convention by using the length information. Unfortunately, at least in LINUX, the OS reported file size will be in terms of blocksize, so a file will appear bigger than it really is. But if you find that file size is similar to file length (bytes 3 and 4 of the file), where any differences are smaller than blocksize, and that the contents of the file are zero after length bytes, than you can assume this is a DOS 3.3 binary file. For these files, it saves you the need of typing a starting address, and also protects you from typing the wrong starting address.
Wow!! Amazing work and the best emulator! Thanks for sharing
Thanks Rudy!
Mixed feelings about specifying the load address with an “0x” prefix rather than “$”
Ha ha, me too. I did this a couple of months ago, and I forgot that I had used 0x. I'm using $ all throughout the debugger panels, so maybe I'll switch it to $.
Thanx for this video!
I'm trying to use your assembler to create the code in VSCode, create the .BIN file, and open it in your emulator.
Working great UNTIL .......
Pg 49 of your book (AL07-SAMPLE DATA PROGRAM) tries to introduce hex DATA using the 'HEX' opcode which your assembler throws an error on.
What am I to do?!?!
Well, that's an interesting problem. I didn't intend for the assembler in my apple2ts emulator to replace a full featured assembler like Merlin. I just added the assembler in apple2ts to make it easier to do some simple programs. I can certainly think about adding support for HEX. But note that "HEX" isn't a 6502 opcode - it's just something made up by assembler programs (like Merlin) to make it easier to input data.
I really should add this to my emulator but I'm currently struggling to get Mockingboard emulation working before your video on it comes out.
It's a race! But don't worry, I'm pretty slow on making videos...
hi. i used to use a LISA assembler back in college. now i can't find install files for it for Apple DOS. please.make a video showing where to get the Merlin assembler and install it in Apple DOS or cp/m
You can download the Merlin assembler here: archive.org/details/MerlinProMacroAssembler And there are plenty of people on the Facebook Apple II Enthusiasts or Lisa page who would be happy to help you.
TS....TypeScript?
Yes, sorry, should have spelled that out. It's TypeScript, which is just a fancier version of JavaScript with strict variable typing and other nice features.