DREAM 6800 (now 6809) re-Creation

User avatar
epaell
Posts: 258
Joined: Mon Jan 08, 2024 10:06 pm
Location: Sydney

Re: DREAM 6800 (now 6809) re-Creation

Post by epaell »

Nice work!
User avatar
Editor
Posts: 388
Joined: Fri Nov 17, 2023 10:36 pm
Contact:

Re: DREAM 6800 (now 6809) re-Creation

Post by Editor »

djrm wrote: Sat Nov 15, 2025 10:47 pm Now sorted and I'm able to enter programs and even load and run invaders using Assis09, bit tricky to play with the tiny buttons though. What a sweet little system :-)
Awesome! Yes, you’ll definitely find the experience more enjoyable with Cherry MX key switches for your Hex Keypad.
djrm wrote: Sat Nov 15, 2025 10:47 pm There is probably scope for building Assis09 directly into the dream binary with some small modifications, but probably not really necessary.
It’s interesting what you mention about building-in ASSIST09.

I did actually start out in that direction, intending to make CHIPOS an extension to ASSIST09, and even intended to make the CHIPOS published subroutine calls an extension of the existing SWI address independent call method implemented by ASSIST09.

BUT, it then occurred to me that if I made ASSIST09 readily available, I’d be destroying the true 1979 experience that I intended for the re-creation.

However, you may note that I chose $F700 as the base for my fixed re-direct table for subroutine calls, primarily because I wanted to leave the contiguous top 2K space free (F800 - FFFF), for possibly rolling in ASSIST09 at a later date (or if someone else wants to). :geek:
User avatar
djrm
Posts: 191
Joined: Wed Aug 21, 2024 9:40 pm
Location: Rillington / UK
Contact:

Re: DREAM 6800 (now 6809) re-Creation

Post by djrm »

I had a quick look at the code and wondered why the jump table was out on its own like that, now I know.

Attached is a s record file of the life program from the dream newsletter No1
I ran it at 0xc800 and after pressing some buttons (0 seems to set it off) I get some patterns, it's life Greg, but not as we know it.
I don't know about living the dream, seems I need to learn how to debug chip-8 now!
Having a scrat around for a chip-8 disassembler.
Best regards, David.
https://www.youtube.com/shorts/kicxRIDlFfM
IMG_20251116_104328246_HDR.jpg

Code: Select all

S1230080E0A0E080F10A410F10B06A088A124A001096FA18108481148114F00A80048004A1
S12300A0A080D01310846F00D0118CF4D01100EEF20A600061006E0072FF420010846C0028
S12300C0A083D01184F0D01170FC20A6710420A6700420A6700420A671FC20A671FC20A67C
S12300E070FC20A670FC20A6700471044C0212024C0310FA34011202122E3401122E1202E2
S1230200108470044040710440406000312010BAA238FE1E61FCF1556E00A238FE1EF1658F
S1230220A080D0137E0231FC121AD01310B2A238FE1EF1557E021202000000000000000069
S9030000FC
User avatar
djrm
Posts: 191
Joined: Wed Aug 21, 2024 9:40 pm
Location: Rillington / UK
Contact:

Re: DREAM 6800 (now 6809) re-Creation

Post by djrm »

I found an online tool here: https://em.ulat.es/machines/Chip8/disassembler.php
and with a bit of editing of addresses afterwards made this listing:

Code: Select all

