6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Mon May 13, 2024 3:45 am

All times are UTC




Post new topic Reply to topic  [ 43 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject: Re: SUPERMON 816 V1
PostPosted: Wed Apr 30, 2014 5:33 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8182
Location: Midwestern USA
Dr Jefyll wrote:
BigDumbDinosaur wrote:
some M/L monitor functions execute code snippets in RAM
'kay, that makes sense. Given that peculiarity (specific to the POC), you'd need some way to mask the non-maskable interrupt... except during times you're sure it's the test code whose opcode you're about to fetch.

The single-step circuitry would have to know the address range in which single-stepping is (or is not) to occur. I never fully fleshed out the concept, mainly because it seemed like a lot of work to implement something that would at best only get intermittent use.

Quote:
Hmph! :? It's remarkable that you're willing to tell us a technique deployed by MOS Technology and used by thousands of KIM-1 owners wouldn't work. KIM-1 is a different context than POC, but your comments about the need for logic analyzers and 'scopes have no bearing in either case -- you don't seem to have grasped the point, and were perhaps talking about something else entirely (maybe your "circuit to do it with POC at one time, but it wasn't trivial").

I never said that the KIM technique wouldn't work. Your description didn't describe how the KIM went about the implementation, and only mentioned a gate and a switch. (Pardon me for getting up my Irish.) With just those two items, several different single-step methods could be employed, none of which in themselves would reveal what the MPU was doing.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject: Re: SUPERMON 816 V1
PostPosted: Wed Apr 30, 2014 5:52 am 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3354
Location: Ontario, Canada
BigDumbDinosaur wrote:
I never said that the KIM technique wouldn't work. Your description didn't describe how the KIM went about the implementation, and only mentioned a gate and a switch. (Pardon me for getting up my Irish.) With just those two items, several different single-step methods could be employed, none of which in themselves would reveal what the MPU was doing.


Here is the bulk of my first post in this thread, part of which you quoted.
I wrote:
Same here. But the hardware to support it is minimal -- basically a NAND gate and a SPST switch. Of course even that could be a problem on an EPCB Proto-Pro board. In case anyone's interested, there's further info here. For '816 you'd need a 3-input NAND (not 2) to accept VPA and VDA instead of SYNC.

You seem not to have noticed the link I provided. But you were willing to say the idea would halt the '816 on each opcode fetch without doing anything else. Can I be blamed for concluding you were too hasty?

cheers
Jeff

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
 Post subject: Re: SUPERMON 816 V1
PostPosted: Thu May 01, 2014 12:37 am 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1373
The VICMON cartridge has the same basic features and some for single step execution (Walk command), but is implemented in software. It also allows you to set/remove breakpoints (B and RB) and a Quicktrace command (Q) which would slowly run thru code. Another nice feature was the number command (N) to change absolute addresses when relocating code. I used this to make a soft-copy of the VICMON monitor at different RAM addresses so I could relocate it and save the new version(s) to diskette. It also allowed a virtual page zero as the VIC had almost no free space left there. I still have a running VIC-20 and the VICMON cartridge which used 4K addressed at $6000... and I still use it on occasion as it's an easy debug tool. Not sure if anyone ever got around to reverse engineering it, but I did notice one space saving coding feature which used two bytes to store each of the three character nmemonics. It used 5-bits per character and a routine to convert each pair of bytes to the three byte nmemonic for displaying.

Has anyone seen a code listing for the old VICMON cartridge? I did find a link to the manual scanned in as images, so you can see how each of the commands are used.

http://www.geocities.ws/rmelick/manual_02.html

I later moved up to the C64 and bought their macro assembler/linker/editor package which also featured the same monitor code with two versions at different addresses ($8000 and $C000). Overall, a decent dev package for the $20 it cost and I later wrote a DOS-like command shell which was loaded at the autostart block ($8000). It was contained in about 4K of code and I put a monitor version in the extra 4K code at $9000. I used this setup for years for writing 6502 code. I still have a working C64 setup with both 1541 and 1581 drives which I fire up once in a while.

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
 Post subject: Re: SUPERMON 816 V1
PostPosted: Thu May 01, 2014 2:24 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8182
Location: Midwestern USA
floobydust wrote:
The VICMON cartridge has the same basic features and some for single step execution...but I did notice one space saving coding feature which used two bytes to store each of the three character nmemonics. It used 5-bits per character and a routine to convert each pair of bytes to the three byte nmemonic for displaying.

Funny how that mnemonic technique gets around. Here's the mnemonic table from Supermon 816:
Code:
;   sorted encoded mnemonics...
;
mne_xba  =$10f2                ;XBA
mne_lda  =$115a                ;LDA
mne_pea  =$11a2                ;PEA
mne_pha  =$1262                ;PHA
mne_pla  =$1362                ;PLA
mne_bra  =$14c6                ;BRA
mne_ora  =$14e0                ;ORA
mne_sta  =$1568                ;STA
mne_txa  =$166a                ;TXA
mne_tya  =$16aa                ;TYA
mne_phb  =$1a62                ;PHB
mne_plb  =$1b62                ;PLB
mne_trb  =$1cea                ;TRB
mne_tsb  =$1d2a                ;TSB
mne_sbc  =$20e8                ;SBC
mne_bcc  =$2106                ;BCC
mne_adc  =$2144                ;ADC
mne_tdc  =$216a                ;TDC
mne_dec  =$218a                ;DEC
mne_sec  =$21a8                ;SEC
mne_clc  =$2348                ;CLC
mne_inc  =$23d4                ;INC
mne_tsc  =$252a                ;TSC
mne_bvc  =$25c6                ;BVC
mne_tcd  =$292a                ;TCD
mne_sed  =$29a8                ;SED
mne_phd  =$2a62                ;PHD
mne_cld  =$2b48                ;CLD
mne_pld  =$2b62                ;PLD
mne_and  =$2bc4                ;AND
mne_xce  =$3132                ;XCE
mne_bne  =$33c6                ;BNE
mne_wai  =$50b0                ;WAI
mne_pei  =$51a2                ;PEI
mne_sei  =$51a8                ;SEI
mne_cli  =$5348                ;CLI
mne_bmi  =$5386                ;BMI
mne_rti  =$5566                ;RTI
mne_phk  =$6262                ;PHK
mne_brk  =$64c6                ;BRK
mne_jml  =$6b96                ;JML
mne_rol  =$6c26                ;ROL
mne_bpl  =$6c46                ;BPL
mne_brl  =$6cc6                ;BRL
mne_asl  =$6d04                ;ASL
mne_jsl  =$6d16                ;JSL
mne_rtl  =$6d66                ;RTL
mne_wdm  =$7170                ;WDM
mne_mvn  =$7ddc                ;MVN
mne_rep  =$89a6                ;REP
mne_sep  =$89a8                ;SEP
mne_php  =$8a62                ;PHP
mne_plp  =$8b62                ;PLP
mne_cmp  =$8b88                ;CMP
mne_jmp  =$8b96                ;JMP
mne_cop  =$8c08                ;COP
mne_nop  =$8c1e                ;NOP
mne_stp  =$8d68                ;STP
mne_mvp  =$8ddc                ;MVP
mne_beq  =$9186                ;BEQ
mne_per  =$99a2                ;PER
mne_eor  =$9c0c                ;EOR
mne_ror  =$9c26                ;ROR
mne_jsr  =$9d16                ;JSR
mne_lsr  =$9d1a                ;LSR
mne_bcs  =$a106                ;BCS
mne_tcs  =$a12a                ;TCS
mne_rts  =$a566                ;RTS
mne_bvs  =$a5c6                ;BVS
mne_txs  =$a66a                ;TXS
mne_bit  =$aa86                ;BIT
mne_clv  =$bb48                ;CLV
mne_tax  =$c8aa                ;TAX
mne_ldx  =$c95a                ;LDX
mne_dex  =$c98a                ;DEX
mne_phx  =$ca62                ;PHX
mne_plx  =$cb62                ;PLX
mne_inx  =$cbd4                ;INX
mne_cpx  =$cc48                ;CPX
mne_tsx  =$cd2a                ;TSX
mne_stx  =$cd68                ;STX
mne_tyx  =$ceaa                ;TYX
mne_tay  =$d0aa                ;TAY
mne_ldy  =$d15a                ;LDY
mne_dey  =$d18a                ;DEY
mne_phy  =$d262                ;PHY
mne_ply  =$d362                ;PLY
mne_iny  =$d3d4                ;INY
mne_cpy  =$d448                ;CPY
mne_sty  =$d568                ;STY
mne_txy  =$d66a                ;TXY
mne_stz  =$dd68                ;STZ

Structurally, it's the same as used in the C-128 monitor, Supermon 64 and Supermon for PET/CBM machines, and has been attributed to Jim Butterfield. VICMON was a derivation of Supermon, so you know whence the idea came.

Aside from saving storage, the 3-for-2 encoding scheme can make mnemonic look-up run faster, as only two characters need to be compared, which is tailor-made to the 65C816 and its ability to atomically compare 16 bit values. As I have the table sorted in ascending order, I can locate any given mnemonic with a binary search. There are 92 mnemonics in the '816's assemble language and the worst-case binary search time on an ordered list is described as log2 (N), where N is the number of elements in the list. So no more than seven comparisons would need to be made to determine if a mnemonic entered during instruction assembly is valid.

A binary mnemonic search is an unnecessary luxury in a machine language monitor, as code assembly is manual and happens far faster than one can type. Ergo I ended up using a linear search in Supermon 816, as the resulting code takes up less space. However, in an assembler working with a source file, a binary or hashing search algorithm would be essential to getting the job done as quickly as possible.

Quote:
I later moved up to the C64 and bought their macro assembler/linker/editor package which also featured the same monitor code with two versions at different addresses ($8000 and $C000).

That was Supermon 64 with some cosmetic changes that Commodore shipped with MADS. The first version of the assembler had some sort of problem correctly parsing macros, but that was later fixed. I used MADS a lot before switching to the C-128 and the DEVPAK package.

Fred Bowen almost ported MADS to the C-128 to run in 128 mode, but abandoned the project when it was decided to port the VAX 11/780 6502 cross-assembler that Commodore had used to develop the 128's kernel. That assembler became the core of DEVPAK, along with the horrible editor that shipped with it. Like most DEVPAK users, I ended up using a different editor to write my source code and later on used Craig Bruce's ZED-128 editor, which although never fully completed, worked very well. Hedley Davis, the CBM programmer who spearheaded DEVPAK, was dismayed to find out that no one liked his editor (it was as unfriendly as a hungry lion) and dismissed all the critics as incompetents who had never worked with a real computer. I guess Commodore was just selling toys. :D

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject: Re: SUPERMON 816 V1
PostPosted: Thu Jul 10, 2014 5:45 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8182
Location: Midwestern USA
Supermon 816 now has a download link at my POC website. It's accessible through the DOWNLOADS page.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject: SUPERMON 816
PostPosted: Sat Dec 03, 2016 10:50 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8182
Location: Midwestern USA
I finally got around to publishing documentation for Supermon 816. Please see attached.

Attachment:
File comment: Supermon 816 Documentation
supermon816.pdf [489.16 KiB]
Downloaded 175 times

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject: Re: SUPERMON 816 V1
PostPosted: Sun Dec 04, 2016 9:38 am 
Offline

Joined: Mon Jan 07, 2013 2:42 pm
Posts: 576
Location: Just outside Berlin, Germany
Wow, looks great. Has anybody tried to get it running on the 265SXB yet?


Top
 Profile  
Reply with quote  
 Post subject: Re: SUPERMON 816 V1
PostPosted: Sun Dec 04, 2016 5:06 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8182
Location: Midwestern USA
scotws wrote:
Wow, looks great. Has anybody tried to get it running on the 265SXB yet?

Not that I've heard. Marco Demont (lordbubsy) has SuperMon 816 running on his home-brew '816 machine. He is the only user I know of at present.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject: Re: SUPERMON 816 V1
PostPosted: Tue Dec 06, 2016 9:37 am 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1929
Location: Sacramento, CA, USA
BigDumbDinosaur wrote:
floobydust wrote:
The VICMON cartridge has the same basic features and some for single step execution...but I did notice one space saving coding feature which used two bytes to store each of the three character nmemonics. It used 5-bits per character and a routine to convert each pair of bytes to the three byte nmemonic for displaying.

Funny how that mnemonic technique gets around ...

The earliest example I could find of that packing technique for a 6502 disassembler was in the September 1976 issue of Dr. Dobbs, by Woz, several months before the original PET was introduced. I am pretty sure that he invented the "RTS dispatch" technique as well, or at least the 6502 version of it.

Another example of the mighty Woz in action is his Apple ][ monitor ROM single-step, coded in 219 bytes starting at $FA43, and using no external hardware assist whatsoever.

In case it may have slipped your notice, I'm a bit of a Woz fanboy.

Mike B.


Top
 Profile  
Reply with quote  
 Post subject: Re: SUPERMON 816 V1
PostPosted: Tue Dec 06, 2016 8:02 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8182
Location: Midwestern USA
barrym95838 wrote:
In case it may have slipped your notice, I'm a bit of a Woz fanboy.

So we noticed. :lol:

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject: Re: SUPERMON 816 V1
PostPosted: Fri Dec 16, 2016 1:41 pm 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1207
Location: Soddy-Daisy, TN USA
barrym95838 wrote:
In case it may have slipped your notice, I'm a bit of a Woz fanboy.


As any engineer worth his weight in salt should be. I am also a huge fan of the Woz.

Another role model of mine would be Burrell Smith (who took inspiration from Woz).

_________________
Cat; the other white meat.


Top
 Profile  
Reply with quote  
 Post subject: Re: SUPERMON 816 V1
PostPosted: Sat Sep 12, 2020 7:26 pm 
Offline

Joined: Tue May 03, 2016 11:32 am
Posts: 41
I hate to resurrect an old/dead(?) topic, but this time...

I have "just" made the Supermon 816 work with my (prototype) 65816 SBC. I am using the CC65 environment and had to rewrite the source for the CA65 assembler. Oh boy, did I learn a lot (and what a refresher for my memory)

I also inserted the Intel Hex uploader by Ross Archer.

Thanks everyone for all the good and nice ideas/work/etc...


Top
 Profile  
Reply with quote  
 Post subject: Re: SUPERMON 816 V1
PostPosted: Sat Sep 12, 2020 8:12 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8182
Location: Midwestern USA
xjmaas wrote:
I hate to resurrect an old/dead(?) topic, but this time...

I have "just" made the Supermon 816 work with my (prototype) 65816 SBC. I am using the CC65 environment and had to rewrite the source for the CA65 assembler. Oh boy, did I learn a lot (and what a refresher for my memory)

I also inserted the Intel Hex uploader by Ross Archer.

Thanks everyone for all the good and nice ideas/work/etc...

Good to hear it.

BTW, attached is the most recent documentation for Supermon 816.

Attachment:
File comment: Supermon 816 Documentation
supermon816.pdf [488.71 KiB]
Downloaded 91 times

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject: Re: SUPERMON 816 V1
PostPosted: Sat Sep 12, 2020 8:24 pm 
Offline

Joined: Tue May 03, 2016 11:32 am
Posts: 41
BigDumbDinosaur wrote:

BTW, attached is the most recent documentation for Supermon 816.
[/color]
Attachment:
supermon816.pdf


I see in the documentation that an "upload" function is already available? I couldn't find one in the source/sample?
(Is there an updated version of the source available, somewhere?)

(I haven't updated my site yet with the latest info/sources/etc, but I will try to do so soon)


Top
 Profile  
Reply with quote  
 Post subject: Re: SUPERMON 816 V1
PostPosted: Sat Sep 12, 2020 8:34 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8182
Location: Midwestern USA
xjmaas wrote:
BigDumbDinosaur wrote:

BTW, attached is the most recent documentation for Supermon 816.
[/color]
Attachment:
supermon816.pdf


I see in the documentation that an "upload" function is already available? I couldn't find one in the source/sample?
(Is there an updated version of the source available, somewhere?)

(I haven't updated my site yet with the latest info/sources/etc, but I will try to do so soon)

From where did you download the source code?

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 8 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: