Monday, April 28, 2025

I finally have something to show for the C64

I finally have something to show for the C64 version of Dragon, Druids, & Dice 1.2! I have the C64 version of DDD 1.2 done and with the same graphics as the TI-99/4A. This took way more work than I could have imagined.  Maybe if I had grown up with the C64, it would have been easier.

Above is what the C64 version looks like and here is what the TI-99/4A looks like:
Font looks different and I kept the C64's default blue font color.

During this whole programming ordeal, I have used and updated the following documentation:

C64 character manipulation:
https://mrgibson.com/c64basic2.php

TI-99/4A general character documentation (bottom):
https://mrgibson.com//TI/TIBASIC2.php

and lastly my general C64 BASIC document:
https://mrgibson.com/c64basic.php

I did have to shift a few things around, but most of the code is pretty close to each platform.

Here is an example of shifting from character to another between the two platforms.

119 for a=12656 to 12663: read ze: poke a,ze: poke a+1024,255-ze: next a
120 data 0,0,0,0,192,48,12,03
121 rem call char(97,"00 00 00 00 c0 30 0c 03")  swap 97 for c64 46 '.'


Tuesday, April 15, 2025

More on the C64 dice development

Here is an improved proof of concept for the C64. Still different from the TI-99/4A, 
but still the same concept and more detailed than yesterday's post.
So, so much more work than needed on the TI-99/4A just to get the same result
on the C64.

10 print chr$(147) 100 rem copy rom routine 105 for i=0 to 26: read x: poke 828+i,x: next i 110 data 169,000,160,208,133,095,132,096 : rem LDA #0; LDY #$D0; STA 95, STY 96 115 data 169,000,160,224,133,090,132,091 : rem LDA #0; LDY #$E0; STA 90; STY 91 120 data 169,000,160,064,133,088,132,089 : rem LDA #0; LDY #$40; STA 88; STY 89 125 data 076,191,163 : rem JMP $A3BF 130 rem COPY $D000-$DFFF -> $3000-$3FFF 135 rem move char set rom into ram 140 poke 56334,peek(56334) and 254 : rem INTERRUPT OFF 145 poke 1,peek(1) and 251 : rem CHAR SET ROM ON 150 sys 828 : rem START COPY 155 poke 1,peek(1) or 4 : rem CHAR SET ROM OFF 160 poke 56334,peek(56334) or 1 : rem INTERRUPT ON 165 poke 53272,peek(53272) and 240 or 12 : rem CHAR SET RAM AT $3000 170 rem rewrite char [ 175 for a=12504 to 12511: read ze: poke a,ze: poke a+1024,255-ze: next a 180 rem rewrite char # 185 for a=12568 to 12575: read ze: poke a,ze: poke a+1024,255-ze: next a 190 rem rewrite char & 195 for a=12592 to 12599: read ze: poke a,ze: poke a+1024,255-ze: next a 200 rem rewrite char ] 205 for a=12520 to 12527: read ze: poke a,ze: poke a+1024,255-ze: next a 210 rem rewrite char ( 215 for a=12608 to 12615: read ze: poke a,ze: poke a+1024,255-ze: next a 220 rem rewrite char ! 225 for a=12552 to 12559: read ze: poke a,ze: poke a+1024,255-ze: next a 230 rem rewrite char % 235 for a=12584 to 12591: read ze: poke a,ze: poke a+1024,255-ze: next a 240 rem rewrite char ) 245 for a=12616 to 12623: read ze: poke a,ze: poke a+1024,255-ze: next a 700 data 15,16,32,64,255,128,128,128 710 data 128,128,128,128,128,128,128,128 720 data 128,128,128,128,128,128,128,255 730 data 255,0,0,0,255,0,0,0 740 data 0,0,0,0,0,0,0,255 750 data 255,3,5,9,241,17,17,17 760 data 17,17,17,17,17,17,17,17 770 data 17,17,17,17,18,20,24,240 800 print " []! []! " 810 print " #5% #2%" 820 print " &() &()" Programming 6 sided dice 16318421 16318421 2426 2426 8 8 12345678 12345678 1 xxxx xxxxxxxx xxxxxxxx 15, 255, 255 2 x . xx 16, 0, 3 3 x . x x 32, 0, 5 4 x . x x 64, 0, 9 5 xxxxxxxx xxxxxxxx xxxx x 255, 255, 241 1+16+32+64+128 6 x . x x 128, 0, 17 7 x . x x 128, 0, 17 8 x x x 128, 0, 17 char=[ char=] char=! 1 x x x 128, 17 2 x x x 128, 17 3 x x x 128, 17 4 x x x 128, 17 5 x x x 128, 17 6 x x x 128, 17 7 x x x 128, 17 8 x x x 128, 17 char=# char=% 1 x x x 128, 0, 17 2 x x x 128, 0, 17 3 x x x 128, 0, 17 4 x x x 128, 0, 17 5 x x x 128, 0, 18 6 x x x 128, 0, 20 7 x xx 128, 0, 24 8 xxxxxxx xxxxxxxx xxxxx 255, 255, 240 16+32+64+128 char=& char=( char=) 12504 12505 12506 12507 12508 12509 12510 12511 -> [ 12512 12513 12514 12515 12516 12517 12518 12519 -> English pound or (carrot vice) 12520 12521 12522 12523 12524 12525 12526 12527 -> ] 12528 12529 12530 12531 12532 12533 12534 12535 -> Up arrow 12536 12537 12538 12539 12540 12541 12542 12543 -> left arrow 12544 12545 12546 12547 12548 12549 12550 12551 -> space 12552 12553 12554 12555 12556 12557 12558 12559 -> ! 12560 12561 12562 12563 12564 12565 12566 12567 -> " 12568 12569 12570 12571 12572 12573 12574 12575 -> # 12576 12577 12578 12579 12580 12581 12582 12583 -> $ 12584 12585 12586 12587 12588 12589 12590 12591 -> % 12592 12593 12594 12595 12596 12597 12598 12599 -> & 12600 12601 12602 12603 12604 12605 12606 12607 -> ' 12608 12609 12610 12611 12612 12613 12614 12615 -> ( 12616 12617 12618 12619 12620 12621 12622 12623 -> )

