![]() |
![]() |
![]() |
|
Vintage Computers Any vintage computer systems, calculators, video games etc., but with an emphasis on 1980s and earlier equipment. |
![]() |
|
Thread Tools |
![]() |
#1 |
Heptode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 920
|
![]()
I was looking at the memory expansion PCB that I'd used on the latest MK14v6, and started pondering... it has a scamp, rom, ram, a gal address decoder... its pretty much a complete computer so I thought maybe you could run Kitbug on it, with 1k rom and 3k ram, have the gal invert the flag 0 serial output... the tinyest kitbug machine!
Well, I tried it and yes its now running Kitbug standalone! Its actually the eprom image I did for the Aitken machine, so there are a few features beyond the original NS Kitbug - and (for now) it has the famous bit7 serial bug which I'd forgotten about. The crystal is under the sc/mp and theres a reset cap etc added. Presently trying to port KitbugPlus but I used a lot of PICL specific code in there and I cant remember what I did... also Karen reduced GECO and PUTC to single byte pseudo-ops, when i expand these back to sc/mp code the monitor is 60 odd bytes larger and wont fit in the 1k... the gal presently splits it 1k rom 3k ram so I'll have to expand the rom area to get kb+ in there... Just a bit of timewasting fun rather than doing my chores... ![]() Cheers Phil Last edited by Phil__G; 26th Aug 2023 at 9:29 pm. |
![]() |
![]() |
![]() |
#2 |
Octode
Join Date: Mar 2020
Location: Kitchener, Ontario, Canada
Posts: 1,200
|
![]()
Not sure what you connected to the gal but it could probably also latch the upper bytes of the address and run NIBL.
I was thinking earlier that your MK14 was only being used as a keyboard and display. |
![]() |
![]() |
![]() |
#3 |
Heptode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 920
|
![]()
I think you could Mark but I've only ever done simple gal equations. There are plenty of wincupl examples but I havent found much using just eqn2jed, I need to buck up and learn wincupl
![]() A wierd problem delayed the project for an evening - with /hold, cont & /busrq all needing to be held high I commoned them together and used a single 1k pull-up. It didnt run and I found the commoned inputs tested low, even with the pull-up. As with many simple sc/mp designs I changed /nbreq to its own pullup and wired cont and /hold to vcc, and it sprang into life. I couldnt find anything in the datasheet that would explain this (?) unless one of them does something during startup, maybe bus arbitration or something. Or if cont or /hold pull a lot of current. It was only an experiment for fun, but its encouraged me towards a 'proper' sc/mp board ![]() Cheers - Phil Last edited by Phil__G; 27th Aug 2023 at 10:45 am. |
![]() |
![]() |
![]() |
#4 |
Octode
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 1,349
|
![]()
Cracking idea Phil...
|
![]() |
![]() |
![]() |
#5 |
Dekatron
Join Date: Jun 2015
Location: Biggin Hill, London, UK.
Posts: 5,068
|
![]()
NBREQ is a bidirectional pin. It might well pull low momentarily after reset, and if that then asserts NHOLD and deasserts CONT it is quite likely the thing will not run.
|
![]() |
![]() |
![]() |
#6 |
Octode
Join Date: Mar 2020
Location: Kitchener, Ontario, Canada
Posts: 1,200
|
![]()
As Tony said, NBREQ is both an input and an output. It is pulled low by the 8060 at the start of every bus access. I think once the bus access is started CONT will be ignored, but NHOLD will make it wait at the end of the bus cycle and never finish.
|
![]() |
![]() |
![]() |
#7 |
Tetrode
Join Date: May 2021
Location: Titz, Germany.
Posts: 71
|
![]()
I would welcome your spiced up version of Kitbug for native hardware. The bit 7 fix is simple: Add this in GECO towards the end:
CAS DLD -1(P2) ; DECREMENT BIT COUNT JNZ $LOOP ; LOOP UNTIL 0 + LDI 045 ; DELAY BIT TIME FOR MSB + DLY 1 CSA ; SET STOP BIT ANI 0FE |
![]() |
![]() |
![]() |
#8 |
Heptode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 920
|
![]()
Thanks Michael, the KitbugPlus monitor I did for the PICL was in SC/MP assembler but used Karens PIC pseudo-ops for GECO, PUTC and break, and I'm finding its not as straightforward as I expected to convert these back to straight SC/MP code. Simply expanding the pseudo-ops to SC/MP source has introduced quite a few problems which I'm still working through.
The intention is to have a comprehensive monitor for native SC/MP systems (the original NS Kitbug was very limited - type, modify and go!). KitbugPlus has everything integrated properly but the version on the Aitken machine ( https://www.youtube.com/watch?v=1WU7DbC8Sac ) is pretty much the original NS Kitbug with a nicer prompt and a hex-dump (hex only, no ascii, KB+ does both), inline print and formatted list added, but these routines are separate programs in the rom and not integrated into Kitbug - just tagged onto the end of the rom. They're executed by setting registers at FF7--> and 'Go' like any other program: Code:
01FC- 399 ; MEMORY DUMP COMMAND 0200 400 .NO $200 ; TO MATCH EXISTING ROM 0200- 401 ; 0200-C4 F6 402 ( 10) DUMP: LDI $0F6 0202-32 403 ( 8) XPAL P2 0203-C4 0F 404 ( 10) LDI $0F 0205-36 405 ( 8) XPAH P2 0206-C4 10 406 ( 10) DLOOP1: LDI 16 ; 16 bytes/line 0208-CA F8 407 ( 18) ST -8(P2) 020A-C4 02 408 ( 10) LDI /IPRINT ; ALL EXTENSION 020C-37 409 ( 8) XPAH P3 020D-C4 2F 410 ( 10) LDI #IPRINT-1 020F-33 411 ( 8) XPAL P3 0210-3F 412 ( 7) XPPC P3 ; PRINT CRLF 0211-0D 0A 00 413 .DB $0D,$0A,0 0214-35 414 ( 8) XPAH P1 ; GET HIGH ADDR 0215-01 415 ( 7) XAE 0216-40 416 ( 6) LDE 0217-35 417 ( 8) XPAH P1 0218-C4 01 418 ( 10) LDI /PHEX2 021A-37 419 ( 8) XPAH P3 021B-C4 43 420 ( 10) LDI #PHEX2-1 021D-33 421 ( 8) XPAL P3 021E-3F 422 ( 7) XPPC P3 ; PRINT HEX BYTE & SPACE 021F-40 423 ( 6) LDE 0220-3F 424 ( 7) XPPC P3 0221-31 425 ( 8) XPAL P1 ; GET LOW ADDR 0222-01 426 ( 7) XAE 0223-40 427 ( 6) LDE 0224-31 428 ( 8) XPAL P1 0225-40 429 ( 6) LDE 0226-3F 430 ( 7) XPPC P3 0227-C5 01 431 ( 18) DLOOP2: LD @+1(P1) 0229-3F 432 ( 7) XPPC P3 ; PRINT HEX BYTE & SPACE 022A-BA F8 433 ( 22) DLD -8(P2) 022C-9C F9 434 (9/11) JNZ DLOOP2 022E-90 D6 435 ( 11) JMP DLOOP1 0230- 436 ; 0230- 437 ; INLINE PRINT - TEXT FOLLOWS XPPC P3 CALL, ZERO TERMINATED 0230- 438 ; 0230-33 439 ( 8) IPRINT: XPAL P3 0231-31 440 ( 8) XPAL P1 0232-37 441 ( 8) XPAH P3 0233-35 442 ( 8) XPAH P1 0234-C4 C4 443 ( 10) LDI #PUTC-1 0236-33 444 ( 8) XPAL P3 0237-C4 01 445 ( 10) LDI /PUTC 0239-37 446 ( 8) XPAH P3 023A-C5 01 447 ( 18) IGET: LD @+1(P1) 023C-98 05 448 (9/11) JZ IDONE 023E-3F 449 ( 7) XPPC P3 023F-90 F9 450 ( 11) JMP IGET 0241-C5 FF 451 ( 18) LD @-1(P1) 0243-31 452 ( 8) IDONE: XPAL P1 0244-33 453 ( 8) XPAL P3 0245-35 454 ( 8) XPAH P1 0246-37 455 ( 8) XPAH P3 0247-3F 456 ( 7) XPPC P3 0248-90 E6 457 ( 11) JMP IPRINT 024A- 458 ; 0250 459 .NO $250 ; TO MATCH EXISTING ROM 0250- 460 ; Formatted list, instruction-length-aware 0250-C4 F6 461 ( 10) FLIST: LDI #P2ADR 0252-32 462 ( 8) XPAL P2 0253-C4 0F 463 ( 10) LDI /P2ADR 0255-36 464 ( 8) XPAH P2 0256-C4 C4 465 ( 10) FL2: LDI #PUTC-1 ; PRINT CR-LF 0258-33 466 ( 8) XPAL P3 0259-C4 01 467 ( 10) LDI /PUTC 025B-37 468 ( 8) XPAH P3 025C-C4 0D 469 ( 10) LDI $0D 025E-3F 470 ( 7) XPPC P3 ; PRINT CR 025F-C4 0A 471 ( 10) LDI $0A 0261-3F 472 ( 7) XPPC P3 ; PRINT LF 0262-35 473 ( 8) XPAH P1 ; PRINT HIGH BYTE 0263-01 474 ( 7) XAE ; READ AND RESTORE BYTE FROM P1 0264-40 475 ( 6) LDE 0265-35 476 ( 8) XPAH P1 0266-C4 43 477 ( 10) LDI #PHEX2-1 0268-33 478 ( 8) XPAL P3 0269-40 479 ( 6) LDE 026A-3F 480 ( 7) XPPC P3 ; CALL PHEX2 026B-31 481 ( 8) XPAL P1 ; PRINT LOW BYTE 026C-01 482 ( 7) XAE 026D-40 483 ( 6) LDE 026E-31 484 ( 8) XPAL P1 026F-40 485 ( 6) LDE 0270-3F 486 ( 7) XPPC P3 0271-C5 01 487 ( 18) LD @+1(P1) 0273-3F 488 ( 7) XPPC P3 0274-C1 FF 489 ( 18) LD -1(P1) 0276-94 DE 490 (9/11) JP FL2 0278-C5 01 491 ( 18) LD @+1(P1) 027A-3F 492 ( 7) XPPC P3 027B-90 D9 493 ( 11) JMP FL2 027D- 494 ; Last edited by Phil__G; 27th Aug 2023 at 6:18 pm. |
![]() |
![]() |
![]() |
#9 |
Octode
Join Date: Mar 2020
Location: Kitchener, Ontario, Canada
Posts: 1,200
|
![]()
It would be nice if you could make it compatible with the single step circuit of the revised MK14 monitor and include coolsnaz fast loader.
|
![]() |
![]() |
![]() |
#10 |
Heptode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 920
|
![]()
Replicating the single-step circuitry in the gal is beyond me Mark
![]() I'd intended a hex loader but theres plenty of room for the fast-loader too Might not be soon though ![]() Cheers Phil |
![]() |
![]() |
![]() |
#11 |
Octode
Join Date: Mar 2020
Location: Kitchener, Ontario, Canada
Posts: 1,200
|
![]()
I was only thinking it would be nice to have the software support for the single step in your version of the monitor, I hadn’t considered trying to put that in the gal. I use that part of the MK14 monitor to release then next processor on the multiprocessor.
I guess the fast loader might not make much sense either, you have a terminal emulator connected so you can just send a file direct from the terminal if it can load hex files. |
![]() |
![]() |
![]() |
#12 |
Heptode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 920
|
![]()
After a lot of headscratching I found a self-inflicted problem with the inline print, in recreating 40-year old scribbles I had misplaced a label. In the code in post #8 the label "IDONE:" should be one-line up, by the "LD @-1(P1)" - the symptom was that the return address wasnt decremented as it should have been.
This is why I dont like posting code on the forum as we cant correct mistakes, but heres the corrected code, sorry for the whoopsie. This SBASM source has been recreated from hand-written code from 40+ years ago and still working in the Andrew Aitken machine. It also works perfectly in the "MK14 Memory expansion PCB" as a stand-alone "micro-introkit" ![]() Code:
0000- 4 ; 0000- 5 ; Phils Kitbug extensions from 1980, load from 0x200 after Kitbug 0000- 6 ; Assumes 'GECO fixed' Kitbug with PUTC at 01C9 0000- 7 ; Optionally change to a nice prompt by editing 0x040 to 0x4E 0000- 8 ; FROM: C4 01 37 C4 C8 33 C4 0D 3F C4 0A 3F C4 2D 3F 0000- 9 ; TO: C4 02 37 C4 7F 33 3F 08 08 08 08 08 08 08 08 0000- 10 ; Utils: set 0xFF9 to required memory start highbyte, 0000- 11 ; set 0xFFA to required memory start lowbyte 0000- 12 ; DUMP - set 0xFF7 to 02, 0xFF8 to 00, then Go 0000- 13 ; LIST - set 0xFF7 to 02, 0xFF8 to 30, then Go 0000- 14 ; ILPRINT - point P3 to ILPRINT-1, use inline text, 0 term 0000- 15 ; see PROMPT: below for an example 0000- 16 ; 0186- 17 GECO .EQ 0X0186 01C9- 18 PUTC .EQ 0X01C9 ; NOTE OFFSET FROM ORIGINAL BY GECO FIX 0144- 19 PHEX2 .EQ 0X0144 004F- 20 CMDLP2 .EQ 0X004F 0FF6- 21 P2ADR .EQ 0X0FF6 0000- 22 0000- 23 ; Memory dump at $0200 and instr-length-aware list at $0250 0000- 24 ; Inline print at $0230 and prompt extension at $0280. Phil_G. 0000- 25 ; 0001- 26 P1 = 1 0002- 27 P2 = 2 0003- 28 P3 = 3 0000- 29 ; 0000- 30 ; MEMORY DUMP COMMAND 0200- 31 .OR $200 ; IMMEDIATELY AFTER KITBUG (512 BYTES) 0200- 32 ; 0200-C4 F6 33 ( 10) DUMP: LDI #P2ADR 0202-32 34 ( 8) XPAL P2 0203-C4 0F 35 ( 10) LDI /P2ADR 0205-36 36 ( 8) XPAH P2 0206-C4 10 37 ( 10) DLOOP1: LDI 16 ; 16 bytes/line 0208-CA F8 38 ( 18) ST -8(P2) 020A-C4 01 39 ( 10) LDI /PUTC ; ALL EXTENSION 020C-37 40 ( 8) XPAH P3 020D-C4 C8 41 ( 10) LDI #PUTC-1 020F-33 42 ( 8) XPAL P3 0210-C4 0D 43 ( 10) LDI $0D 0212-3F 44 ( 7) XPPC P3 ; PRINT CR 0213-C4 0A 45 ( 10) LDI $0A 0215-3F 46 ( 7) XPPC P3 ; PRINT LF 0216- 47 0216-35 48 ( 8) XPAH P1 ; GET HIGH ADDR 0217-01 49 ( 7) XAE 0218-40 50 ( 6) LDE 0219-35 51 ( 8) XPAH P1 021A- 52 ; LDI /PHEX2 021A- 53 ; XPAH P3 021A-C4 43 54 ( 10) LDI #PHEX2-1 021C-33 55 ( 8) XPAL P3 021D-40 56 ( 6) LDE ; *** WAS MISSING *** 021E-3F 57 ( 7) XPPC P3 ; PRINT HEX BYTE & SPACE 021F-31 58 ( 8) XPAL P1 ; GET LOW ADDR 0220-01 59 ( 7) XAE 0221-40 60 ( 6) LDE 0222-31 61 ( 8) XPAL P1 0223-40 62 ( 6) LDE 0224-3F 63 ( 7) XPPC P3 0225-C5 01 64 ( 18) DLOOP2: LD @+1(P1) 0227-3F 65 ( 7) XPPC P3 ; PRINT HEX BYTE & SPACE 0228-BA F8 66 ( 22) DLD -8(P2) 022A-9C F9 67 (9/11) JNZ DLOOP2 022C-90 D8 68 ( 11) JMP DLOOP1 022E- 69 ; 0230 70 .NO 0X230 0230- 71 ; 0230- 72 ; INLINE PRINT - TEXT FOLLOWS XPPC P3 CALL, ZERO TERMINATED 0230- 73 ; 0230-33 74 ( 8) IPRINT: XPAL P3 0231-31 75 ( 8) XPAL P1 0232-37 76 ( 8) XPAH P3 0233-35 77 ( 8) XPAH P1 0234-C4 C8 78 ( 10) LDI #PUTC-1 0236-33 79 ( 8) XPAL P3 0237-C4 01 80 ( 10) LDI /PUTC 0239-37 81 ( 8) XPAH P3 023A-C5 01 82 ( 18) IGET: LD @+1(P1) 023C-98 03 83 (9/11) JZ IDONE 023E-3F 84 ( 7) XPPC P3 023F-90 F9 85 ( 11) JMP IGET 0241-C5 FF 86 ( 18) IDONE: LD @-1(P1) ; ADJUST RETURN ADDRESS 0243-31 87 ( 8) XPAL P1 0244-33 88 ( 8) XPAL P3 0245-35 89 ( 8) XPAH P1 0246-37 90 ( 8) XPAH P3 0247-3F 91 ( 7) XPPC P3 0248-90 E6 92 ( 11) JMP IPRINT 024A- 93 ; 0250 94 .NO $250 ; TO MATCH EXISTING ROM 0250- 95 ; Formatted list, instruction-length-aware 0250-C4 F6 96 ( 10) FLIST: LDI #P2ADR 0252-32 97 ( 8) XPAL P2 0253-C4 0F 98 ( 10) LDI /P2ADR 0255-36 99 ( 8) XPAH P2 0256-C4 C8 100 ( 10) FL2: LDI #PUTC-1 ; PRINT CR-LF 0258-33 101 ( 8) XPAL P3 0259-C4 01 102 ( 10) LDI /PUTC 025B-37 103 ( 8) XPAH P3 025C-C4 0D 104 ( 10) LDI $0D 025E-3F 105 ( 7) XPPC P3 ; PRINT CR 025F-C4 0A 106 ( 10) LDI $0A 0261-3F 107 ( 7) XPPC P3 ; PRINT LF 0262-35 108 ( 8) XPAH P1 ; PRINT HIGH BYTE 0263-01 109 ( 7) XAE ; READ AND RESTORE BYTE FROM P1 0264-40 110 ( 6) LDE 0265-35 111 ( 8) XPAH P1 0266-C4 43 112 ( 10) LDI #PHEX2-1 0268-33 113 ( 8) XPAL P3 0269-40 114 ( 6) LDE 026A-3F 115 ( 7) XPPC P3 ; CALL PHEX2 026B-31 116 ( 8) XPAL P1 ; PRINT LOW BYTE 026C-01 117 ( 7) XAE 026D-40 118 ( 6) LDE 026E-31 119 ( 8) XPAL P1 026F-40 120 ( 6) LDE 0270-3F 121 ( 7) XPPC P3 0271-C5 01 122 ( 18) LD @+1(P1) 0273-3F 123 ( 7) XPPC P3 0274-C1 FF 124 ( 18) LD -1(P1) 0276-94 DE 125 (9/11) JP FL2 0278-C5 01 126 ( 18) LD @+1(P1) 027A-3F 127 ( 7) XPPC P3 027B-90 D9 128 ( 11) JMP FL2 027D- 129 ; 0280 130 .NO $280 ; TO MATCH EXISTING ROM; SIGN-ON EXTENSION 0280- 131 ; 0280-C4 2F 132 ( 10) PROMPT: LDI #IPRINT-1 0282-33 133 ( 8) XPAL P3 0283-C4 02 134 ( 10) LDI /IPRINT 0285-37 135 ( 8) XPAH P3 0286-3F 136 ( 7) XPPC P3 0287-0D 0A 4B 69 74 62 75 67 0D 0A 3E 00 137 .DB $0D,$0A,"Kitbug",$0D,$0A,">",0 0293-C4 4E 138 ( 10) LDI #CMDLP2-1 0295-33 139 ( 8) XPAL P3 0296-C4 00 140 ( 10) LDI /CMDLP2 0298-37 141 ( 8) XPAH P3 0299-3F 142 ( 7) XPPC P3 029A- 143 ; 029A- 144 .END Last edited by Phil__G; 29th Aug 2023 at 1:13 pm. |
![]() |
![]() |
![]() |
#13 |
Heptode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 920
|
![]()
Update, I have KitbugPlus running on the little SC/MP board, actually its proving to be a brilliant development test-bed
![]() I changed the gal to give 2k rom 2k ram, or could do 1.5k rom 2.5k ram, need to allow room for a couple of routines, Block move, Intel hexloader, etc But as it stands its running great, much more practical than the original Kitbug! Source is at the bottom of the sc/mp page, its a working copy but likely to be updated as & when... Cheers Phil |
![]() |
![]() |
![]() |
#14 |
Triode
Join Date: Jan 2021
Location: Hulst, Netherlands.
Posts: 35
|
![]()
Hello Phil.
Wow, that was a quick one after all! congrats and I will see if I can try it out soon. Indeed much better then the original kitbug which is very limited in its use. |
![]() |
![]() |
![]() |
#15 |
Heptode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 920
|
![]()
Thanks Benny, I'd be interested to hear how you find it, presently it needs one-and-a-quarter kilobytes but if you allow 2k then we'll have room for updates such as the hex-loader which has to be the next priority
![]() I'm really enjoying the novelty of this tiny board, about 60mm square, and being able to change the address decoding at will is great for experimenting ![]() (within the 4k page of course) ![]() |
![]() |
![]() |
![]() |
#16 |
Heptode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 920
|
![]()
Just a demo, Music (from the SoC manual) for Kitbug or KitbugPlus on the tiny board.
The file music.dat is the keying file, in Teraterm type M800 (ret) and then from the menubar, File, send-file music.dat When its finished loading, enter G800 to run Last edited by Phil__G; 31st Aug 2023 at 11:40 pm. |
![]() |
![]() |
![]() |
#17 |
Heptode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 920
|
![]()
I did a brief document for the project, http://philg.uk, bottom of the SC/MP page
If anyone facies a go I have a few pcbs and can do a programmed GAL at cost, no profit Cheers Phil |
![]() |
![]() |
![]() |
#18 |
Hexode
Join Date: Jan 2021
Location: Ashford, Kent, UK
Posts: 261
|
![]()
Nice description of the project - very easy to follow. Might benefit from including a memory map. I expect that info is easily available else where but keeps it all together. I'll p.m you regarding a PCB and GAL in due course - another project to add to the ever growing list
![]() |
![]() |
![]() |
![]() |
#19 |
Heptode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 920
|
![]()
Thanks Ian - updated a few minutes ago.
|
![]() |
![]() |
![]() |
#20 |
Heptode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 920
|
![]()
KitbugPlus now has a Serial loader, using the command Sxxx where xxx is the load address, and then sending a bin file using Teraterm (tick the bin option on the file, send screen)
Its a binary loader cos in working on Intel Hex I was having to use silly long delays whereas the binary load needs no delays at all so loads quite quickly (1200bps) After loading (watch the LED on the FTDI) it does need a reset to exit the loader. I might revisit the hex loader another time but for now this is working well. Update as usual is on the SC/MP page Cheers Phil Last edited by Phil__G; 2nd Sep 2023 at 11:03 pm. |
![]() |
![]() |