0080 : e0 a0       dc.b a0H      
0082 : e0 80       dc.b 80H      
0084 : f1 0a       ld @r, K      
0086 : 41 0f       skipneq v1, 0f
0088 : 10 b0       jp 0b0H       
008a : 6a 08       store va, 08H 
008c : 8a 12       and @r, v1    
008e : 4a 00       skipneq va, 00
0090 : 10 96       jp 096H       
0092 : fa 18       ld ST, @r     
0094 : 10 84       jp 084H       
0096 : 81 14       addc @r, v1   
0098 : 81 14       addc @r, v1   
009a : f0 0a       ld @r, K      
009c : 80 04       addc @r, v0   
009e : 80 04       addc @r, v0   
00a0 : a0 80       ld I, 080H    
00a2 : d0 13       drw @r, v1, 3H
00a4 : 10 84       jp 084H       
00a6 : 6f 00       store vf, 00H 
00a8 : d0 11       drw @r, v1, 1H
00aa : 8c f4       addc @r, vf   
00ac : d0 11       drw @r, v1, 1H
00ae : 00 ee       ret           
00b0 : f2 0a       ld @r, K      
00b2 : 60 00       store v0, 00H 
00b4 : 61 00       store v1, 00H 
00b6 : 6e 00       store ve, 00H 
00b8 : 72 ff       add v2, ffH   
00ba : 42 00       skipneq v2, 00
00bc : 10 84       jp 084H       
00be : 6c 00       store vc, 00H 
00c0 : a0 83       ld I, 083H    
00c2 : d0 11       drw @r, v1, 1H
00c4 : 84 f0       store @r, vf  
00c6 : d0 11       drw @r, v1, 1H
00c8 : 70 fc       add v0, fcH   
00ca : 20 a6       call 0a6H     
00cc : 71 04       add v1, 04H   
00ce : 20 a6       call 0a6H     
00d0 : 70 04       add v0, 04H   
00d2 : 20 a6       call 0a6H     
00d4 : 70 04       add v0, 04H   
00d6 : 20 a6       call 0a6H     
00d8 : 71 fc       add v1, fcH   
00da : 20 a6       call 0a6H     
00dc : 71 fc       add v1, fcH   
00de : 20 a6       call 0a6H     
00e0 : 70 fc       add v0, fcH   
00e2 : 20 a6       call 0a6H     
00e4 : 70 fc       add v0, fcH   
00e6 : 20 a6       call 0a6H     
00e8 : 70 04       add v0, 04H   
00ea : 71 04       add v1, 04H   
00ec : 4c 02       skipneq vc, 02
00ee : 12 02       jp 202H       
00f0 : 4c 03       skipneq vc, 03
00f2 : 10 fa       jp 0faH       
00f4 : 34 01       skipeq v4, 01H
00f6 : 12 02       jp 202H       
00f8 : 12 2e       jp 22eH       
00fa : 34 01       skipeq v4, 01H
00fc : 12 2e       jp 22eH       
00fe : 12 02       jp 202H       

0200 : 10 84       jp 084H       
0202 : 70 04       add v0, 04H   
0204 : 40 40       skipneq v0, 40
0206 : 71 04       add v1, 04H   
0208 : 40 40       skipneq v0, 40
020a : 60 00       store v0, 00H 
020c : 31 20       skipeq v1, 20H
020e : 10 ba       jp 0baH       
0210 : a2 38       ld I, 238H    
0212 : fe 1e       add I, @r     
0214 : 61 fc       store v1, fcH 
0216 : f1 55       cpy [I], v0-@r
0218 : 6e 00       store ve, 00H 
021a : a2 38       ld I, 238H    
021c : fe 1e       add I, @r     
021e : f1 65       cpy v0-@r, [I]
0220 : a0 80       ld I, 080H    
0222 : d0 13       drw @r, v1, 3H
0224 : 7e 02       add ve, 02H   
0226 : 31 fc       skipeq v1, fcH
0228 : 12 1a       jp 21aH       
022a : d0 13       drw @r, v1, 3H
022c : 10 b2       jp 0b2H       
022e : a2 38       ld I, 238H    
0230 : fe 1e       add I, @r     
0232 : f1 55       cpy [I], v0-@r
0234 : 7e 02       add ve, 02H   
0236 : 12 02       jp 202H       
now to work out what its doing ...
User avatar
Editor
Posts: 388
Joined: Fri Nov 17, 2023 10:36 pm
Contact:

Re: DREAM 6800 (now 6809) re-Creation