Monday, April 14, 2025

Update coming for the c64 DDD



Here is a proof of concept for the C64. this is not part of the graphics I will be using. In fact, I have ditched all the graphics that I made for the C64 version. Instead I'm going to make them more like the TI-99/4A. But first I had to make sure I could do exactly that. So here is my code and the graphic plotting for this code.

100 rem copy routine
110 for i=0 to 26: read x: poke 828+i,x: next i
120 data 169,000,160,208,133,095,132,096 : rem LDA #0; LDY #$D0; STA 95, STY 96
130 data 169,000,160,224,133,090,132,091 : rem LDA #0; LDY #$E0; STA 90; STY 91
140 data 169,000,160,064,133,088,132,089 : rem LDA #0; LDY #$40; STA 88; STY 89
150 data 076,191,163 : rem JMP $A3BF
160 rem COPY $D000-$DFFF -> $3000-$3FFF

200 rem CHAR SET ROM INTO RAM
210 poke 56334,peek(56334) and 254 : rem INTERRUPT OFF
220 poke 1,peek(1) and 251 : rem CHAR SET ROM ON
230 sys 828 : rem START COPY
240 poke 1,peek(1) or 4 : rem CHAR SET ROM OFF
250 poke 56334,peek(56334) or 1 : rem INTERRUPT ON
260 poke 53272,peek(53272) and 240 or 12 : rem CHAR SET RAM AT $3000

600 rem rewrite char
610 for a=12504 to 12535: read ze: poke a,ze: poke a+1024,255-ze: next a

700 data 15,16,32,64,255,128,128,136
710 data 136,136,136,136,136,128,128,255
720 data 255,3,5,9,241,17,17,17
730 data 17,17,17,17,18,20,24,240
800 print "[]"
810 print " ^"

Programming dice with 4 character concept.
  16318421  16318421
  2426      2426    
  8         8      
  12345678  12345678
1     xxxx  xxxxxxxx     15, 255      
2    x .          xx     16,   3   
3   x  .         x x     32,   5
4  x   .        x  x     64,   9
5 xxxxxxxx  xxxx   x    255, 241         1+16+32+64+128
6 x    .       x   x    128,  17
7 x    .       x   x    128,  17 
8 x    x       x   x    136,  17
9 x    x       x   x    136,  17
10x    x       x   x    136,  17
11x    x       x   x    136,  17
12x    x       x   x    136,  17
13x    x       x  x     136,  18
14x            x x      128,  20
15x            xx       128,  24
16xxxxxxx  xxxxx        255,  240           16+32+64+128



Wednesday, April 9, 2025

One POKE draw.



POKE 788, 80 or POKE 788,82  will make your C64 into a colorful etch-a-sketch.  Use arrow keys to draw and control and number to change colors.






Saturday, April 5, 2025

Updating code



I'm currently working on two areas for the DDD project. I'm plugging along on the Linux, Windows, and MacOS software. These are becoming a very complicated software. Because of this, a lot of documentation is being created to for planning the code.

Secondly, I'm looking at making the Atari and C64 dice app look better. It is not that both system are not capable, they definitely are. It is just how the two companies chose to do graphics. The TI-99 is just easier and more flexible to do graphics with. A lot of the concepts are the same, but working with binary to hexadecimal is easier than the conversions of binary to decimal. And TI-99's ability to intermix text and graphics make a project like this easier. Below is calculating one line of graphics on Atari and C64.
So for the C64 I would have to POKE 127 at certain location in video.

For the same graphic line created on the TI-99, the value you would use would be 7F based on this chart

Worse yet, I don't know of a method of intermixing text and graphic like is default with the TI-99.  so each dice outcome has to be drawn.  Even with Windows and Linux, if I needed to, I could place text on the graphic.

TI Performance testing

Creative Computing wrote benchmark code. I converted the benchmark code: My goal is to benchmark all the TI products This is the code for p...