Compare commits
42 Commits
editorconf
...
master
Author | SHA1 | Date |
---|---|---|
gimulnautti | e81c27ec61 | |
gimulnautti | 201b4f697c | |
gimulnautti | b2af6e7c77 | |
gimulnautti | 0be8189280 | |
gimulnautti | ddb99a168f | |
gimulnautti | 38b341cf69 | |
gimulnautti | 726c852afe | |
gimulnautti | a6cca51ffd | |
gimulnautti | 02a404af42 | |
gimulnautti | 0f00d61501 | |
gimulnautti | b36b28ca07 | |
gimulnautti | 75c258f738 | |
gimulnautti | 1cc836cfcd | |
gimulnautti | c32e866d70 | |
gimulnautti | 755e0d1f59 | |
gimulnautti | 76e39a794a | |
gimulnautti | 29bcfab4f5 | |
gimulnautti | 54424f7268 | |
gimulnautti | 9c023524b9 | |
gimulnautti | fac00817aa | |
gimulnautti | 52bf609acc | |
gimulnautti | 5e671d3548 | |
gimulnautti | 9b6fd57100 | |
gimulnautti | cef15740c0 | |
gimulnautti | 8ee6c5edf8 | |
gimulnautti | 3b39c13b76 | |
gimulnautti | 18e2ab75f2 | |
gimulnautti | 864471d582 | |
gimulnautti | fde541ab41 | |
gimulnautti | dd9e93958d | |
gimulnautti | 7bd6e2dde2 | |
gimulnautti | 5ee37dd646 | |
Gimle | 0d8299ad59 | |
Gimle | e2add48af9 | |
gimulnautti | c0fd50cd52 | |
gimulnautti | b61a9f90e9 | |
gimulnautti | 91c37baece | |
gimulnautti | 63650d0dd3 | |
gimulnautti | 205b2f2f6c | |
gimulnautti | 90b097dc24 | |
Aminda Suomalainen ⚧ | fa55d6cfee | |
Aminda Suomalainen ⚧ | 3f0fdcb236 |
|
@ -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
|
|
@ -1 +1 @@
|
|||
*.ras text=auto
|
||||
* text=auto
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
*.asm
|
||||
*.sym
|
||||
*.prg
|
||||
|
|
|
@ -8,7 +8,7 @@ zeropage_decrunch3 = $4a
|
|||
zeropage_decrunch4 = $4b
|
||||
pascal_settings_use_local_variables = 0
|
||||
system = C64
|
||||
main_ras_file = none
|
||||
main_ras_file = piraatti_intro.ras
|
||||
zeropage_internal1 = $4c
|
||||
zeropage_internal2 = $4e
|
||||
zeropage_internal3 = $50
|
||||
|
@ -29,7 +29,7 @@ override_target_settings_org = $810
|
|||
override_target_settings_ignore_sys = 0
|
||||
override_target_settings_ignore_prg = 0
|
||||
output_debug_symbols = 1
|
||||
open_files = ,piraatti_intro.ras
|
||||
open_files = ,resources/images/piraattinaamat-2.flf, resources/images/piraattinaamat-1.flf, piraatti_intro.ras
|
||||
project_path = /Users/gimulnautti/piraattipuolue-github/c64-vaali-intro-2023/
|
||||
zeropage_colormemory = $fb
|
||||
dirart_flf_file = none
|
||||
|
@ -40,7 +40,7 @@ remove_unused_symbols = 1
|
|||
ignore_initial_jump = 0
|
||||
current_file = piraatti_intro.ras
|
||||
output_type = prg
|
||||
exomizer_toggle = 0
|
||||
exomizer_toggle = 1
|
||||
use_track_19 = 1
|
||||
disable_compiler_comments = 0
|
||||
charset_ = :resources/character.rom
|
||||
|
@ -77,4 +77,8 @@ override_target_settings_basic = 0
|
|||
override_target_settings_sys = 0
|
||||
override_target_settings_prg = 0
|
||||
build_list = ,
|
||||
data_header_resources/images/piraattinaamat-2.flf = 6.42703e-314
|
||||
data_header_resources/images/piraattinaamat-2.flf = 0
|
||||
disk1_paw = 6.48452e-314
|
||||
disk1_flf = 6.48452e-314
|
||||
disk1_type = 6.48452e-314
|
||||
disk1_name = piraatti_intro.d64
|
||||
|
|
25
README.md
25
README.md
|
@ -3,21 +3,36 @@
|
|||
Commodore 64:llä toteutettu vaalimainos vanhaan kuusnepa demoscene tyyliin
|
||||
Musiikki toteutettu SIDFactory II
|
||||
|
||||
### Levyimagen lataaminen
|
||||
|
||||
1. Valitse tiedosto `commodorella_eduskuntaan.d64` ja lataa.
|
||||
2. Kirjoita tikulle tai oikealle 1541 levykkeelle.
|
||||
|
||||
### Kääntäminen
|
||||
|
||||
1. Lataa [Turbo Rascal Syntax Error](https://lemonspawn.com/turbo-rascal-syntax-error-expected-but-begin/) retro-kehitysympäristö koneellesi (Win/Max/Linux)
|
||||
1. Lataa [Turbo Rascal Syntax Error](https://lemonspawn.com/turbo-rascal-syntax-error-expected-but-begin/) retro-kehitysympäristö koneellesi (Win/Mac/Linux)
|
||||
2. Asenna [VICE](https://vice-emu.sourceforge.io/) tai muu Commodore 64 emulaattori
|
||||
3. Aseta TRSE emulaattori-asetukset
|
||||
4. Avaa piraatti_intro.trse Turbo Rascal Syntax Errorissa ja aja ctrl-r tai cmd-r
|
||||
4. Avaa piraatti_intro.trse Turbo Rascal Syntax Errorissa
|
||||
5. Avaa `piraaatti_intro.ras` ja aja painalla ctrl-r tai cmd-r
|
||||
|
||||
### Oman version tekeminen
|
||||
|
||||
1. Valmistele 2 kpl 320x200 resoluution png-kuvatiedostoa, joissa kukin ehdokkaan naaama on 104x96 pikselin kokoisena. Oikeaan reunaan ja alareunaan pitäisi jäädä tyhjät 8 pikselin palkit jos koot ovat oikein
|
||||
1. Valmistele 2 kpl 320x200 resoluution png-kuvatiedostoa, joissa kukin ehdokkaan naaama on 104x96 pikselin kokoisena. Oikeaan reunaan ja alareunaan pitäisi jäädä tyhjät 8 pikselin palkit jos koot ovat oikein. Katso esimerkki `naamat-esimerkki.png` tiedostosta.
|
||||
2. Avaa `resources/images/piraattinaamat-1.flf` sekä `resources/images/piraattinaamat-2.flf`
|
||||
3. Käytä import image toimintoa tuodaksesi luomasi kuvatiedostot commodore 64-moutoon
|
||||
4. Avaa piraatti_intro.ras ja mene riville 220 josta alkaa muuttuja `naamatNames : string = (`
|
||||
3. Käytä import image toimintoa tuodaksesi luomasi kuvatiedostot commodore 64-muotoon
|
||||
4. Avaa `piraatti_intro.ras` ja mene riville 220 josta alkaa muuttuja `naamatNames : string = (`
|
||||
5. Täytä ehdokkaiden nimet ja vaalipiirit
|
||||
6. Mene riville 235 josta alkaa muuttuja `naamatNumbers : string = (`
|
||||
7. Täytä ehdokasnumerot, ja käytä _tasan_ kolme merkkiä jokaiseen, muuten intro ei toimi!
|
||||
8. Käännä ja aja tiedosto, tarkista että toimii
|
||||
9. Exporttaa haluamaasi muotoon tai nauhoita video!
|
||||
|
||||
### Näyttäminen vaalikojulla fullscreeninä suoraan emulaattorista
|
||||
|
||||
1. Aja build tai run TRSEllä (ctrl-b / cmd-b)
|
||||
2. Etsi projektin juuresta `piraatti_intro.prg`
|
||||
3. Avaa VICE ja c64 käynnistyä
|
||||
4. Jos `Preferences` valikossa on valittuna `Show menu/status in fullscreen` ota se pois päältä
|
||||
5. Raahaa `piraatti_intro.prg` emulaattorin ikkunan päälle
|
||||
6. Tuplanapauta emulaattorin ikkunaa siirtyäksesi fullscreeniin
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,6 @@
|
|||
rm commodorella_eduskuntaan.d64
|
||||
c1541 -format "eduskuntaan 2023,0" d64 commodorella_eduskuntaan.d64
|
||||
c1541 -attach commodorella_eduskuntaan.d64 -write piraatti_intro.prg piraattipuolue
|
||||
c1541 -attach commodorella_eduskuntaan.d64 -write helsinki.prg helsinki
|
||||
c1541 -attach commodorella_eduskuntaan.d64 -write helsinki-uusimaa.prg helsinki-uusimaa
|
||||
c1541 -attach commodorella_eduskuntaan.d64 -write muu-maa.prg muu-maa
|
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 113 KiB |
Binary file not shown.
|
@ -57,8 +57,13 @@ var
|
|||
|
||||
@define spriteLoc $3c80
|
||||
@define charSetCopyLoc $c000
|
||||
|
||||
charsetCopyBlock : array[1024] of byte = buildtable("0") at @charSetCopyLoc;
|
||||
|
||||
@define spriteBank 0
|
||||
|
||||
spriteCopyBlock : array[63] of byte = buildtable("0") at @spriteLoc;
|
||||
|
||||
lookup3Dx : array[40] of integer = buildtable("300 * (i - 20) / 200");
|
||||
lookup3Dy : array[25] of integer = buildtable("300 * (i - 11) / 30");
|
||||
|
||||
|
@ -223,27 +228,29 @@ text : string = (@cmoveto, 6,10,
|
|||
"RIIKKA NIEMINEN - UUSIMAA", @cpause,
|
||||
"JARI NIKKINEN - SAVO-KARJALA", @cpause,
|
||||
"SATU IMMONEN - HELSINKI", @cpause,
|
||||
"PEKKA MUSTONEN - HELSINKI", @cpause,
|
||||
"PEKKA MUSTONEN - SAVO-KARJALA", @cpause,
|
||||
|
||||
"REETTA OJALA - HELSINKI", @cpause,
|
||||
"MAREK NETSHADA - HELSINKI", @cpause,
|
||||
"OLAVI KAUKAMIELI - HELSINKI", @cpause,
|
||||
"PYRY SAARELA - VARSINAIS-SUOMI", @cpause,
|
||||
"JONI MAHLAMAKI - UUSIMAA", @cpause,
|
||||
"KAUSTI RANTALAINEN - HELSINKI", @cpause,
|
||||
"ARI-PEKKA PULKKIS - VAASA", @cpause, @cstop );
|
||||
"ARI-PEKKA PULKKIS - HELSINKI", @cpause, @cstop );
|
||||
|
||||
naamatNumbers : string = ( "123", "456", "789", " 10", "20 ", " 30",
|
||||
" 40", "50 ", " 60", " 70", " 80", " 90", @cstop);
|
||||
naamatNumbers : string = ( "353", "113", "356", "91 ", "-5-", " 89",
|
||||
" 13", " 12", "-8-", "354", " 18", " 17", @cstop);
|
||||
|
||||
|
||||
tab320 : array[25] of integer = buildtable("i*320");
|
||||
tab40 : array[25] of integer = buildtable("i*40");
|
||||
|
||||
@define numberSpriteCopies $5800
|
||||
@define numberSpriteCopies $5e00
|
||||
numberSprite0loc : byte = @numberSpriteCopies / 64 + 0;
|
||||
numberSprite1loc : byte = @numberSpriteCopies / 64 + 1;
|
||||
numberSprite2loc : byte = @numberSpriteCopies / 64 + 2;
|
||||
|
||||
numberSpriteCopyBlock : array[192] of byte = buildtable("0") at @numberSpriteCopies;
|
||||
|
||||
numberSpriteFloatX : array[256] of byte = buildtable("Math.sin(i * (2 * 6.28 / 256)) * 7 + Math.cos(i * 6.28 / 256) * 20") at $5c00;
|
||||
numberSpriteFloatY : array[256] of byte = buildtable("Math.cos(i * (3 * 6.28 / 256)) * 5") at $5d00;
|
||||
numberSprite0FloatOfs : byte = 15;
|
||||
|
@ -257,42 +264,64 @@ text : string = (@cmoveto, 6,10,
|
|||
mainPartBigFont:incbin("resources/charsets/broadway_xy.bin", @mainPartBigFontLoc);
|
||||
|
||||
@define numMainTextPages 6
|
||||
mainText : string = ( @cmoveto, 0, 3, " COMMODORELLA ",
|
||||
@cmoveto, 0, 4, " EDUSKUNTAAN ",
|
||||
@cmoveto, 0, 5, " 2023 ",
|
||||
mainText : string = (
|
||||
@cmoveto, 0, 3, " COMMODORELLA",
|
||||
@cmoveto, 0, 4, " EDUSKUNTAAN",
|
||||
@cmoveto, 0, 5, " ---------",
|
||||
@cmoveto, 0, 6, " 2023",
|
||||
@cpage,
|
||||
@cmoveto, 0, 2, " RADIKAALISTI ",
|
||||
@cmoveto, 0, 3, " AVOINTA ",
|
||||
@cmoveto, 0, 4, " DEMOKRATIAA ",
|
||||
@cmoveto, 0, 5, " VALTIONHALLINNON ",
|
||||
@cmoveto, 0, 6, " LIVESTREAMAUS ",
|
||||
@cmoveto, 0, 7, " LAHTOKOHTAISESTI ",
|
||||
@cmoveto, 0, 2, " RADIKAALISTI",
|
||||
@cmoveto, 0, 3, " AVOINTA",
|
||||
@cmoveto, 0, 4, " DEMOKRATIAA",
|
||||
@cmoveto, 0, 5, " VALTIONHALLINNON",
|
||||
@cmoveto, 0, 6, " LIVESTREAMAUS",
|
||||
@cmoveto, 0, 7, " LAHTOKOHTAISESTI",
|
||||
@cpage,
|
||||
@cmoveto, 0, 2, " LOBBAUS NAKYVAKSI ",
|
||||
@cmoveto, 0, 3, " LAAJA JULKISUUSLAKI",
|
||||
@cmoveto, 0, 4, "KANSANAANESTYSALOITE",
|
||||
@cmoveto, 0, 5, " RAHANKERAYSLAIN ",
|
||||
@cmoveto, 0, 6, " UUDISTUS ",
|
||||
@cmoveto, 0, 7, " PERUSTULO ",
|
||||
@cmoveto, 0, 2, " LOBBAUS NAKYVAKSI",
|
||||
@cmoveto, 0, 3, "LAAJA JULKISUUSLAKI",
|
||||
@cmoveto, 0, 4, " KANSANAANESTYS",
|
||||
@cmoveto, 0, 5, " PERUSOIKEUDET",
|
||||
@cmoveto, 0, 6, "YKSITYISYYDENSUOJA",
|
||||
@cmoveto, 0, 7, " YHDENVERTAISUUS",
|
||||
@cpage,
|
||||
@cmoveto, 0, 2, " PERUSOIKEUDET ",
|
||||
@cmoveto, 0, 3, " YKSITYISYYDENSUOJA ",
|
||||
@cmoveto, 0, 4, " YHDENVERTAISUUS ",
|
||||
@cmoveto, 0, 5, " KESTAVYYSSIIRTYMA ",
|
||||
@cmoveto, 0, 6, " VETYTALOUDEN ",
|
||||
@cmoveto, 0, 7, " TEKNOLOGIATUKI ",
|
||||
@cmoveto, 0, 2, " KESTAVYYSSIIRTYMA",
|
||||
@cmoveto, 0, 3, " VETYTALOUDEN",
|
||||
@cmoveto, 0, 4, " TEKNOLOGIATUKI",
|
||||
@cmoveto, 0, 5, "PAIKALLISDEMOKRATIA",
|
||||
@cmoveto, 0, 6, " LUONTO MAANKAYTTO",
|
||||
@cmoveto, 0, 7, " KESTAVYYS",
|
||||
@cpage,
|
||||
@cmoveto, 0, 2, " HYVINVOINTIALUEIDEN",
|
||||
@cmoveto, 0, 3, " VERONKANTO-OIKEUS ",
|
||||
@cmoveto, 0, 4, "PAIKALLISDEMOKRATIAN",
|
||||
@cmoveto, 0, 5, " VAHVISTAMINEN ",
|
||||
@cmoveto, 0, 6, " LUONTO MAANKAYTTO ",
|
||||
@cmoveto, 0, 7, " KESTAVYYS ",
|
||||
@cmoveto, 0, 3, "HYVINVOINTIALUEIDEN",
|
||||
@cmoveto, 0, 4, " VERONKANTO-OIKEUS",
|
||||
@cmoveto, 0, 5, " RAHANKERAYSLAIN",
|
||||
@cmoveto, 0, 6, " UUDISTUS",
|
||||
@cmoveto, 0, 7, " PERUSTULO",
|
||||
@cpage,
|
||||
@cmoveto, 0, 3, " TIETOPOLITIIKAN ",
|
||||
@cmoveto, 0, 4, " VAKIINNUTTAMINEN ",
|
||||
@cmoveto, 0, 5, " OSAKSI HALLINTO- ",
|
||||
@cmoveto, 0, 6, " RAKENNETTA ",
|
||||
@cmoveto, 0, 2, " TAVOITTEELLINEN",
|
||||
@cmoveto, 0, 3, " TUTKIMUS- JA",
|
||||
@cmoveto, 0, 4, " INNOVAATIO-",
|
||||
@cmoveto, 0, 5, " POLITIIKKA",
|
||||
@cmoveto, 0, 6, " TYOPERAINEN",
|
||||
@cmoveto, 0, 7, " MAAHANMUUTTO",
|
||||
@cpage,
|
||||
@cmoveto, 0, 2, " LAPINAKYVAT JA",
|
||||
@cmoveto, 0, 3, " TURVALLISET",
|
||||
@cmoveto, 0, 4, " JULKISET",
|
||||
@cmoveto, 0, 5, " TIETOJARJESTELMAT",
|
||||
@cmoveto, 0, 6, " OSTO-OSAAMISTA",
|
||||
@cmoveto, 0, 7, " YKSITYISTAMISEEN",
|
||||
@cpage,
|
||||
@cmoveto, 0, 2, " ANONYMISOIDUT",
|
||||
@cmoveto, 0, 3, " OPEN ACCESS",
|
||||
@cmoveto, 0, 4, " TIETOKANNAT",
|
||||
@cmoveto, 0, 5, " JULKISHALLINTO",
|
||||
@cmoveto, 0, 6, "TIETEEN TEKNOLOGIAN",
|
||||
@cmoveto, 0, 7, " MOOTTORINA",
|
||||
@cpage,
|
||||
@cmoveto, 0, 3, " TIETOPOLITIIKAN",
|
||||
@cmoveto, 0, 4, " VAKIINNUTTAMINEN",
|
||||
@cmoveto, 0, 5, " OSAKSI HALLINTO-",
|
||||
@cmoveto, 0, 6, " RAKENNETTA",
|
||||
@cpage, @cstop);
|
||||
|
||||
mainPartAddressTable : array[25] of integer;
|
||||
|
@ -312,7 +341,7 @@ text : string = (@cmoveto, 6,10,
|
|||
rasterLineMainScroller : byte = 240;
|
||||
|
||||
// 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 WITH 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 - PARALLAX - TAAT - HEDELMAE - JUMALAUTA - KAITA FILMITUOTANTO - BRAINLEZ CODERS - SYMPTOM - GOTO 10 - DAMONES - DA JORMAS - WIDE LOAD - HIRMU - LEUAT ";
|
||||
scrollTextOffset : integer = 0;
|
||||
scrollTextLength : integer = 0;
|
||||
scrollCurrent : byte = 0;
|
||||
|
@ -334,6 +363,16 @@ text : string = (@cmoveto, 6,10,
|
|||
tempPtr1, tempPtr2 : pointer;
|
||||
tempInt : integer;
|
||||
|
||||
/*
|
||||
Workloads for main loop
|
||||
*/
|
||||
@define notWorking 0
|
||||
@define mainText 1
|
||||
@define mainPicture 2
|
||||
|
||||
mainWorkState : byte = 0;
|
||||
|
||||
|
||||
//===========================================================================================================
|
||||
// Raster interrupt forward declarations
|
||||
//===========================================================================================================
|
||||
|
@ -373,34 +412,21 @@ begin
|
|||
RasterIrq(RasterMainPartScroller(), rasterLineMainScroller, @useKernal);
|
||||
end;
|
||||
|
||||
/**
|
||||
* Assembly setup for a character set copy in RAM
|
||||
*/
|
||||
procedure CopyCharsetRomToRam(targetHi : byte);
|
||||
begin
|
||||
asm("
|
||||
ldx #$08 ; we loop 8 times (8x255 = 2Kb)
|
||||
lda #$33 ; make the CPU see the Character Generator ROM...
|
||||
sta $01 ; ...at $D000 by storing %00110011 into location $01
|
||||
lda #$d0 ; load high byte of $D000
|
||||
sta $fc ; store it in a free location we use as vector
|
||||
ldy #$00 ; init counter with 0
|
||||
sty $fb ; store it as low byte in the $FB/$FC vector
|
||||
lda $fd ; second pair in $FD/$FE
|
||||
lda targetHi ; point to target
|
||||
sta $fe
|
||||
//===========================================================================================================
|
||||
// Main Work state functions
|
||||
//===========================================================================================================
|
||||
|
||||
loopc lda ($fb),y ; read byte from vector stored in $fb/$fc
|
||||
sta ($fd),y ; write to the RAM
|
||||
iny ; do this 255 times...
|
||||
bne loopc ; ..for low byte $00 to $FF
|
||||
inc $fc ; when we passed $FF increase high byte...
|
||||
inc $fe
|
||||
dex ; ... and decrease X by one before restart
|
||||
bne loopc ; We repeat this until X becomes Zero
|
||||
lda #$37 ; switch in I/O mapped registers again...
|
||||
sta $01 ; ... with %00110111 so CPU can see them
|
||||
");
|
||||
function isMainWorking() : boolean;
|
||||
var result : boolean;
|
||||
begin
|
||||
if (mainWorkState = @notWorking) then result := false
|
||||
else result := true;
|
||||
isMainWorking := result;
|
||||
end;
|
||||
|
||||
procedure startMainWork(s : byte);
|
||||
begin
|
||||
mainWorkState := s;
|
||||
end;
|
||||
|
||||
/**
|
||||
|
@ -422,14 +448,14 @@ var
|
|||
begin
|
||||
while (char > 64) do char -= 64;
|
||||
|
||||
tempPtr1 := charsetptr + char * 8;
|
||||
charsetptr += char * 8;
|
||||
|
||||
for k:=0 to 8 do begin
|
||||
temp[0] := 0;
|
||||
temp[1] := 0;
|
||||
temp[2] := 0;
|
||||
for i:=0 to 10 do begin
|
||||
charTemp := tempPtr1[0] & chrBitMask[sprChrBit[i]];
|
||||
charTemp := charsetptr[0] & chrBitMask[sprChrBit[i]];
|
||||
sprOfsTemp := sprOffset[i];
|
||||
if charTemp then temp[sprOfsTemp] := temp[sprOfsTemp] | sprBitMask[i];
|
||||
end;
|
||||
|
@ -439,7 +465,7 @@ begin
|
|||
sPtr[2] := temp[2];
|
||||
sPtr += 3;
|
||||
end;
|
||||
tempPtr1 += 1;
|
||||
charsetptr += 1;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
@ -603,7 +629,7 @@ begin
|
|||
begin
|
||||
if (tp[0] = @cmoveto) then
|
||||
begin
|
||||
x := tp[1] * 2;
|
||||
x := tp[1] * 2 + 1;
|
||||
y := tp[2] * 3 - 1;
|
||||
sp := AddressTable(#mainPartAddressTable, x, y);
|
||||
tp += 3;
|
||||
|
@ -930,7 +956,7 @@ end;
|
|||
interrupt RasterText();
|
||||
begin
|
||||
startIRQ(@useKernal);
|
||||
if (currentTime > 50) then UpdateText();
|
||||
UpdateText();
|
||||
closeIRQ();
|
||||
GoToMainRaster();
|
||||
end;
|
||||
|
@ -1059,6 +1085,7 @@ begin
|
|||
begin
|
||||
purpleBounceOfs := 0;
|
||||
spriteBounceOfs := 0;
|
||||
spriteWobbleOfs := 245;
|
||||
end;
|
||||
if (part = @partMain) then
|
||||
begin
|
||||
|
@ -1101,6 +1128,8 @@ begin
|
|||
|
||||
numLinesPtr := #numLines2;
|
||||
|
||||
hideborderx(1); // avoid choppy scroll
|
||||
|
||||
InitMainPart();
|
||||
end;
|
||||
end;
|
||||
|
@ -1118,53 +1147,19 @@ begin
|
|||
|
||||
if (mainState = @mainShowText) then
|
||||
begin
|
||||
//tempPtr1 := #screen_char_loc2 + 840;
|
||||
Fill(^$4740, 0, 80);
|
||||
//tempPtr1 := #screen_col_loc + 800;
|
||||
FillFast(^$DB20, 0, 80);
|
||||
|
||||
WriteMainText();
|
||||
if (tp[0] = @cstop) then tp := #mainText; // back to first page when done
|
||||
|
||||
//tempPtr2 := #screen_col_loc + 960; // keep color for scroll text
|
||||
fillfast(^$DBC0, $a, 40);
|
||||
startMainWork(@mainText);
|
||||
end;
|
||||
|
||||
if (mainState = @mainPicture) then
|
||||
begin
|
||||
setmulticolormode();
|
||||
setbitmapmode();
|
||||
|
||||
//tempPtr1 := AddressTable(#colorAddressTable, 0, 21);
|
||||
FillFast(^$4748, 0, 120);
|
||||
|
||||
//tempPtr2 := #screen_col_loc + 960; // keep color for scroll text
|
||||
fillfast(^$DBC0, $a, 40);
|
||||
|
||||
// set current picture
|
||||
currentNaamaX := naamatCoordinates[currentNaama * 4];
|
||||
currentNaamaY := naamatCoordinates[currentNaama * 4 + 1];
|
||||
currentNaamaWidth := naamatCoordinates[currentNaama * 4 + 2];
|
||||
currentNaamaHeight := naamatCoordinates[currentNaama * 4 + 3];
|
||||
|
||||
// todo write these in main loop instead of raster interrupt
|
||||
PrintCharToSprite(numbersPtr[0], @mainPartSmallFontLoc, @numberSpriteCopies);
|
||||
PrintCharToSprite(numbersPtr[1], @mainPartSmallFontLoc, @numberSpriteCopies + 64);
|
||||
PrintCharToSprite(numbersPtr[2], @mainPartSmallFontLoc, @numberSpriteCopies + 128);
|
||||
numbersPtr += 3;
|
||||
if (numbersPtr[0] = @cstop) then numbersPtr := #naamatNumbers;
|
||||
|
||||
// print the name
|
||||
WriteMainName();
|
||||
if (namesPtr[1] = @cstop) then namesPtr := #naamatNames;
|
||||
|
||||
plasmaHeight := 2;
|
||||
startMainWork(@mainPicture);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure UpdateMainPart();
|
||||
begin
|
||||
if (mainState = @mainShowText) then
|
||||
|
||||
if (mainState = @mainShowText and not isMainWorking()) then
|
||||
begin
|
||||
textPlStartX := 0;
|
||||
i := lo(textFade);
|
||||
|
@ -1177,6 +1172,7 @@ begin
|
|||
if (mod(textFade, 10) = 0) then inc(plasmaHeight);
|
||||
if (plasmaHeight > 9) then plasmaHeight := 9;
|
||||
end;
|
||||
|
||||
if (mainState = @mainFadeToPicture and textFade < 210) then
|
||||
begin
|
||||
i := lo(textFade);
|
||||
|
@ -1196,7 +1192,18 @@ begin
|
|||
|
||||
inc(textFade);
|
||||
end;
|
||||
|
||||
if (mainState = @mainPicture) then
|
||||
if (isMainWorking()) then
|
||||
begin
|
||||
sprite_color[0]:=0;
|
||||
sprite_color[1]:=0;
|
||||
sprite_color[2]:=0;
|
||||
sprite_color[3]:=0;
|
||||
sprite_color[4]:=0;
|
||||
sprite_color[5]:=0;
|
||||
end
|
||||
else
|
||||
begin
|
||||
// copy picture one row at a time
|
||||
if (pictureFade < currentNaamaHeight) then
|
||||
|
@ -1241,6 +1248,7 @@ begin
|
|||
memcpyfast(#textFadeLumi, 0, tempPtr1, 20);
|
||||
end;
|
||||
end;
|
||||
|
||||
if (mainState = @mainFadeToText) then
|
||||
begin
|
||||
// blank out picture one row at a time
|
||||
|
@ -1266,9 +1274,9 @@ begin
|
|||
sprite_color[0]:=0;
|
||||
sprite_color[1]:=0;
|
||||
sprite_color[2]:=0;
|
||||
sprite_color[3]:=$0;
|
||||
sprite_color[4]:=$0;
|
||||
sprite_color[5]:=$0;
|
||||
sprite_color[3]:=0;
|
||||
sprite_color[4]:=0;
|
||||
sprite_color[5]:=0;
|
||||
end;
|
||||
|
||||
if (mainTime > 50 and nameFade < 150) then
|
||||
|
@ -1311,6 +1319,7 @@ var lastSpriteWoblOfs : byte;
|
|||
wobblePause : boolean = false;
|
||||
wobblePauseTimer : integer = 0;
|
||||
cEqualsChangeFlag : boolean = false;
|
||||
fillPart : byte = 0;
|
||||
begin
|
||||
if (part >= @partOpenBar) then Call(SIDFILE_1_PLAY);
|
||||
|
||||
|
@ -1322,6 +1331,11 @@ begin
|
|||
purpleBarEndRasterLine := purpleBarCenter + purpleBarBounce[purpleBounceOfs] + 1;
|
||||
RasterIRQ(RasterTextPlasma(), 0, @useKernal);
|
||||
inc(purpleBounceOfs);
|
||||
if (purpleBounceOfs = 10) then FillFast(screen_char_loc + 640, KEY_SPACE, 40);
|
||||
if (purpleBounceOfs = 50) then FillFast(screen_char_loc + 600, KEY_SPACE, 40);
|
||||
if (purpleBounceOfs = 50) then FillFast(screen_char_loc + 680, KEY_SPACE, 40);
|
||||
if (purpleBounceOfs = 120) then FillFast(screen_char_loc + 560, KEY_SPACE, 40);
|
||||
if (purpleBounceOfs = 120) then FillFast(screen_char_loc + 720, KEY_SPACE, 40);
|
||||
if (purpleBounceOfs >= @purpleBarBounceSize) then currentPartDone := true;
|
||||
end;
|
||||
|
||||
|
@ -1350,22 +1364,32 @@ begin
|
|||
if (fadeStateCurrent = @fadeStateText) then
|
||||
begin
|
||||
fadeTemp := textFadeLumi[fadeOfsCurrent];
|
||||
Fill(screen_col_loc, fadeTemp, 255);
|
||||
FillFast(screen_col_loc + 256, fadeTemp, 127);
|
||||
Fill(screen_col_loc + 512, fadeTemp, 255);
|
||||
Fill(screen_col_loc + 768, fadeTemp, 232);
|
||||
if (fillPart = 0) then
|
||||
begin
|
||||
Fill(screen_col_loc, fadeTemp, 255);
|
||||
FillFast(screen_col_loc + 256, fadeTemp, 127);
|
||||
fadeOfsCurrent -= 1;
|
||||
end;
|
||||
if (fillPart = 1) then
|
||||
begin
|
||||
Fill(screen_col_loc + 511, fadeTemp, 255);
|
||||
Fill(screen_col_loc + 766, fadeTemp, 234);
|
||||
end;
|
||||
GoToPurpleBarRasterStart();
|
||||
if (fadeOfsCurrent >= @textFadeLumiLast) then
|
||||
begin
|
||||
fadeStateCurrent := @fadeStateAll;
|
||||
fadeOfsCurrent := 0;
|
||||
end;
|
||||
inc(fillPart);
|
||||
if (fillPart = 2) then fillPart := 0;
|
||||
end;
|
||||
if (fadeStateCurrent = @fadeStateAll) then
|
||||
begin
|
||||
fgColBefore := 0;
|
||||
Fill(screen_char_loc, KEY_SPACE, 255);
|
||||
FillFast(screen_char_loc + 256, KEY_SPACE, 127);
|
||||
FillFast(screen_char_loc + 255, KEY_SPACE, 127);
|
||||
Fill(^$06F8, KEY_SPACE, 240);
|
||||
GoToPurpleBarRasterStart();
|
||||
currentPartDone := true;
|
||||
screen_fg_col := 0;
|
||||
|
@ -1445,7 +1469,7 @@ begin
|
|||
if (mainState = @mainFadeToPicture and mainTime > 200) then GoToNextMainPart();
|
||||
if (mainState = @mainFadeToText and mainTime > 100) then GoToNextMainPart();
|
||||
if (mainState = @mainPicture and mainTime > 650) then GoToNextMainPart();
|
||||
if (mainState = @mainShowText and mainTime > 400) then GoToNextMainPart();
|
||||
if (mainState = @mainShowText and mainTime > 500) then GoToNextMainPart();
|
||||
|
||||
GoToPurpleBarRasterStart();
|
||||
end;
|
||||
|
@ -1478,7 +1502,7 @@ begin
|
|||
fgColBefore := screen_fg_col;
|
||||
|
||||
DisableCIAInterrupts();
|
||||
CopyCharsetRomToRam($c0);
|
||||
CopyCharSetFromRom(^$c000);
|
||||
|
||||
setmemoryconfig(1,@useKernal,0);
|
||||
|
||||
|
@ -1498,7 +1522,8 @@ begin
|
|||
CreateAddressTable(#mainPartAddressTable, $4400, 40, 25);
|
||||
CreateAddressTable(#colorAddressTable, $d800, 40, 25);
|
||||
|
||||
Fill(^$0568, KEY_SPACE, 200);
|
||||
Fill(^$0518, KEY_SPACE, 240);
|
||||
Fill(^$0608, KEY_SPACE, 80);
|
||||
|
||||
for i := 0 to 256 do fastPlasma[i] := textPlasmaLumi[textPlasmaX[i]];
|
||||
|
||||
|
@ -1510,5 +1535,53 @@ begin
|
|||
EnableRasterIRQ();
|
||||
enableirq();
|
||||
|
||||
Loop();
|
||||
while (true) do
|
||||
begin
|
||||
// Heavy main loop work tasks here
|
||||
if (mainWorkState = @mainText) then
|
||||
begin
|
||||
|
||||
//tempPtr1 := #screen_char_loc2 + 840;
|
||||
Fill(^$4740, 0, 80);
|
||||
//tempPtr1 := #screen_col_loc + 800;
|
||||
FillFast(^$DB20, 0, 80);
|
||||
|
||||
WriteMainText();
|
||||
if (tp[0] = @cstop) then tp := #mainText; // back to first page when done
|
||||
|
||||
//tempPtr2 := #screen_col_loc + 960; // keep color for scroll text
|
||||
fillfast(^$DBC0, $a, 40);
|
||||
|
||||
mainWorkState := @notWorking;
|
||||
end;
|
||||
|
||||
if (mainWorkState = @mainPicture) then
|
||||
begin
|
||||
//tempPtr1 := AddressTable(#colorAddressTable, 0, 21);
|
||||
FillFast(^$4748, 0, 120);
|
||||
|
||||
//tempPtr2 := #screen_col_loc + 960; // keep color for scroll text
|
||||
fillfast(^$DBC0, $a, 40);
|
||||
|
||||
// set current picture
|
||||
currentNaamaX := naamatCoordinates[currentNaama * 4];
|
||||
currentNaamaY := naamatCoordinates[currentNaama * 4 + 1];
|
||||
currentNaamaWidth := naamatCoordinates[currentNaama * 4 + 2];
|
||||
currentNaamaHeight := naamatCoordinates[currentNaama * 4 + 3];
|
||||
|
||||
PrintCharToSprite(numbersPtr[0], @mainPartSmallFontLoc, @numberSpriteCopies);
|
||||
PrintCharToSprite(numbersPtr[1], @mainPartSmallFontLoc, @numberSpriteCopies + 64);
|
||||
PrintCharToSprite(numbersPtr[2], @mainPartSmallFontLoc, @numberSpriteCopies + 128);
|
||||
numbersPtr += 3;
|
||||
if (numbersPtr[0] = @cstop) then numbersPtr := #naamatNumbers;
|
||||
|
||||
// print the name
|
||||
WriteMainName();
|
||||
if (namesPtr[0] = @cstop) then namesPtr := #naamatNames;
|
||||
|
||||
plasmaHeight := 2;
|
||||
|
||||
mainWorkState := @notWorking;
|
||||
end;
|
||||
end;
|
||||
end.
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 7.8 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue