Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user maak ! (Registered 2024-04-18) You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Alt-history no-cost design changes with great value
2021-05-01 22:49
Krill

Registered: Apr 2002
Posts: 2825
Alt-history no-cost design changes with great value

Which things in the C-64 could have been implemented or connected differently without conceivable extra cost, for coding advantages?

Thinking of things like shuffling the chip register bits like VIC's $d011 and $d016 differently (such that some effects can be achieved with fewer register writes or less twiddling).
Or putting some IO register to $01 (and move the memory configuration somewhere else, somehow).
Maybe also having different PLA memory configurations (not necessarily more).
Or connecting external signals to the CIA port pins in a different order.

Discuss! =)
 
... 70 posts hidden. Click here to view all posts....
 
2021-06-09 10:35
oziphantom

Registered: Oct 2014
Posts: 478
I want cart memory without kernal.
2021-06-09 11:06
ChristopherJam

Registered: Aug 2004
Posts: 1370
No, the state byte is the result of the most recent xor. Perhaps an example would help.

Start by filling buffer with this:
(base 4, using _ for 0 to make it a bit easier to read)
____ __12 12__ ____ __11 11__ ____
____ _121 2___ ____ __12 12__ ____
____ 1212 ____ ____ _111 1___ ____
____ 2121 ____ ____ _212 1___ ____
___2 121_ ____ ____ 1111 ____ ____
__21 21__ ____ ____ 1212 ____ ____

Note that for each of the two edges in the desired output, we're writing two bytes to each line; one updating the pattern in the right side of a byte, the next updating the pattern in the left.

Then, scanning from left to right, replace each input byte with the XOR of itself with the last byte output:
____ __12 1212 1212 12_3 _3_3 _3_3
____ _121 2121 2121 2133 3333 3333
____ 1212 1212 1212 13_3 _3_3 _3_3
____ 2121 2121 2121 2333 3333 3333
___2 1212 1212 1212 _3_3 _3_3 _3_3
__21 2121 2121 2121 3333 3333 3333

Now we have three regions, black on the left, a 1/2 checker in the middle, and a 03/33 stipple on the right.
Here's the eorfiller, assuming the data is in a charset
    ldx#127
loop:
    lda cset,x
    eor cset+128*0,x
    sta cset+128*0,x
    eor cset+128*1,x
    sta cset+128*1,x
    eor cset+128*2,x
    sta cset+128*2,x
    eor cset+128*3,x
    sta cset+128*3,x
    ...
    dex
    bpl loop


Widening Oswald's example a little, you do this:

%00001111 %11110000 %00000000 %00101010 %10000000

this will fill with my code to:

%00001111 %11111111 %11111111 %11010101 %01010101
2021-06-09 12:43
Oswald

Registered: Apr 2002
Posts: 5017
this is fuckin genious man, and why is this better for efluvium than vertical eorfill ?
2021-06-09 12:44
Oswald

Registered: Apr 2002
Posts: 5017
but there is extra overhead of having to make 2 bytes per edge, so why not just per pixel horizontal HW fill ?
2021-06-09 13:08
ChristopherJam

Registered: Aug 2004
Posts: 1370
Cheers, Oswald.

Well, for vertical fill you still need two writes if you're going to get a pattern fill - and tracking the pattern phase for that one hurt my brain too much haha.

Per pixel HW fill would be fine if you just want solid colour, but why not go the extra six bits and get patterns :)

The extra cost of the second write is fairly low compared to calculating the X offset anyway.
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
A3/AFL
St0rmfr0nt/Quantum
bepp/ΤRIΛD
psych
iAN CooG/HVSC
Scooby/G★P/Light
Nordischsound/Hokuto..
kbs/Pht/Lxt
csio/monarchy c+4
pcollins/Quantum
megasoftargentina
K-reator/CMS/F4CG
skull
Guests online: 79
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 The Ghost  (9.6)
10 Bromance  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.8)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 Rainbow Connection  (9.5)
6 Wafer Demo  (9.5)
7 TRSAC, Gabber & Pebe..  (9.5)
8 Onscreen 5k  (9.5)
9 Dawnfall V1.1  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Diskmag Editors
1 Jazzcat  (9.4)
2 Magic  (9.4)
3 hedning  (9.2)
4 Newscopy  (9.1)
5 Elwix  (9.1)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.037 sec.