6809 Angel

User avatar
djrm
Posts: 72
Joined: Wed Aug 21, 2024 9:40 pm
Location: Rillington / UK
Contact:

Re: 6809 Angel

Post by djrm »

After a bit of mucking around I finally got the SYS IO board completed and working, the last problem was due to me inadvertently ordering the SOIC part for the keyboard micro leaving with an adaptor to find to mount the chip in the socket.

Image

Not having the correct battery holder I simply soldered a PCB mount battery onto the board and also included a battery on/off switch to save the battery when I'm not using the clock.

To test the keyboard and display I have used the Assist09 Vector Swap functions to patch drivers into the monitor, extract below:

Code: Select all

;================================================
; Initialise VIA for keyboard handshake
		ldx	#VIA_BASE
        	lda     #VIA_PCR_HANDSHAKE_OUTPUT
        	sta     VIA_PCR,X
        	lda	VIA_IRA,X
        	
;================================================
; Setup I/O Handlers
		LEAX    TEXT_OUTCH,pcr
		LDA	#CODTA
		SWI
		FCB	VCTRSWP

		LEAX    keyboard_cidta,pcr
		LDA	#CIDTA
		SWI
		FCB	VCTRSWP
        	rts
        	
;================================================
 * CIDTA - RETURN CONSOLE INPUT CHARACTER
* OUTPUT: C=0 IF NO DATA READY, C=1 A=CHARACTER
* U VOLATILE
keyboard_cidta
	PSHS	U
        LDU     #VIA_BASE
        LDA     VIA_IFR,U        ; GET STATUS
        lsra
        lsra
        BCC     kcirtn           ; RETURN IF NOTHING
        LDA     VIA_IRA,U        ; LOAD DATA BYTE
kcirtn  PULS	U,PC             ; RETURN TO CALLER

;================================================
It's looking good so far, next is to get a buffered serial driver working.
David.
User avatar
Editor
Posts: 249
Joined: Fri Nov 17, 2023 10:36 pm
Contact:

Re: 6809 Angel

Post by Editor »

Nice work David. Awesome progress. Inspiring!
User avatar
djrm
Posts: 72
Joined: Wed Aug 21, 2024 9:40 pm
Location: Rillington / UK
Contact:

Re: 6809 Angel

Post by djrm »

Another step in making a device driver bios for my MECB, this time its the primitives for T6963 text/graphic LCD displays. The display is memory mapped into the 6809 address bus. Having read/write access to the display allows the device to be polled avoiding the need for timing delays. I've converted the Z80 code used previously including some user defined box drawing characters and primitives for scrolling the display as needed in a terminal, this reads from the display avoiding the need to keep a local buffer of the display contents.
Image
User avatar
djrm
Posts: 72
Joined: Wed Aug 21, 2024 9:40 pm
Location: Rillington / UK
Contact:

Re: 6809 Angel

Post by djrm »

I now have a 6309 cpu but have been waiting for a new clock to test it at 2MHz with all my cards. The system kept crashing until I found it was only getting 4.7 volts, since a better supply has been arranged its ok again. I have used a spare backplane to make a bus extender card, I should have checked what I was doing before soldering it the first time as the plugs are mirrored compared to the sockets and I had to redo the connections by offsetting the plug and using bits of wire to connect the second row. A bit fiddly and I cant fit the board screws now. Oh well its working anyways.
Image

some Forth incantations to display time and date from RTC on 2816 character LEDs:

Code: Select all

===================================================================
10 list 
\ MECB support words djrm Oct 2024                               
rtcload                                                         
18 string-table month-table_bcd                                 
" Jan" " Feb" " Mar" " Apr" " May" " Jun" " Jul" " Aug" " Sep"  
" 10" " 11" " 12" " 13" " 14" " 15" " Oct" " Nov" " Dec"        
MONITOR                                                         
: wdate ( -- )                                                  
  CR WTC@ base @ >r hex                                         
  swap rot 2digitsout [CHAR] : EMIT                             
  2digitsout [CHAR] : EMIT 2digitsout [CHAR] : EMIT             
  BL EMIT swap rot                                              
  $20 2digitsout 2digitsout                                     
  BL EMIT month-table_bcd                                       
  2digitsout r> base ! ;                                        
