6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Nov 22, 2024 1:26 pm

All times are UTC




Post new topic Reply to topic  [ 58 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
PostPosted: Sun Jan 05, 2020 9:14 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
(Just in case you didn't see it, there's a collection of Apple 1 tape images here
https://www.scullinsteel.com/apple1/tapes/
)


Top
 Profile  
Reply with quote  
PostPosted: Sun Jan 05, 2020 9:32 am 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1949
Location: Sacramento, CA, USA
My best reason for checking out those tape images would be to ensure that my modifications don't interfere with the operation of any of the programs therein. In addition to expunging all the useless A2 screen code, I'm working on eliminating all the A2 cassette interface code and just hooking into the Apple 1 routines, since I have a feeling that the formats may be similar but not 100% compatible (the Apple 1 cassette interface appears to have 256 bytes of ROM at $C1xx that I should be able to utilize).

[Edit: Yeah, the tape formats are somewhat different: aside from slight timing differences, the A2 has a primitive 8-bit checksum for error detection and the A1 has no error detection at all. The A1 ROM routines can't be called in situ (because they don't RTS), but I replaced the A2 subroutines with slightly-modified A1 routines. After I get all of my modifications debugged as well as I can, I'm going to try squishing everything into 2 (or possibly 1.75)KB.]

_________________
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!

Mike B. (about me) (learning how to github)


Top
 Profile  
Reply with quote  
PostPosted: Tue Jan 07, 2020 10:04 am 
Offline
User avatar

Joined: Tue Mar 21, 2017 6:57 pm
Posts: 81
barrym95838 wrote:
mvk wrote:
It seems that it came from a ROM dump with patches on top to bind to Apple-1. It makes sense one would do it that way without better tools. There's quite a bit of stuff to be scrubbed indeed. I'm tempted.

I'm doing everything manually at the moment. I'll post my progress soon, but you probably won't be able to feed my work directly into any assembler because ... well, you'll see ...

I'll wait to see what you cook up! Would you announce in case you stall, because then I will take over. Having said that, for my purpose (="running the mini-assembler in the Gigatron's Apple-1 emulation"), I don't necessarily need to integrate the rest of the Apple-2 monitor. Actually, I will likely strip that because of ROM space pressure, which is part of the reason I'm less interested in KRUSADER. So for me that would be a relatively small project of 2 to 3 evenings. Being able to type lines of mnemonics and getting them translated to memory is icing on the Gigatron's 6502 emulation cake.


Top
 Profile  
Reply with quote  
PostPosted: Tue Jan 07, 2020 4:16 pm 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1949
Location: Sacramento, CA, USA
mvk wrote:
I'll wait to see what you cook up! Would you announce in case you stall, because then I will take over.

You know we too well, sir! I will do you the courtesy of sharing my attempt before this weekend, ready or not.

Quote:
Having said that, for my purpose (="running the mini-assembler in the Gigatron's Apple-1 emulation"), I don't necessarily need to integrate the rest of the Apple-2 monitor. Actually, I will likely strip that because of ROM space pressure, which is part of the reason I'm less interested in KRUSADER. So for me that would be a relatively small project of 2 to 3 evenings. Being able to type lines of mnemonics and getting them translated to memory is icing on the Gigatron's 6502 emulation cake.

Understood. Woz made some interesting choices when he coded that monitor ROM, and I can't help but feel that he was going so fast that he didn't have time to pause and reflect on some of those choices. Anyway, I already eliminated "ctrl-K", "ctrl-P", "N" and "I" because !APPLE1, but you are interested in mini-assemble, "L", ".", ":", and "G", and you're not interested in "S", "T", "R", "W", "ctrl-Y", "ctrl-E", "ctrl-B", "ctrl-C", "M", "V", "+" and "-", correct?

_________________
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!

Mike B. (about me) (learning how to github)


Top
 Profile  
Reply with quote  
PostPosted: Tue Jan 07, 2020 7:43 pm 
Offline
User avatar

Joined: Tue Mar 21, 2017 6:57 pm
Posts: 81
Indeed. Mini-assembler is disjoint from the rest of the monitor. '!$' feels so weird.

barrym95838 wrote:
but you are interested in mini-assemble, "L", ".", ":", and "G", and you're not interested in "S", "T", "R", "W", "ctrl-Y", "ctrl-E", "ctrl-B", "ctrl-C", "M", "V", "+" and "-", correct?


Even less :-). WozMon itself already does examine and deposit with its own '.' and ':'.

