Compare commits

...

42 Commits

Author SHA1 Message Date
gimulnautti e81c27ec61 Lisätty levyimagen latausohje 2023-03-26 17:56:59 +03:00
gimulnautti 201b4f697c korjattu Albert Laineen vaalipiiri 2023-03-04 00:48:20 +02:00
gimulnautti b2af6e7c77 levyimagen tekoscripti lisätty, korjattu muun maan äänestysnumero stringin ylivuoto 2023-03-04 00:02:16 +02:00
gimulnautti 0be8189280 master levyimage levitykseen 2023-03-03 22:21:47 +02:00
gimulnautti ddb99a168f päivitetty aluekohtaiset introt 2023-03-03 22:11:52 +02:00
gimulnautti 38b341cf69 vanhat aluekohtaiset introt poistettu 2023-03-03 22:11:08 +02:00
gimulnautti 726c852afe numerot ja viivat yksinumeroisiin 2023-03-03 22:07:52 +02:00
gimulnautti a6cca51ffd korjaa ruudun tyhjennysrutiinit alussa 2023-03-03 21:32:25 +02:00
gimulnautti 02a404af42 Kaikki introt yhdellä disk imagella 2023-03-02 21:45:29 +02:00
gimulnautti 0f00d61501 lisätty kaikki käännetyt .prg filet masteriin 2023-03-02 21:39:49 +02:00
gimulnautti b36b28ca07 exomize prg 2023-03-02 21:33:31 +02:00
gimulnautti 75c258f738 greetit korjattu 2023-03-02 21:18:00 +02:00
gimulnautti 1cc836cfcd loput ehdokasnumerot demosceneversiossa 2023-03-02 21:00:15 +02:00
gimulnautti c32e866d70 äänestysnumerot laitettu demoscene versioon 2023-03-02 20:48:38 +02:00
gimulnautti 755e0d1f59 korjattu pulkkiksen vaalipiiri 2023-03-02 00:21:43 +02:00
gimulnautti 76e39a794a päivitetty kuvia 2023-03-01 21:48:58 +02:00
gimulnautti 29bcfab4f5 Lisätty .prg ja poistettu gitignoresta tyyppi 2023-03-01 21:27:12 +02:00
gimulnautti 54424f7268 lisätty pari sivua tekstejä 2023-03-01 21:25:04 +02:00
gimulnautti 9c023524b9 päivitetty kakkosnaamat 2023-03-01 21:24:46 +02:00
gimulnautti fac00817aa Tekstien välilyöntejä päivitetty 2023-02-24 17:07:07 +02:00
gimulnautti 52bf609acc Exomize pois päältä jotta ohjeet toimivat 2023-02-24 16:59:26 +02:00
gimulnautti 5e671d3548 Levyimage päivitetty 2023-02-24 16:58:49 +02:00
gimulnautti 9b6fd57100 Korjattu bugi main task workloading käyttäessä samaa temp pointeria kuin rasterikeskeytys 2023-02-24 16:52:13 +02:00
gimulnautti cef15740c0 Alustettu numero sprite kopioalue nollaksi 2023-02-21 21:20:16 +02:00
gimulnautti 8ee6c5edf8 lisätty .d64 exomize pakattu c64 disk image 2023-02-21 21:15:20 +02:00
gimulnautti 3b39c13b76 lisätty ohjelmatekstejä 2023-02-20 19:47:07 +02:00
gimulnautti 18e2ab75f2 biisi päivitetty 2023-02-20 19:38:09 +02:00
gimulnautti 864471d582 Scrollin tökkiminen vasemmasa reunassa korjattu siirtämällä bordereita sisäänpäin. Teksti vaati uudelleen asettelun 2023-02-19 20:10:08 +02:00
gimulnautti fde541ab41 Luotu main workloadit joita käyttää raskaisiin koko ruudun alustusoperaatioihin. Poistaa rasteriajan ylimenot tekstin ja kuvien välissä siirtymisessä. 2023-02-19 19:08:57 +02:00
gimulnautti dd9e93958d varattu muistialueet spritekopioita varten taulukoina 2023-02-19 18:36:47 +02:00
gimulnautti 7bd6e2dde2 Lisätty ohjeet ajamiseen vaalikojulla emulaattorista 2023-02-18 21:03:42 +02:00
gimulnautti 5ee37dd646 Korjattu typo readmessa 2023-02-18 18:07:48 +02:00
Gimle 0d8299ad59 Merge pull request '.gitattributes: havaitse kaikki tekstitiedostot automaattisesti' (#1) from mikaela/c64-vaali-intro-2023:gitattributes into master
Reviewed-on: Gimle/c64-vaali-intro-2023#1
2023-02-18 15:43:33 +02:00
Gimle e2add48af9 Merge pull request 'Lisää yksinkertainen .editorconfig' (#2) from mikaela/c64-vaali-intro-2023:editorconfig into master
Reviewed-on: Gimle/c64-vaali-intro-2023#2
2023-02-18 15:43:14 +02:00
gimulnautti c0fd50cd52 korjaus vahingossa committattu alkamaan main partista 2023-02-18 14:57:08 +02:00
gimulnautti b61a9f90e9 päivitetty ohje 2023-02-18 14:31:33 +02:00
gimulnautti 91c37baece päivitetty ohje 2023-02-18 14:30:15 +02:00
gimulnautti 63650d0dd3 Lisätty naamat esimerkkitiedosto 2023-02-18 14:29:05 +02:00
gimulnautti 205b2f2f6c korjattu looppibugi 2023-02-18 14:19:04 +02:00
gimulnautti 90b097dc24 vaihdettu libilien listalle mennyt Pyry Saarela pois 2023-02-18 14:10:42 +02:00
Aminda Suomalainen ⚧ fa55d6cfee
add .editorconfig 2023-02-18 13:23:53 +02:00
Aminda Suomalainen ⚧ 3f0fdcb236
.gitattributes: havaitse kaikki tekstitiedostot automaattisesti 2023-02-18 13:11:45 +02:00
21 changed files with 240 additions and 132 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

2
.gitattributes vendored
View File

@ -1 +1 @@
*.ras text=auto * text=auto

1
.gitignore vendored
View File

@ -1,3 +1,2 @@
*.asm *.asm
*.sym *.sym
*.prg

View File

@ -8,7 +8,7 @@ zeropage_decrunch3 = $4a
zeropage_decrunch4 = $4b zeropage_decrunch4 = $4b
pascal_settings_use_local_variables = 0 pascal_settings_use_local_variables = 0
system = C64 system = C64
main_ras_file = none main_ras_file = piraatti_intro.ras
zeropage_internal1 = $4c zeropage_internal1 = $4c
zeropage_internal2 = $4e zeropage_internal2 = $4e
zeropage_internal3 = $50 zeropage_internal3 = $50
@ -29,7 +29,7 @@ override_target_settings_org = $810
override_target_settings_ignore_sys = 0 override_target_settings_ignore_sys = 0
override_target_settings_ignore_prg = 0 override_target_settings_ignore_prg = 0
output_debug_symbols = 1 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/ project_path = /Users/gimulnautti/piraattipuolue-github/c64-vaali-intro-2023/
zeropage_colormemory = $fb zeropage_colormemory = $fb
dirart_flf_file = none dirart_flf_file = none
@ -40,7 +40,7 @@ remove_unused_symbols = 1
ignore_initial_jump = 0 ignore_initial_jump = 0
current_file = piraatti_intro.ras current_file = piraatti_intro.ras
output_type = prg output_type = prg
exomizer_toggle = 0 exomizer_toggle = 1
use_track_19 = 1 use_track_19 = 1
disable_compiler_comments = 0 disable_compiler_comments = 0
charset_ = :resources/character.rom charset_ = :resources/character.rom
@ -77,4 +77,8 @@ override_target_settings_basic = 0
override_target_settings_sys = 0 override_target_settings_sys = 0
override_target_settings_prg = 0 override_target_settings_prg = 0
build_list = , 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

View File

@ -3,21 +3,36 @@
Commodore 64:llä toteutettu vaalimainos vanhaan kuusnepa demoscene tyyliin Commodore 64:llä toteutettu vaalimainos vanhaan kuusnepa demoscene tyyliin
Musiikki toteutettu SIDFactory II Musiikki toteutettu SIDFactory II
### Levyimagen lataaminen
1. Valitse tiedosto `commodorella_eduskuntaan.d64` ja lataa.
2. Kirjoita tikulle tai oikealle 1541 levykkeelle.
### Kääntäminen ### 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 2. Asenna [VICE](https://vice-emu.sourceforge.io/) tai muu Commodore 64 emulaattori
3. Aseta TRSE emulaattori-asetukset 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 ### 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` 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 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 = (` 4. Avaa `piraatti_intro.ras` ja mene riville 220 josta alkaa muuttuja `naamatNames : string = (`
5. Täytä ehdokkaiden nimet ja vaalipiirit 5. Täytä ehdokkaiden nimet ja vaalipiirit
6. Mene riville 235 josta alkaa muuttuja `naamatNumbers : string = (` 6. Mene riville 235 josta alkaa muuttuja `naamatNumbers : string = (`
7. Täytä ehdokasnumerot, ja käytä _tasan_ kolme merkkiä jokaiseen, muuten intro ei toimi! 7. Täytä ehdokasnumerot, ja käytä _tasan_ kolme merkkiä jokaiseen, muuten intro ei toimi!
8. Käännä ja aja tiedosto, tarkista että toimii 8. Käännä ja aja tiedosto, tarkista että toimii
9. Exporttaa haluamaasi muotoon tai nauhoita video! 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.

BIN
helsinki-uusimaa.prg Normal file

Binary file not shown.

BIN
helsinki.prg Normal file

Binary file not shown.

6
make_disk_image.sh Executable file
View File

@ -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

BIN
muu-maa.prg Normal file

Binary file not shown.

BIN
naamat-esimerkki.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

BIN
piraatti_intro.prg Normal file

Binary file not shown.

View File

@ -57,8 +57,13 @@ var
@define spriteLoc $3c80 @define spriteLoc $3c80
@define charSetCopyLoc $c000 @define charSetCopyLoc $c000
charsetCopyBlock : array[1024] of byte = buildtable("0") at @charSetCopyLoc;
@define spriteBank 0 @define spriteBank 0
spriteCopyBlock : array[63] of byte = buildtable("0") at @spriteLoc;
lookup3Dx : array[40] of integer = buildtable("300 * (i - 20) / 200"); lookup3Dx : array[40] of integer = buildtable("300 * (i - 20) / 200");
lookup3Dy : array[25] of integer = buildtable("300 * (i - 11) / 30"); lookup3Dy : array[25] of integer = buildtable("300 * (i - 11) / 30");
@ -223,27 +228,29 @@ text : string = (@cmoveto, 6,10,
"RIIKKA NIEMINEN - UUSIMAA", @cpause, "RIIKKA NIEMINEN - UUSIMAA", @cpause,
"JARI NIKKINEN - SAVO-KARJALA", @cpause, "JARI NIKKINEN - SAVO-KARJALA", @cpause,
"SATU IMMONEN - HELSINKI", @cpause, "SATU IMMONEN - HELSINKI", @cpause,
"PEKKA MUSTONEN - HELSINKI", @cpause, "PEKKA MUSTONEN - SAVO-KARJALA", @cpause,
"REETTA OJALA - HELSINKI", @cpause, "REETTA OJALA - HELSINKI", @cpause,
"MAREK NETSHADA - HELSINKI", @cpause, "MAREK NETSHADA - HELSINKI", @cpause,
"OLAVI KAUKAMIELI - HELSINKI", @cpause, "OLAVI KAUKAMIELI - HELSINKI", @cpause,
"PYRY SAARELA - VARSINAIS-SUOMI", @cpause, "JONI MAHLAMAKI - UUSIMAA", @cpause,
"KAUSTI RANTALAINEN - HELSINKI", @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", naamatNumbers : string = ( "353", "113", "356", "91 ", "-5-", " 89",
" 40", "50 ", " 60", " 70", " 80", " 90", @cstop); " 13", " 12", "-8-", "354", " 18", " 17", @cstop);
tab320 : array[25] of integer = buildtable("i*320"); tab320 : array[25] of integer = buildtable("i*320");
tab40 : array[25] of integer = buildtable("i*40"); tab40 : array[25] of integer = buildtable("i*40");
@define numberSpriteCopies $5800 @define numberSpriteCopies $5e00
numberSprite0loc : byte = @numberSpriteCopies / 64 + 0; numberSprite0loc : byte = @numberSpriteCopies / 64 + 0;
numberSprite1loc : byte = @numberSpriteCopies / 64 + 1; numberSprite1loc : byte = @numberSpriteCopies / 64 + 1;
numberSprite2loc : byte = @numberSpriteCopies / 64 + 2; 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; 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; numberSpriteFloatY : array[256] of byte = buildtable("Math.cos(i * (3 * 6.28 / 256)) * 5") at $5d00;
numberSprite0FloatOfs : byte = 15; numberSprite0FloatOfs : byte = 15;
@ -257,42 +264,64 @@ 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, 4, " EDUSKUNTAAN ", @cmoveto, 0, 3, " COMMODORELLA",
@cmoveto, 0, 5, " 2023 ", @cmoveto, 0, 4, " EDUSKUNTAAN",
@cmoveto, 0, 5, " ---------",
@cmoveto, 0, 6, " 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, " KANSANAANESTYS",
@cmoveto, 0, 5, " RAHANKERAYSLAIN ", @cmoveto, 0, 5, " PERUSOIKEUDET",
@cmoveto, 0, 6, " UUDISTUS ", @cmoveto, 0, 6, "YKSITYISYYDENSUOJA",
@cmoveto, 0, 7, " PERUSTULO ", @cmoveto, 0, 7, " YHDENVERTAISUUS",
@cpage,
@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, @cpage,
@cmoveto, 0, 2, " PERUSOIKEUDET ", @cmoveto, 0, 3, "HYVINVOINTIALUEIDEN",
@cmoveto, 0, 3, " YKSITYISYYDENSUOJA ", @cmoveto, 0, 4, " VERONKANTO-OIKEUS",
@cmoveto, 0, 4, " YHDENVERTAISUUS ", @cmoveto, 0, 5, " RAHANKERAYSLAIN",
@cmoveto, 0, 5, " KESTAVYYSSIIRTYMA ", @cmoveto, 0, 6, " UUDISTUS",
@cmoveto, 0, 6, " VETYTALOUDEN ", @cmoveto, 0, 7, " PERUSTULO",
@cmoveto, 0, 7, " TEKNOLOGIATUKI ",
@cpage, @cpage,
@cmoveto, 0, 2, " HYVINVOINTIALUEIDEN", @cmoveto, 0, 2, " TAVOITTEELLINEN",
@cmoveto, 0, 3, " VERONKANTO-OIKEUS ", @cmoveto, 0, 3, " TUTKIMUS- JA",
@cmoveto, 0, 4, "PAIKALLISDEMOKRATIAN", @cmoveto, 0, 4, " INNOVAATIO-",
@cmoveto, 0, 5, " VAHVISTAMINEN ", @cmoveto, 0, 5, " POLITIIKKA",
@cmoveto, 0, 6, " LUONTO MAANKAYTTO ", @cmoveto, 0, 6, " TYOPERAINEN",
@cmoveto, 0, 7, " KESTAVYYS ", @cmoveto, 0, 7, " MAAHANMUUTTO",
@cpage, @cpage,
@cmoveto, 0, 3, " TIETOPOLITIIKAN ", @cmoveto, 0, 2, " LAPINAKYVAT JA",
@cmoveto, 0, 4, " VAKIINNUTTAMINEN ", @cmoveto, 0, 3, " TURVALLISET",
@cmoveto, 0, 5, " OSAKSI HALLINTO- ", @cmoveto, 0, 4, " JULKISET",
@cmoveto, 0, 6, " RAKENNETTA ", @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); @cpage, @cstop);
mainPartAddressTable : array[25] of integer; mainPartAddressTable : array[25] of integer;
@ -312,7 +341,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 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; scrollTextOffset : integer = 0;
scrollTextLength : integer = 0; scrollTextLength : integer = 0;
scrollCurrent : byte = 0; scrollCurrent : byte = 0;
@ -333,6 +362,16 @@ text : string = (@cmoveto, 6,10,
*/ */
tempPtr1, tempPtr2 : pointer; tempPtr1, tempPtr2 : pointer;
tempInt : integer; tempInt : integer;
/*
Workloads for main loop
*/
@define notWorking 0
@define mainText 1
@define mainPicture 2
mainWorkState : byte = 0;
//=========================================================================================================== //===========================================================================================================
// Raster interrupt forward declarations // Raster interrupt forward declarations
@ -373,34 +412,21 @@ begin
RasterIrq(RasterMainPartScroller(), rasterLineMainScroller, @useKernal); RasterIrq(RasterMainPartScroller(), rasterLineMainScroller, @useKernal);
end; end;
/** //===========================================================================================================
* Assembly setup for a character set copy in RAM // Main Work state functions
*/ //===========================================================================================================
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
loopc lda ($fb),y ; read byte from vector stored in $fb/$fc function isMainWorking() : boolean;
sta ($fd),y ; write to the RAM var result : boolean;
iny ; do this 255 times... begin
bne loopc ; ..for low byte $00 to $FF if (mainWorkState = @notWorking) then result := false
inc $fc ; when we passed $FF increase high byte... else result := true;
inc $fe isMainWorking := result;
dex ; ... and decrease X by one before restart end;
bne loopc ; We repeat this until X becomes Zero
lda #$37 ; switch in I/O mapped registers again... procedure startMainWork(s : byte);
sta $01 ; ... with %00110111 so CPU can see them begin
"); mainWorkState := s;
end; end;
/** /**
@ -422,14 +448,14 @@ var
begin begin
while (char > 64) do char -= 64; while (char > 64) do char -= 64;
tempPtr1 := charsetptr + char * 8; charsetptr += char * 8;
for k:=0 to 8 do begin for k:=0 to 8 do begin
temp[0] := 0; temp[0] := 0;
temp[1] := 0; temp[1] := 0;
temp[2] := 0; temp[2] := 0;
for i:=0 to 10 do begin for i:=0 to 10 do begin
charTemp := tempPtr1[0] & chrBitMask[sprChrBit[i]]; charTemp := charsetptr[0] & chrBitMask[sprChrBit[i]];
sprOfsTemp := sprOffset[i]; sprOfsTemp := sprOffset[i];
if charTemp then temp[sprOfsTemp] := temp[sprOfsTemp] | sprBitMask[i]; if charTemp then temp[sprOfsTemp] := temp[sprOfsTemp] | sprBitMask[i];
end; end;
@ -439,7 +465,7 @@ begin
sPtr[2] := temp[2]; sPtr[2] := temp[2];
sPtr += 3; sPtr += 3;
end; end;
tempPtr1 += 1; charsetptr += 1;
end; end;
end; end;
@ -603,7 +629,7 @@ begin
begin begin
if (tp[0] = @cmoveto) then if (tp[0] = @cmoveto) then
begin begin
x := tp[1] * 2; x := tp[1] * 2 + 1;
y := tp[2] * 3 - 1; y := tp[2] * 3 - 1;
sp := AddressTable(#mainPartAddressTable, x, y); sp := AddressTable(#mainPartAddressTable, x, y);
tp += 3; tp += 3;
@ -930,7 +956,7 @@ end;
interrupt RasterText(); interrupt RasterText();
begin begin
startIRQ(@useKernal); startIRQ(@useKernal);
if (currentTime > 50) then UpdateText(); UpdateText();
closeIRQ(); closeIRQ();
GoToMainRaster(); GoToMainRaster();
end; end;
@ -1059,6 +1085,7 @@ begin
begin begin
purpleBounceOfs := 0; purpleBounceOfs := 0;
spriteBounceOfs := 0; spriteBounceOfs := 0;
spriteWobbleOfs := 245;
end; end;
if (part = @partMain) then if (part = @partMain) then
begin begin
@ -1101,6 +1128,8 @@ begin
numLinesPtr := #numLines2; numLinesPtr := #numLines2;
hideborderx(1); // avoid choppy scroll
InitMainPart(); InitMainPart();
end; end;
end; end;
@ -1118,53 +1147,19 @@ begin
if (mainState = @mainShowText) then if (mainState = @mainShowText) then
begin begin
//tempPtr1 := #screen_char_loc2 + 840; startMainWork(@mainText);
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);
end; end;
if (mainState = @mainPicture) then if (mainState = @mainPicture) then
begin begin
setmulticolormode(); startMainWork(@mainPicture);
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;
end; end;
end; end;
procedure UpdateMainPart(); procedure UpdateMainPart();
begin begin
if (mainState = @mainShowText) then
if (mainState = @mainShowText and not isMainWorking()) then
begin begin
textPlStartX := 0; textPlStartX := 0;
i := lo(textFade); i := lo(textFade);
@ -1177,6 +1172,7 @@ begin
if (mod(textFade, 10) = 0) then inc(plasmaHeight); if (mod(textFade, 10) = 0) then inc(plasmaHeight);
if (plasmaHeight > 9) then plasmaHeight := 9; if (plasmaHeight > 9) then plasmaHeight := 9;
end; end;
if (mainState = @mainFadeToPicture and textFade < 210) then if (mainState = @mainFadeToPicture and textFade < 210) then
begin begin
i := lo(textFade); i := lo(textFade);
@ -1196,7 +1192,18 @@ begin
inc(textFade); inc(textFade);
end; end;
if (mainState = @mainPicture) then 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 begin
// copy picture one row at a time // copy picture one row at a time
if (pictureFade < currentNaamaHeight) then if (pictureFade < currentNaamaHeight) then
@ -1241,6 +1248,7 @@ begin
memcpyfast(#textFadeLumi, 0, tempPtr1, 20); memcpyfast(#textFadeLumi, 0, tempPtr1, 20);
end; end;
end; end;
if (mainState = @mainFadeToText) then if (mainState = @mainFadeToText) then
begin begin
// blank out picture one row at a time // blank out picture one row at a time
@ -1266,9 +1274,9 @@ begin
sprite_color[0]:=0; sprite_color[0]:=0;
sprite_color[1]:=0; sprite_color[1]:=0;
sprite_color[2]:=0; sprite_color[2]:=0;
sprite_color[3]:=$0; sprite_color[3]:=0;
sprite_color[4]:=$0; sprite_color[4]:=0;
sprite_color[5]:=$0; sprite_color[5]:=0;
end; end;
if (mainTime > 50 and nameFade < 150) then if (mainTime > 50 and nameFade < 150) then
@ -1311,6 +1319,7 @@ var lastSpriteWoblOfs : byte;
wobblePause : boolean = false; wobblePause : boolean = false;
wobblePauseTimer : integer = 0; wobblePauseTimer : integer = 0;
cEqualsChangeFlag : boolean = false; cEqualsChangeFlag : boolean = false;
fillPart : byte = 0;
begin begin
if (part >= @partOpenBar) then Call(SIDFILE_1_PLAY); if (part >= @partOpenBar) then Call(SIDFILE_1_PLAY);
@ -1322,6 +1331,11 @@ begin
purpleBarEndRasterLine := purpleBarCenter + purpleBarBounce[purpleBounceOfs] + 1; purpleBarEndRasterLine := purpleBarCenter + purpleBarBounce[purpleBounceOfs] + 1;
RasterIRQ(RasterTextPlasma(), 0, @useKernal); RasterIRQ(RasterTextPlasma(), 0, @useKernal);
inc(purpleBounceOfs); 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; if (purpleBounceOfs >= @purpleBarBounceSize) then currentPartDone := true;
end; end;
@ -1350,22 +1364,32 @@ begin
if (fadeStateCurrent = @fadeStateText) then if (fadeStateCurrent = @fadeStateText) then
begin begin
fadeTemp := textFadeLumi[fadeOfsCurrent]; fadeTemp := textFadeLumi[fadeOfsCurrent];
Fill(screen_col_loc, fadeTemp, 255); if (fillPart = 0) then
FillFast(screen_col_loc + 256, fadeTemp, 127); begin
Fill(screen_col_loc + 512, fadeTemp, 255); Fill(screen_col_loc, fadeTemp, 255);
Fill(screen_col_loc + 768, fadeTemp, 232); 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(); GoToPurpleBarRasterStart();
if (fadeOfsCurrent >= @textFadeLumiLast) then if (fadeOfsCurrent >= @textFadeLumiLast) then
begin begin
fadeStateCurrent := @fadeStateAll; fadeStateCurrent := @fadeStateAll;
fadeOfsCurrent := 0; fadeOfsCurrent := 0;
end; end;
inc(fillPart);
if (fillPart = 2) then fillPart := 0;
end; end;
if (fadeStateCurrent = @fadeStateAll) then if (fadeStateCurrent = @fadeStateAll) then
begin begin
fgColBefore := 0; fgColBefore := 0;
Fill(screen_char_loc, KEY_SPACE, 255); 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(); GoToPurpleBarRasterStart();
currentPartDone := true; currentPartDone := true;
screen_fg_col := 0; screen_fg_col := 0;
@ -1445,7 +1469,7 @@ begin
if (mainState = @mainFadeToPicture and mainTime > 200) then GoToNextMainPart(); if (mainState = @mainFadeToPicture and mainTime > 200) then GoToNextMainPart();
if (mainState = @mainFadeToText and mainTime > 100) then GoToNextMainPart(); if (mainState = @mainFadeToText and mainTime > 100) then GoToNextMainPart();
if (mainState = @mainPicture and mainTime > 650) 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(); GoToPurpleBarRasterStart();
end; end;
@ -1478,8 +1502,8 @@ begin
fgColBefore := screen_fg_col; fgColBefore := screen_fg_col;
DisableCIAInterrupts(); DisableCIAInterrupts();
CopyCharsetRomToRam($c0); CopyCharSetFromRom(^$c000);
setmemoryconfig(1,@useKernal,0); setmemoryconfig(1,@useKernal,0);
// Some heavy part init here to spare work later // Some heavy part init here to spare work later
@ -1498,7 +1522,8 @@ begin
CreateAddressTable(#mainPartAddressTable, $4400, 40, 25); CreateAddressTable(#mainPartAddressTable, $4400, 40, 25);
CreateAddressTable(#colorAddressTable, $d800, 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]]; for i := 0 to 256 do fastPlasma[i] := textPlasmaLumi[textPlasmaX[i]];
@ -1510,5 +1535,53 @@ begin
EnableRasterIRQ(); EnableRasterIRQ();
enableirq(); 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. end.

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.