Compare commits

...

2 Commits

Author SHA1 Message Date
Aminda Suomalainen ⚧ 451f9106df
piraatti_intro.ras: %retab! 2023-02-18 13:18:02 +02:00
Aminda Suomalainen ⚧ 054a0ea3e1
add .editorconfig 2023-02-18 13:17:48 +02:00
2 changed files with 279 additions and 268 deletions

11
.editorconfig Normal file
View File

@ -0,0 +1,11 @@
root = true
[*]
trim_trailing_whitespace = true
insert_final_newline = true
charset = utf-8
indent_style = tab
indent_size = tab
[*md]
trim_trailing_whitespace = false

View File

@ -31,7 +31,7 @@ var
@define mainFadeToText 3 @define mainFadeToText 3
mainState : byte = @mainPicture; mainState : byte = @mainPicture;
mainTime : integer = 0; mainTime : integer = 0;
/* /*
Opening writer main variables Opening writer main variables
@ -74,7 +74,7 @@ var
*/ */
text : string = (@cmoveto, 6,10, text : string = (@cmoveto, 6,10,
"TIETOYHTEISKUNTA TARVITSEE ", @cpause,12, "TIETOYHTEISKUNTA TARVITSEE ", @cpause,12,
@cmoveto, 10,12, @cmoveto, 10,12,
"TEKNOLOGIAPUOLUEEN ", @cpause,32, "TEKNOLOGIAPUOLUEEN ", @cpause,32,
@cstop); @cstop);
@ -89,11 +89,11 @@ text : string = (@cmoveto, 6,10,
fastPlasmaSweep : array[256] of byte = buildtable("10 * (-Math.cos(2 * i * 6.28 / 256) * 0.5 + 0.5)"); fastPlasmaSweep : array[256] of byte = buildtable("10 * (-Math.cos(2 * i * 6.28 / 256) * 0.5 + 0.5)");
textPlStartX : byte = 0; textPlStartX : byte = 0;
textPlStartY : byte = 0; textPlStartY : byte = 0;
textPlEndX : byte = 40; textPlEndX : byte = 40;
textPlEndY : byte = 7; textPlEndY : byte = 7;
textPlOfsX, textPlOfsY : byte = 0; textPlOfsX, textPlOfsY : byte = 0;
textPlAdd : byte = 0; textPlAdd : byte = 0;
textBlinkOfs : byte = 0; textBlinkOfs : byte = 0;
@ -166,7 +166,7 @@ text : string = (@cmoveto, 6,10,
/* /*
Main part Main part
*/ */
@define mainpart_bitmapArea $6000 // <-- VIDEO BUFFER IS HERE!! @define mainpart_bitmapArea $6000 // <-- VIDEO BUFFER IS HERE!!
@define piraattinaamat1_color $5200 @define piraattinaamat1_color $5200
@define piraattinaamat1_data $8000 @define piraattinaamat1_data $8000
@ -203,17 +203,17 @@ text : string = (@cmoveto, 6,10,
@piraattinaamat2_data, @piraattinaamat2_color, @piraattinaamat2_data, @piraattinaamat2_color,
@piraattinaamat2_data, @piraattinaamat2_color); @piraattinaamat2_data, @piraattinaamat2_color);
naamatCoordinates : array[] of byte = ( 0, 0, 13, 12, naamatCoordinates : array[] of byte = ( 0, 0, 13, 12,
13, 0, 13, 12, 13, 0, 13, 12,
26, 0, 13, 12, 26, 0, 13, 12,
0, 12, 13, 12, 0, 12, 13, 12,
13, 12, 13, 12, 13, 12, 13, 12,
26, 12, 13, 12, 26, 12, 13, 12,
0, 0, 13, 12, 0, 0, 13, 12,
13, 0, 13, 12, 13, 0, 13, 12,
26, 0, 13, 12, 26, 0, 13, 12,
0, 12, 13, 12, 0, 12, 13, 12,
13, 12, 13, 12, 13, 12, 13, 12,
26, 12, 13, 12); 26, 12, 13, 12);
@ -233,7 +233,7 @@ text : string = (@cmoveto, 6,10,
"ARI-PEKKA PULKKIS - VAASA", @cpause, @cstop ); "ARI-PEKKA PULKKIS - VAASA", @cpause, @cstop );
naamatNumbers : string = ( "123", "456", "789", " 10", "20 ", " 30", naamatNumbers : string = ( "123", "456", "789", " 10", "20 ", " 30",
" 40", "50 ", " 60", " 70", " 80", " 90", @cstop); " 40", "50 ", " 60", " 70", " 80", " 90", @cstop);
tab320 : array[25] of integer = buildtable("i*320"); tab320 : array[25] of integer = buildtable("i*320");
@ -257,42 +257,42 @@ text : string = (@cmoveto, 6,10,
mainPartBigFont:incbin("resources/charsets/broadway_xy.bin", @mainPartBigFontLoc); mainPartBigFont:incbin("resources/charsets/broadway_xy.bin", @mainPartBigFontLoc);
@define numMainTextPages 6 @define numMainTextPages 6
mainText : string = ( @cmoveto, 0, 3, " COMMODORELLA ", mainText : string = ( @cmoveto, 0, 3, " COMMODORELLA ",
@cmoveto, 0, 4, " EDUSKUNTAAN ", @cmoveto, 0, 4, " EDUSKUNTAAN ",
@cmoveto, 0, 5, " 2023 ", @cmoveto, 0, 5, " 2023 ",
@cpage, @cpage,
@cmoveto, 0, 2, " RADIKAALISTI ", @cmoveto, 0, 2, " RADIKAALISTI ",
@cmoveto, 0, 3, " AVOINTA ", @cmoveto, 0, 3, " AVOINTA ",
@cmoveto, 0, 4, " DEMOKRATIAA ", @cmoveto, 0, 4, " DEMOKRATIAA ",
@cmoveto, 0, 5, " VALTIONHALLINNON ", @cmoveto, 0, 5, " VALTIONHALLINNON ",
@cmoveto, 0, 6, " LIVESTREAMAUS ", @cmoveto, 0, 6, " LIVESTREAMAUS ",
@cmoveto, 0, 7, " LAHTOKOHTAISESTI ", @cmoveto, 0, 7, " LAHTOKOHTAISESTI ",
@cpage, @cpage,
@cmoveto, 0, 2, " LOBBAUS NAKYVAKSI ", @cmoveto, 0, 2, " LOBBAUS NAKYVAKSI ",
@cmoveto, 0, 3, " LAAJA JULKISUUSLAKI", @cmoveto, 0, 3, " LAAJA JULKISUUSLAKI",
@cmoveto, 0, 4, "KANSANAANESTYSALOITE", @cmoveto, 0, 4, "KANSANAANESTYSALOITE",
@cmoveto, 0, 5, " RAHANKERAYSLAIN ", @cmoveto, 0, 5, " RAHANKERAYSLAIN ",
@cmoveto, 0, 6, " UUDISTUS ", @cmoveto, 0, 6, " UUDISTUS ",
@cmoveto, 0, 7, " PERUSTULO ", @cmoveto, 0, 7, " PERUSTULO ",
@cpage, @cpage,
@cmoveto, 0, 2, " PERUSOIKEUDET ", @cmoveto, 0, 2, " PERUSOIKEUDET ",
@cmoveto, 0, 3, " YKSITYISYYDENSUOJA ", @cmoveto, 0, 3, " YKSITYISYYDENSUOJA ",
@cmoveto, 0, 4, " YHDENVERTAISUUS ", @cmoveto, 0, 4, " YHDENVERTAISUUS ",
@cmoveto, 0, 5, " KESTAVYYSSIIRTYMA ", @cmoveto, 0, 5, " KESTAVYYSSIIRTYMA ",
@cmoveto, 0, 6, " VETYTALOUDEN ", @cmoveto, 0, 6, " VETYTALOUDEN ",
@cmoveto, 0, 7, " TEKNOLOGIATUKI ", @cmoveto, 0, 7, " TEKNOLOGIATUKI ",
@cpage, @cpage,
@cmoveto, 0, 2, " HYVINVOINTIALUEIDEN", @cmoveto, 0, 2, " HYVINVOINTIALUEIDEN",
@cmoveto, 0, 3, " VERONKANTO-OIKEUS ", @cmoveto, 0, 3, " VERONKANTO-OIKEUS ",
@cmoveto, 0, 4, "PAIKALLISDEMOKRATIAN", @cmoveto, 0, 4, "PAIKALLISDEMOKRATIAN",
@cmoveto, 0, 5, " VAHVISTAMINEN ", @cmoveto, 0, 5, " VAHVISTAMINEN ",
@cmoveto, 0, 6, " LUONTO MAANKAYTTO ", @cmoveto, 0, 6, " LUONTO MAANKAYTTO ",
@cmoveto, 0, 7, " KESTAVYYS ", @cmoveto, 0, 7, " KESTAVYYS ",
@cpage, @cpage,
@cmoveto, 0, 3, " TIETOPOLITIIKAN ", @cmoveto, 0, 3, " TIETOPOLITIIKAN ",
@cmoveto, 0, 4, " VAKIINNUTTAMINEN ", @cmoveto, 0, 4, " VAKIINNUTTAMINEN ",
@cmoveto, 0, 5, " OSAKSI HALLINTO- ", @cmoveto, 0, 5, " OSAKSI HALLINTO- ",
@cmoveto, 0, 6, " RAKENNETTA ", @cmoveto, 0, 6, " RAKENNETTA ",
@cpage, @cstop); @cpage, @cstop);
mainPartAddressTable : array[25] of integer; mainPartAddressTable : array[25] of integer;
@ -312,7 +312,7 @@ text : string = (@cmoveto, 6,10,
rasterLineMainScroller : byte = 240; rasterLineMainScroller : byte = 240;
// TODO optimize spaces // TODO optimize spaces
scrollText : string = " YARRRR SAILORS WELCOME TO THE FINNISH PIRATE PARTY PARLIAMENTARY ELECTION 2023 INTRO --- VOTE FOR US --- WE ROCK THE WORLD IN 8 BITS AND BEYOND --- WRITTEN BY GIMLE IN TRSE --- MUSIC BY GIMLE IN SIDFACTORY II --- MUCH LOVE AND GREETINGS TO THE C64 DEMOSCENE --- WE SALUTE SOME GROUNDBREAKING TECHNOLOGICAL PIRATES --- FINNISH GOLD - EXTEND - VIRTUAL DREAMS - FAIRLIGHT - BYTERAPERS - BLOODSUCKERS - ARTLINE DESIGNS - DEKADENCE - BOOZE DESIGN - ACCESSION - NOICE - PROXIMA - ORANGE - CNCD - KEWLERS - MFX - TPOLM - MATUREFURK - KATASTRO FI - SCOOPEX - TAAT - HEDELMAE - JUMALAUTA - KAITA FILMITUOTANTO - BRAINLEZ CODERS - SYMPTOM - GOTO 10 - DAMONES - DA JORMAS - WIDE LOAD - HIRMU --- "; scrollText : string = " YARRRR SAILORS WELCOME TO THE FINNISH PIRATE PARTY PARLIAMENTARY ELECTION 2023 INTRO --- VOTE FOR US --- WE ROCK THE WORLD IN 8 BITS AND BEYOND --- WRITTEN BY GIMLE IN TRSE --- MUSIC BY GIMLE IN SIDFACTORY II --- MUCH LOVE AND GREETINGS TO THE C64 DEMOSCENE --- WE SALUTE SOME GROUNDBREAKING TECHNOLOGICAL PIRATES --- FINNISH GOLD - EXTEND - VIRTUAL DREAMS - FAIRLIGHT - BYTERAPERS - BLOODSUCKERS - ARTLINE DESIGNS - DEKADENCE - BOOZE DESIGN - ACCESSION - NOICE - PROXIMA - ORANGE - CNCD - KEWLERS - MFX - TPOLM - MATUREFURK - KATASTRO FI - SCOOPEX - TAAT - HEDELMAE - JUMALAUTA - KAITA FILMITUOTANTO - BRAINLEZ CODERS - SYMPTOM - GOTO 10 - DAMONES - DA JORMAS - WIDE LOAD - HIRMU --- ";
scrollTextOffset : integer = 0; scrollTextOffset : integer = 0;
scrollTextLength : integer = 0; scrollTextLength : integer = 0;
scrollCurrent : byte = 0; scrollCurrent : byte = 0;
@ -379,27 +379,27 @@ end;
procedure CopyCharsetRomToRam(targetHi : byte); procedure CopyCharsetRomToRam(targetHi : byte);
begin begin
asm(" asm("
ldx #$08 ; we loop 8 times (8x255 = 2Kb) ldx #$08 ; we loop 8 times (8x255 = 2Kb)
lda #$33 ; make the CPU see the Character Generator ROM... lda #$33 ; make the CPU see the Character Generator ROM...
sta $01 ; ...at $D000 by storing %00110011 into location $01 sta $01 ; ...at $D000 by storing %00110011 into location $01
lda #$d0 ; load high byte of $D000 lda #$d0 ; load high byte of $D000
sta $fc ; store it in a free location we use as vector sta $fc ; store it in a free location we use as vector
ldy #$00 ; init counter with 0 ldy #$00 ; init counter with 0
sty $fb ; store it as low byte in the $FB/$FC vector sty $fb ; store it as low byte in the $FB/$FC vector
lda $fd ; second pair in $FD/$FE lda $fd ; second pair in $FD/$FE
lda targetHi ; point to target lda targetHi ; point to target
sta $fe sta $fe
loopc lda ($fb),y ; read byte from vector stored in $fb/$fc loopc lda ($fb),y ; read byte from vector stored in $fb/$fc
sta ($fd),y ; write to the RAM sta ($fd),y ; write to the RAM
iny ; do this 255 times... iny ; do this 255 times...
bne loopc ; ..for low byte $00 to $FF bne loopc ; ..for low byte $00 to $FF
inc $fc ; when we passed $FF increase high byte... inc $fc ; when we passed $FF increase high byte...
inc $fe inc $fe
dex ; ... and decrease X by one before restart dex ; ... and decrease X by one before restart
bne loopc ; We repeat this until X becomes Zero bne loopc ; We repeat this until X becomes Zero
lda #$37 ; switch in I/O mapped registers again... lda #$37 ; switch in I/O mapped registers again...
sta $01 ; ... with %00110111 so CPU can see them sta $01 ; ... with %00110111 so CPU can see them
"); ");
end; end;
@ -562,14 +562,14 @@ begin
10, // Volume 10, // Volume
Random()/128 + 5, // Hi byte frequency Random()/128 + 5, // Hi byte frequency
0*16+0, // Attack voice 1 0*16+0, // Attack voice 1
15*16 + 3, // Sustain = 16*15 + release=6 15*16 + 3, // Sustain = 16*15 + release=6
1 +sid_noise, // Waveform 1 +sid_noise, // Waveform
sid_noise); // waveform sid_noise); // waveform
PlaySound(sid_channel2, PlaySound(sid_channel2,
13, // Volume 13, // Volume
6, // Hi byte frequency 6, // Hi byte frequency
0*16+0, // Attack voice 1 0*16+0, // Attack voice 1
4*16 + 3, // Sustain = 16*15 + release=6 4*16 + 3, // Sustain = 16*15 + release=6
1 + sid_tri, // Waveform 1 + sid_tri, // Waveform
sid_tri); // waveform sid_tri); // waveform
end; end;
@ -752,7 +752,7 @@ begin
tempPtr2 += 320; tempPtr2 += 320;
end; end;
// color data #1 // color data #1
tempPtr2 := #screen_char_loc2; tempPtr2 := #screen_char_loc2;
tempPtr2 += toY2 * 40 + toX2; tempPtr2 += toY2 * 40 + toX2;
@ -1347,7 +1347,7 @@ begin
fadeOfsCurrent := 0; fadeOfsCurrent := 0;
end; end;
end; end;
if (fadeStateCurrent = @fadeStateText) then if (fadeStateCurrent = @fadeStateText) then
begin begin
fadeTemp := textFadeLumi[fadeOfsCurrent]; fadeTemp := textFadeLumi[fadeOfsCurrent];
Fill(screen_col_loc, fadeTemp, 255); Fill(screen_col_loc, fadeTemp, 255);