wdate                                                           
                                                                 ok
===================================================================
11 list 
\ djrm MECB write to 4 character led display                    
                                                                
: 4chars 0 do dup i + c@ $c0f3 i - c! loop drop ;               
                                                                
: 4digits S>D <# # # # # #>                                     
0 do dup I + c@ $c0f3 I - c! loop drop ;                        
                                                                
s" Time" 4chars 1000 ms                                         
wtc@ drop over $100 * +                                         
base @ swap hex 4digits    base !                               
drop drop drop drop 1000 ms                                     
s" djrm" 4chars                                                 
                                                                
                                                                
                                                                
                                                                 ok
===================================================================
User avatar
Editor
Posts: 249
Joined: Fri Nov 17, 2023 10:36 pm
Contact:

Re: 6809 Angel

Post by Editor »

djrm wrote: Thu Oct 24, 2024 7:33 pm I have used a spare backplane to make a bus extender card, I should have checked what I was doing before soldering it the first time as the plugs are mirrored compared to the sockets and I had to redo the connections by offsetting the plug and using bits of wire to connect the second row. A bit fiddly and I cant fit the board screws now. Oh well its working anyways.
This is really useful information. Thanks for doing this!

I have always had the intention of making an extension backplane, to allow extending the original backplane to 8 + 1 sockets.
But, I hadn't progress this as yet, mainly as I haven't yet needed it, but also because I was currently unsure how a MECB backplane extension board would perform (due to the longer bus length and also additional signal reflections expected from the mid-bus connector join).

It would be interesting to do some more bus speed tests (with and without the extension).

Based on this, I might fast-track my backplane extension PCB design. :geek:
User avatar
djrm
Posts: 72
Joined: Wed Aug 21, 2024 9:40 pm
Location: Rillington / UK
Contact:

Re: 6809 Angel

Post by djrm »

Here's a quick view of the complete extension board:
Image
My cheapo electric solder pump earned its keep and easily removed the badly placed connector.
User avatar
Editor
Posts: 249
Joined: Fri Nov 17, 2023 10:36 pm
Contact:

Re: 6809 Angel

Post by Editor »

djrm wrote: Thu Oct 24, 2024 8:48 pm Here's a quick view of the complete extension board...
Looks like a good prototyping effort. Nicely done! I see you also trimmed off some of the PCB to make space for the R/A connector.

I've just released the final Part 4 of my CreatiVision series, so I can now get back to general MECB projects.

Although I'm also about 75% through routing another new MECB PCB design, you're now inspiring me to take a temporary break from that and finally get on with making my earlier envisioned Backplane Extension. Hmm... Time for a walk, then some more KiCAD. :geek:
User avatar
djrm
Posts: 72
Joined: Wed Aug 21, 2024 9:40 pm
Location: Rillington / UK
Contact:

Re: 6809 Angel

Post by djrm »

A welcome change since swapping to a 6303 running at 2MHz is that the problem I was having tracing through single byte instructions seems to have completely vanished :-)

Spot the error in the photos above, drat. need sleep now.
User avatar
djrm
Posts: 72
Joined: Wed Aug 21, 2024 9:40 pm
Location: Rillington / UK
Contact:

Re: 6809 Angel

Post by djrm »

With just next to no configuration the 6309 version of BBC Basic can be made to run on the MECB. The only change I had to make was to the i/o dip switches and the address of the UART.
See the discussion here for details of the port: https://stardot.org.uk/forums/viewtopic.php?t=25465

