PLUS4-BIN-LOADER-VERSION-2.0-WITH-OPTIONS -------------------------------------------------------------------------------------------------- TOOL: BASIC 3.5 and ASSEMBLER {Commodore PLUS4} Language: BASIC and ASSEMBLY {BASIC Loader} Extra: none Author: Misel Zivanovic Note: (C) SEPTEMBER 9th 2026 - www.lived.ch, mzretro.ch --------------------------------------------------------------------------------------------------- Information: The floppy disk you can download here was created by me! However: I am just using the images to demonstrate how binary files can be loaded! That means that the content is just partly mine: binload.bas This is the picture created with "toplessshow.bas" divided in 3 files: graphics, luminance and color part! All saved with the built-in ML-Monitor by me. 1-topless.bin 2-toplumi.bin 3-topcolor.bin AND toplessshow.bas is (c): Credits: https://www.forum64.de/wcf/index.php?user/27229-omega/ https://www.forum64.de/wcf/index.php?user/12632-lynx/ FORUM64: https://www.forum64.de/index.php?thread/165365-pupu-beauties-plus-4-demo/&postID=2467314#post2467314 --------------------------------------------------------------------------------------------------- This is the 2nd version of the binary files loader and it makes it possibly to load file with a little bit more flexibility {related to names} Example: 0.graphics 1.sound 2.sprites 3.characters a 4.characters b 5.characters c ... This is giving you the ability to name your files more logically and with a clear identity! The code was just slightly changed, but the impact is huge! Main purpose of this small code is to spare you from typing long DATA lines! --------------------------------------------------------------------------------------------------- SOURCE CODE: {Note: This code will work only when Plus4-TopLessShow.d64 is inserted, drive 8!} --------------------------------------------------------------------------------------------------- 100 rem bin file loader! 110 if peek(848)=150 then goto 140 120 for n=0 to 31:read d$: a=dec(d$) 130 poke 818+n,a: next: poke 848,150 140 : 150 rem to load a binary file called 160 rem 1-topless.bin to $2000 170 rem type: 180 rem address $2000 190 rem low ($00)-high byte($20,dec32) 200 poke 839,00:poke 841,32 210 poke 846,49:sys 818:rem name 1* 220 : 230 rem address $1800 load luminance 240 rem low ($00)-high byte($18,dec24) 250 poke 839,00:poke 841,24 260 poke 846,50:sys 818:rem name 2* 270 : 280 rem address $1c00 load color 290 rem low ($00)-high byte($1c,dec38) 300 poke 839,00:poke 841,28 301 print"are you 18 years old? (y/n)" 302 getkey p$ 303 if p$<>"y" then graphic 1,1:end 305 goto 302 310 poke 846,51:sys 818:rem name 3* 320 graphic 1 330 getkey a$ 340 graphic 0 350 : 360 end 370 data a9,01,a2,08,a0,01,20,ba 380 data ff,a9,02,a2,4e,a0,03,20 390 data bd,ff,a9,00,a2,00,a0,38 400 data 20,d5,ff,60,30,2a,00,00 NEED TO LOAD MORE THAN 10 FILES??? --------------------------------------------------------------------------------------------------- This above is working for the numbers 0-9. However, with just a tiny adjustment, you can also go up to 100 files {and more!}, when starting with 00. To achieve that, all you have to do is shift the * {$2a} one byte to the left and add another zero {$00} where {$2a} was before in line 400 and also modify other lines like this: 110 if peek(849)=150 then goto 140 130 poke 818+n,a: next: poke 849,150 400 data 20,d5,ff,60,30,30,2a,00 Furthermore, another POKE command must be added to make practical usage of this! Example: 260 poke 846,48:poke 847,48:sys 818 { This will load a file from the disk with the name :00 {e.g. 00-title.gfx} } 260 poke 846,51:poke 847,51:sys 818 { This will load a file from the disk with the name :33 {e.g. 33-intro.anim} } 260 poke 846,53:poke 847,48:sys 818 { This will load a file from the disk with the name :50 {e.g. 50-charset.a} } [ Of course, you need to set the destination address first accordingly ] [ before you do the name part as you can see in the example code ] --------------------------------------------------------------------------------------------------- #: 0 1 2 3 4 5 6 7 8 9 decimal:48 49 50 51 52 53 54 55 56 57 --------------------------------------------------------------------------------------------------- AND IN CASE YOU WONDER! YES, you can name your files also like this: 1a-gfx-01 1b-gfx-02 1c-gfx-03 1d-gfx-04 1e-gfx-05 1f-gfx-06 1g-gfx-07 1h-gfx-08 1i-gfx-09 1j-gfx-10 1k-gfx-11 2a-col-01 2b-col-02 2c-col-03 2d-col-04 2e-col-05 2f-col-06 2g-col-07 2h-col-08 2i-col-09 2j-col-10 2k-col-11 Just make sure that the first two characters are never the same! In practice you have [2 unique] + 13 characters which you can use however you want! ---------------------------------------------------------------------------------------------------