Post by Editor »

djrm wrote: Sun Nov 16, 2025 2:00 pm I found an online tool here: https://em.ulat.es/machines/Chip8/disassembler.php

Code: Select all

0084 : f1 0a       ld @r, K      
I'm awake! (on my side of the world). I think I'll have some breakfast, and then I'll take a look at "Life".

I'm not sure I understand that Disassembler's mnemonics, as (for the above code line), I'd expect something like:

Code: Select all

0084 : F10A      V1 = KEY      
i.e. Wait for a Key press and assign it to Variable 1.

But, I'll probably go the old school 1979 way, of first keying in the program (from Dreamer), saving it to tape, and then manually disassembling it.

Yeah, I know, I like punishing myself. But after all, I'm enjoying re-living how we did it in those early days, but sans pencil and paper (substituted with a spreadsheet!). :shock:
User avatar
djrm
Posts: 191
Joined: Wed Aug 21, 2024 9:40 pm
Location: Rillington / UK
Contact:

Re: DREAM 6800 (now 6809) re-Creation

Post by djrm »

Good morning, I'm going through the listing printout with a pencil taking notes, learning as I go. David.
User avatar
Editor
Posts: 388
Joined: Fri Nov 17, 2023 10:36 pm
Contact:

Re: DREAM 6800 (now 6809) re-Creation

Post by Editor »

djrm wrote: Sun Nov 16, 2025 8:58 pm Good morning, I'm going through the listing printout with a pencil taking notes, learning as I go. David.
So far, I've keyed it in, saved it to tape, and run. And.. I can confirm it's not Life as we know it!

I'm currently manually disassembling.

This is a good exercise, as there is of course every chance that I missed something on my 6809 CHIPOS conversion.
I'll admit that I haven't gone through and tested the operation of every CHIP-8 instruction (perhaps I should?).
But, the CHIP-8 examples I've run so far (up until "Life"), have worked as expected.

I don't see any errata in the next Dreamer issue, and there also aren't any Machine Code subroutines, so I'm assuming it should work.
User avatar
Editor
Posts: 388
Joined: Fri Nov 17, 2023 10:36 pm
Contact:

Re: DREAM 6800 (now 6809) re-Creation

Post by Editor »

If it's any clearer? Here's my manual "disassembly". :geek:

Now for some chores, and then a closer look.

Code: Select all

Addr	Inst	Function	Comment
0080	E0A0			Display Data	
0082	E080			Display Data	
0084	F10A	V1 = KEY		
0086	410F	Skip If V1 <> 0F		
0088	10B0	Goto 00B0		
008A	6A08	VA = 08		
008C	8A12	VA = VA AND V1		
008E	4A00	Skip If VA <> 00		
0090	1096	Goto 0096		
0092	FA18	TONE = VA	Bleep for VA x 20ms	
0094	1084	Goto 0084		
0096	8114	V1 = V1 + V1		
0098	8114	V1 = V1 + V1		
009A	F00A	V0 = KEY		
009C	8004	V0 = V0 + V0		
009E	8004	V0 = V0 + V0		
00A0	A080	I = 0080	3x3 square, with middle hole	
00A2	D013	Show 3@ V0,V1		
00A4	1084	Goto 0084		
00A6	6F00	VF = 00		
00A8	D011	Show 1@ V0,V1		
00AA	8CF4	VC = VC + VF		
00AC	D011	Show 1@ V0,V1		
00AE	00EE	Return		
00B0	F20A	V2 = KEY		
00B2	6000	V0 = 00		
00B4	6100	V1 = 00		
00B6	6E00	VE = 00		
00B8	72FF	V2 = V2 + FF	2’s Compliment	
00BA	4200	Skip If V2 <> 00		
00BC	1084	Goto 0084		
00BE	6C00	VC = 00		
00C0	A083	I = 0083	1 Dot	
00C2	D011	Show 1@ V0,V1		
00C4	84F0	V4 = VF		
00C6	D011	Show 1@ V0,V1		
00C8	70FC	V0 = V0 + FC	2’s Compliment	
00CA	20A6	Do 00A6		
00CC	7104	V1 = V1 + 04	2’s Compliment	
00CE	20A6	Do 00A6		
00D0	7004	V0 = V0 + 04	2’s Compliment	
00D2	20A6	Do 00A6		
00D4	7004	V0 = V0 + 04	2’s Compliment	
00D6	20A6	Do 00A6		
00D8	71FC	V1 = V1 + FC	2’s Compliment	
00DA	20A6	Do 00A6		
00DC	71FC	V1 = V1 + FC	2’s Compliment	
00DE	20A6	Do 00A6		
00E0	70FC	V1 = V1 + FC	2’s Compliment	
00E2	20A6	Do 00A6		
00E4	70FC	V1 = V1 + FC	2’s Compliment	
00E6	20A6	Do 00A6		
00E8	7004	V0 = V0 + 04	2’s Compliment	
00EA	7104	V1 = V1 + 04	2’s Compliment	
00EC	4C02	Skip If VC <> 02		
00EE	1202	Goto 0202		
00F0	4C03	Skip If VC <> 03		
00F2	10FA	Goto 00FA		
00F4	3401	Skip If V4 = 01		
00F6	1202	Goto 0202		
00F8	122E	Goto 022E		
00FA	3401	Skip If V4 = 01		
00FC	122E	Goto 022E		
00FE	1202	Goto 0202		
				
0200	1084	Goto 0084		
0202	7004	V0 = V0 + 04	2’s Compliment	
0204	4040	Skip If V0 <> 40		
0206	7104	V1 = V1 + 04	2’s Compliment	
0208	4040	Skip If V0 <> 40		
020A	6000	V0 = 00		
020C	3120	Skip If V1 = 20		
020E	10BA	Goto 00BA		
0210	A238	I = 0238		
0212	FE1E	I = I + VE		
0214	61FC	V1 = FC		
0216	F155	MI = V0:V1	Store V0,V1 @ I	
0218	6E00	VE = 00		
021A	A238	I = 0238		
021C	FE1E	I = I + VE		
021E	F165	V0:V1 = MI	Load V0,V1 @ I
0220	A080	I = 0080	3x3 square, with middle hole	
0222	D013	Show 3@ V0,V1	
0224	7E02	VE = VE + 02	2’s Compliment	
0226	31FC	Skip If V1 = FC		
0228	121A	Goto 021A		
022A	D013	Show 3@ V0,V1		
022C	10B2	Goto 00B2		
022E	A238	I = 0238		
0230	FE1E	I = I + VE		
0232	F155	MI = V0:V1	Store V0,V1 @ I	
0234	7E02	VE = VE + 02	2’s Compliment	
0236	1202	Goto 0202		
0238	0000			Data (V0,V1 storage)	
023A	0000			
023C	0000			
023E	0000			
User avatar
djrm
Posts: 191
Joined: Wed Aug 21, 2024 9:40 pm
Location: Rillington / UK
Contact:

Re: DREAM 6800 (now 6809) re-Creation

Post by djrm »

Much clearer, though I was getting the hang of it. I'm wondering why memory at 0x80 was used, perhaps due to lack of any other memory? D
User avatar
Editor
Posts: 388
Joined: Fri Nov 17, 2023 10:36 pm
Contact:

Re: DREAM 6800 (now 6809) re-Creation

Post by Editor »

djrm wrote: Sun Nov 16, 2025 9:58 pm Much clearer, though I was getting the hang of it. I'm wondering why memory at 0x80 was used, perhaps due to lack of any other memory? D
Yes, I did wonder too. I recall 0080 - 00FF was typically used for zero page user storage. 0100-01FF was of course the original memory mapped display buffer. It also made storing to tape a little weird, as we're storing the old display buffer as well.

I guess those were early days, so anything written back then was by someone just learning the ways of coding.
Post Reply