I was going to try and adapt the Creativision BIOS to accept my PS2 keyboard but now since Greg has finished his keyboard I'll wait until I have one of those before trying The Creativision Basic.

I wanted to use that Basic because it has colour functions built in, however with the BBC Basic the colour functions should live in the BIOS (not in this version its UART only) - something I would like to have a go at adapting for the VDP anyway. Here is the first run, showing the Mandlebrot ascii demo pasted into the terminal.

Other versions of Basic I have seen are locked to UART only but the BBC has easily redirectable input and output, A feature I grew up with on my old Ohio C1P. I should be able to adapt this to drive the VDP as a terminal and even the LCD with the BIOS functions I'm experimenting with.

Code: Select all

SBC6309N fbdaa27

>  100 REM A BASIC, ASCII MANDELBROT
>  110 REM
>  120 REM This implementation copyright (c) 2019, Gordon Henderson
>  130 REM
>  140 REM Permission to use/abuse anywhere for any purpose granted, but
>  150 REM it comes with no warranty whatsoever. Good luck!
>  160 REM
>  170 C$ = ".,'~=+:;[/<&?oxOX# " : REM 'Pallet' Lightest to darkest...
>  180 SO = 1 : REM Set to 0 if your MID$() indexes from 0.
>  190 MI = LEN(C$)
>  200 MX = 4
>  210 LS = -2.0
>  220 TP = 1.25
>  230 XS = 2.5
>  240 YS = -2.5
>  250 W = 64
>  260 H = 48
>  270 SX = XS / W
>  280 SY = YS / H
>  290 Q = TIME
>  300 FOR Y = 0 TO H
>  310   CY = Y * SY + TP
>  320   FOR X = 0 TO W
>  330     CX = X * SX + LS
>  340     ZX = 0
>  350     ZY = 0
>  360     CC = SO
>  370     X2 = ZX * ZX
>  380     Y2 = ZY * ZY
>  390     IF CC > MI THEN GOTO 460
>  400     IF (X2 + Y2) > MX THEN GOTO 460
>  410     T = X2 - Y2 + CX
>  420     ZY = 2 * ZX * ZY + CY
>  430     ZX = T
>  440     CC = CC + 1
>  450     GOTO 370
>  460     PRINT MID$(C$, CC - SO, 1);
>  470   NEXT
>  480   PRINT
>  490 NEXT
>  500 PRINT
>  510 PRINT (TIME - Q) / 100
>  520 END
>RUN
............,,,,,,,,,,,,,,'''''''''''''''''''''''''',,,,,,,,,,,,,
...........,,,,,,,,,,,''''''''''''''''''''''''''''''''',,,,,,,,,,
..........,,,,,,,,,'''''''''''''''''''''''~~~~===~~~~''''',,,,,,,
.........,,,,,,,,'''''''''''''''''''''~~~~~~=+[&+==~~~~~''''',,,,
........,,,,,,,'''''''''''''''''''''~~~~~~~==+: ;+++~~~~~~''''',,
.......,,,,,,'''''''''''''''''''''~~~~~~~~===+:[ / [+~~~~~~''''''
......,,,,,,''''''''''''''''''''~~~~~~~~~===+:;/?o[:+==~~~~~'''''
......,,,,''''''''''''''''''''~~~~~~~~~====+:O/x  <;:+==~~~~~~'''
.....,,,,''''''''''''''''''''~~~~~~~~~===++:#      X/+====~~~~'''
.....,,,'''''''''''''''''''~~~~~~~~~==++++:;/X      [:++====~~~''
....,,,'''''''''''''''''''~~~~~~~~==+++:::;[/      X/;:+++++==~~'
....,,''''''''''''''''''~~~~~~~===+[<&x[[? <&x     o&//<;:::[[=~~
...,,'''''''''''''''''~~~~~~=====+:;    &O              /[</&/:=~
...,'''''''''''''''''~~~========++:;<                    x    :=~
..,,'''''''''''''''~~=========+++:;/<O                       ;+==
..,'''''''''''''~~~=========++++:< ##                      X<;:+=
..''''''''''~~~~==:/++++++++::::;/x                          [;:=
.,''''''~~~~~~===+:X[;:;; ;;::;;[                             o/=
.,''''~~~~~~~===++;<xXo<<X &<[[[/                             X:+
.'''~~~~~~~=====+::[&         <<&                             /:=
.'~~~~~~~~=====+::;/?          oO                              :=
.'~~~~~~~====++/;[/o                                          [+=
.~~~~~~=++++::;/???X                                         #:+=
.==++:/::+:;;[[o                                             :+==
                                                           &[:+==
.==++:/::+:;;[[o                                             :+==
.~~~~~~=++++::;/???X                                         #:+=
.'~~~~~~~====++/;[/o                                          [+=
.'~~~~~~~~=====+::;/?          oO                              :=
.'''~~~~~~~=====+::[&         <<&                             /:=
.,''''~~~~~~~===++;<xXo<<X &<[[[/                             X:+
.,''''''~~~~~~===+:X[;:;; ;;::;;[                             o/=
..''''''''''~~~~==:/++++++++::::;/x                          [;:=
..,'''''''''''''~~~=========++++:< ##                      X<;:+=
..,,'''''''''''''''~~=========+++:;/<O                       ;+==
...,'''''''''''''''''~~~========++:;<                    x    :=~
...,,'''''''''''''''''~~~~~~=====+:;    &O              /[</&/:=~
....,,''''''''''''''''''~~~~~~~===+[<&x[[? <&x     o&//<;:::[[=~~
....,,,'''''''''''''''''''~~~~~~~~==+++:::;[/      X/;:+++++==~~'
.....,,,'''''''''''''''''''~~~~~~~~~==++++:;/X      [:++====~~~''
.....,,,,''''''''''''''''''''~~~~~~~~~===++:#      X/+====~~~~'''
......,,,,''''''''''''''''''''~~~~~~~~~====+:O/x  <;:+==~~~~~~'''
......,,,,,,''''''''''''''''''''~~~~~~~~~===+:;/?o[:+==~~~~~'''''
.......,,,,,,'''''''''''''''''''''~~~~~~~~===+:[ / [+~~~~~~''''''
........,,,,,,,'''''''''''''''''''''~~~~~~~==+: ;+++~~~~~~''''',,
.........,,,,,,,,'''''''''''''''''''''~~~~~~=+[&+==~~~~~''''',,,,
..........,,,,,,,,,'''''''''''''''''''''''~~~~===~~~~''''',,,,,,,
...........,,,,,,,,,,,''''''''''''''''''''''''''''''''',,,,,,,,,,
............,,,,,,,,,,,,,,'''''''''''''''''''''''''',,,,,,,,,,,,,

      1E-2
>

User avatar
Editor
Posts: 249
Joined: Fri Nov 17, 2023 10:36 pm
Contact:

Re: 6809 Angel

Post by Editor »

djrm wrote: Fri Oct 25, 2024 8:35 pm I was going to try and adapt the Creativision BIOS to accept my PS2 keyboard but now since Greg has finished his keyboard I'll wait until I have one of those before trying The Creativision Basic.
Yes, I started out exploring the option of BIOS modification for alternative controller / keyboard input, but I think there is a potential trap with any modifications to the CreatiVision BIOS keyboard input.

From what I've read / understand, a lot of the CreatiVision cartridge software accesses the controller input at a reasonably low level (and not consistently). Therefore, any changes to the hardware interface, or lower level BIOS controller / keyboard scanning implementation will probably result in issues with running existing software (unmodified).

This is what initially lead me down the path of being true to the original hardware, to maintain 100% original software compatibility. Of course, the bonus was that my Controller interface and Keyboard add-on can also be used to upgrade an original CreatiVision console.
Post Reply