I plan to catch Ctrl-C and map it to a jump to $ff00, by means of a virtual interrupt outside v6502 land. That means that it is easy to drop back into WozMon.

'!addr:' (colon!) for assemble and '!space' for assembling the next one are central for the experience.

'*addrL' for disassemble is a bit nicer than the DrDobbs method, which is setting an address in ZP and then jumping to the disassembler. But it may be the only interesting *-command, and that becomes weird as well. Perhaps we should change it to '!addrL' for this purpose.

'*addrG' is only nice if code can return with RTS. WozMon-R doesn't do that. If 'G' also doesn't have that, there's no point. But like L, it might make more sense to bring this under the !-prompt as '!addrG'

Summarising, I'm looking for no more than this:

Code:
!addrL
!addr:mnemonic...
! mnemonic...
!addrG


Last edited by mvk on Tue Jan 07, 2020 7:58 pm, edited 2 times in total.

Top
 Profile  
Reply with quote  
PostPosted: Tue Jan 07, 2020 7:57 pm 
Offline

Joined: Tue Oct 02, 2018 4:22 am
Posts: 48
barrym95838 wrote:
I plan to catch Ctrl-C and map it to a jump to $ff00, by means of a virtual interrupt outside v6502 land. That means that it is easy to drop back into WozMon.


I had a similar idea. My uart service routine checks for ctrl-c and ctrl-z. If it matches the uart buffers are cleared and it jumps to warm boot or cold boot respectively.


Top
 Profile  
Reply with quote  
PostPosted: Tue Jan 07, 2020 9:39 pm 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1949
Location: Sacramento, CA, USA
Okay, got it. I'll set it up so that something like FEEER (or 0EEER) from WOZMON drops you to the "!" prompt, and you can assemble and do "L" and "G" from there, but you "CTRL-C" or F800G back to WOZMON for deposit and examine. I'm thinking that I may be able to fit the code and tables inside 768 bytes, but I won't know for sure until I try.

[Edit: well, "G" is gone, replaced with "Q" (or whatever other char you prefer). I have ":", " ", "L" and "Q" ... ":" must be preceded by an address, " " and "Q" must be at the head of the input, and "L" can go either way.]

_________________
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!

Mike B. (about me) (learning how to github)


Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 08, 2020 10:54 pm 
Offline
User avatar

Joined: Tue Mar 21, 2017 6:57 pm
Posts: 81
After 44 years, the mini-assembler is still under active development!

Will the disassembly automatically go to the next bunch of instructions when repeating the 'L' command without address? Both the Apple II version and the DrDobbs version do this. The latter with WozMon-R of course.


Top
 Profile  
Reply with quote  
PostPosted: Thu Jan 09, 2020 2:47 am 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1949
Location: Sacramento, CA, USA
mvk wrote:
After 44 years, the mini-assembler is still under active development!

Will the disassembly automatically go to the next bunch of instructions when repeating the 'L' command without address? Both the Apple II version and the DrDobbs version do this. The latter with WozMon-R of course.

Yes. 'L's won't be able to string together on one command line like the Apple ][, but each successive naked 'L' will disassemble the next 20 instructions, in the same way that ' ' assembles the next instruction.

[Edit: well, 768 bytes is off the table, but my first raw translation attempt is complete and weighs in at a not-so-heavy 900 bytes total for everything, including all the mnemonic and address mode tables for the NMOS instruction set. Getting ready to throw some tests their way ... I'm going to use AppleWin on "original Apple ][" setting for debugging ...]

[Edit 2: ':' and ' ' are now synonyms, and an empty line exits to WozMon. It's down to 874 bytes, but still needs debugging ... I'm done for the night ...]

_________________
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!

Mike B. (about me) (learning how to github)


Top
 Profile  
Reply with quote  
PostPosted: Sat Jan 11, 2020 9:04 am 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1949
Location: Sacramento, CA, USA
Well, it was a rewarding journey! I'll fill in the details of the levels of my insanity later, and you all are invited to laugh at me for the ridiculously obtuse manner in which I did it, BUT I DID IT!

The .txt file is actually a manually-created .lst file that has been hand-crafted so that it can be copied and pasted directly into an original Apple ][ monitor (if you don't use the original you may wind up with some zero-page conflicts). Please ignore the many beeps while pasting (I was on AppleWin, so I cranked up the speed to where it was just a light high-frequency buzz). From the Apple ][ monitor, 3F00G into WozMon, and play around with it for a minute. When you're ready for extended fun, 3DDDR into the extended '!' prompt. An empty line returns you to WozMon, but before you go, try a 300L or a 3000:LDA 9876,Y to see how it goes!

Attachment:
xwoz (2).txt [26.22 KiB]
Downloaded 106 times


Cheers! It's past my bedtime again ...

[Edit: my second upload was slightly corrupted for some unknown reason. I repaired it and re-uploaded. My apologies.]
[Edit2: I replaced my upload above with another updated (and smaller) version.]

_________________
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!

Mike B. (about me) (learning how to github)


Last edited by barrym95838 on Sun Jan 19, 2020 9:42 am, edited 4 times in total.

Top
 Profile  
Reply with quote  
PostPosted: Sat Jan 11, 2020 4:12 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
> I DID IT!
Splendid, and well done! I'm not in a position to test it right now...


Top
 Profile  
Reply with quote  
PostPosted: Sat Jan 11, 2020 5:23 pm 
Offline
User avatar

Joined: Tue Mar 21, 2017 6:57 pm
Posts: 81
Hurray! This will be no more than 1 evening to transpose to the Gigatron for testing.

P.S: I would certainly not forget to include Allen Baum in the credits. It is originally his code. Woz made it smaller.


Top
 Profile  
Reply with quote  
PostPosted: Sat Jan 11, 2020 7:11 pm 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1949
Location: Sacramento, CA, USA
Ah, will do, Marcel. I'm at work right now, but I'll take care of the credits tonight and re-submit. I am pretty sure that there are a few more bytes to shave, and the zero-page variables can be overlapped a little better, but that's a future endeavor ... along with including 'c02 functionality!

Did you or anyone else find any bugs yet? I was dead tired when I got it going late last night, and I couldn't check it out thoroughly.

[Edit: the file is updated. Work is a bit slow today.]

_________________
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!

Mike B. (about me) (learning how to github)


Top
 Profile  
Reply with quote  
PostPosted: Sat Jan 11, 2020 11:02 pm 
Offline
User avatar

Joined: Tue Mar 21, 2017 6:57 pm
Posts: 81
barrym95838 wrote:
Did you or anyone else find any bugs yet?

First I have to transcribe and relocate ZP for the TTL computer. Of course, I already have the disassembler and wozmon done from previous efforts, so it's only 250 extra bytes to be added. It doesn't help it's tax season over here. Still I expect results well before the end of coming week...


Top
 Profile  
Reply with quote  
PostPosted: Sun Jan 12, 2020 6:05 am 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1949
Location: Sacramento, CA, USA
I trimmed 25 more bytes of fat from the code, so it now weighs in at 625 bytes of instructions for the mini-assembler, disassembler and "mini-shell" (plus 222 bytes of tables and 28 bytes of WozMon code). I will test it a bit more carefully before I upload it.

Something is itching in the back of my head, and maybe you all can help me decide how to freely share my effort with the rest of the world. I obviously shouldn't try to license the code in its entirety because I didn't invent the internal algorithms ... any ideas?

[Edit: my trimmed code still has a bug or two, but I'll try to get it ironed out and upload it to replace the xwoz.txt file above.]

_________________
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!

Mike B. (about me) (learning how to github)


Last edited by barrym95838 on Tue Jan 14, 2020 3:59 pm, edited 4 times in total.

Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 58 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 22 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: