#
# Multipaint boot, runs at start and after every mode change
#

# Run only at starting Multipaint

A=PEEK 21

IF A=1
	POKE 17,8
ENDIF

# Run at every mode change

M=PEEK 3

# examples

# ADDMAKE [+MENUNAME], Tooltip|line, Selector heading, extension, script_to_run.txt(, script_to_run_2.txt)
# ADDITEM [+MENUNAME], Tooltip|line, (Selector heading), (extension), script_to_run.txt
# ADDSAVE [+MENUNAME], Tooltip|line, Selector heading, extension, script_to_run.txt
# ADDLOAD [+MENUNAME], Tooltip|line, Selector heading, extension, script_to_run.txt, script_for_savekey.txt

# C64 hires

IF M=0

	ADDMAKE [+Export PRG], [Export C64|executable], [Save prg], prg, ex_c64prg.txt
	
	#

	ADDSAVE [+Save Art], [Export|Art Studio], [Save art], art, ex_art.txt
	ADDLOAD [+Load Art], [Import|Art Studio], [Load art], art, in_art.txt, ex_art.txt
    INK 1
	STOP
ENDIF

# C64 Multi

IF M=10
	ADDMAKE [+Export PRG], [Export C64|executable], [Save prg], prg, ex_c64mprg.txt

	#
	
	ADDSAVE [+Save Kla], [Export|Koala], [Save Koala], kla, ex_koala.txt
	ADDSAVE [+Save Ocp], [Export|Advanced|Art studio], [Save A.Art Studio], ocp, ex_ocp.txt	
	ADDLOAD [+Load Kla], [Import|Koala], [Load Koala], kla, in_koala.txt, ex_koala.txt	
	ADDLOAD [+Load Ocp], [Import|Advanced|Art Studio], [Load A.Art Studio], ocp, in_ocp.txt, ex_ocp.txt
	INK 1
	STOP
ENDIF

# CPC0

IF M=2
	ADDMAKE [+Export Bin], [Export|CPC binary], [Save bin], bin, ex_cpc0.txt
	ADDMAKE [+Make DSK], [Write|CPC Disk|Image], [Save dsk], dsk, ex_cpc0.txt, make_cpcdsk.txt
	POKE 17,8	
	STOP
ENDIF

# CPC1

IF M=25
	ADDMAKE [+Export Bin], [Export|CPC binary], [Save bin], bin, ex_cpc1.txt
	ADDMAKE [+Make DSK], [Write|CPC Disk|Image], [Save dsk], dsk, ex_cpc1.txt, make_cpcdsk.txt	
	POKE 17,8
	STOP
ENDIF

# CPC0 Overscan

IF M=26
	ADDMAKE [+Export Bin], [Export|CPC binary], [Save bin], bin, ex_cpc0oc.txt
	ADDMAKE [+Make DSK], [Write|CPC Disk|Image], [Save dsk], dsk, ex_cpc0oc.txt, make_cpcdsk.txt
	POKE 17,8
	STOP
ENDIF

# Plus4 hires

IF M=9
	ADDMAKE [+Export PRG], [Export plus4|Executable], [Save prg], prg, ex_plus4prg.txt
	
	#

	ADDSAVE [+Save Bott], [Export|Botticelli], [Save p4i], p4i, ex_botticelli.txt
	ADDLOAD [+Load Bott], [Import|Botticelli], [Load p4i], p4i, in_botticelli.txt, ex_botticelli.txt
	ADDLOAD [+Load .art], [Import|Botticelli|-old-], [Load art], art, in_botticelli.txt, ex_botticelli.txt
	STOP
ENDIF

# Plus4 multi

IF M=19	
	ADDMAKE [+Export PRG], [Export plus4|Executable], [Save prg], prg, ex_plus4mprg.txt

	#

	ADDSAVE [+Save MBott], [Export|Multi|Botticelli], [Save p4i], p4i, ex_mbotticelli.txt
	ADDLOAD [+Load MBott], [Import|Multi|Botticelli], [Load p4i], p4i, in_mbotticelli.txt, ex_mbotticelli.txt
	ADDLOAD [+Load .art], [Import|Multi|Botticelli|-old-], [Load art], art, in_mbotticelli.txt, ex_mbotticelli.txt
	STOP
ENDIF

# MSX1

IF M=5
	ADDMAKE [+Export COM], [Export MSX|Executable], [Save COM], com, ex_msxcom.txt
	
	#
	
	ADDSAVE [+Save SC2], [Export|SC2], [Save SC2], sc2, ex_sc2.txt
	ADDLOAD [+Load SC2], [Import|SC2], [Load SC2], sc2, in_sc2.txt, ex_sc2.txt
	STOP
ENDIF

# ZX Spectrum

IF M=6
	ADDMAKE [+Export TAP], [Export ZX|Tape], [Save TAP], tap, ex_zxtap.txt
	
	#

	ADDSAVE [+Save SCR], [Export|SCR], [Save SCREEN$], scr, ex_scr.txt
	ADDLOAD [+Load SCR], [Import|SCR], [Load SCREEN$], scr, in_scr.txt, ex_scr.txt
	STOP
ENDIF

# Ulaplus

IF M=67
	ADDMAKE [+Export TAP], [Export ZX|Tape], [Save TAP], tap, ex_ulaptap.txt
	
	#

	ADDSAVE [+Save SCR], [Export|SCR], [Save SCREEN$], scr, ex_ulap.txt
	ADDLOAD [+Load SCR], [Import|SCR], [Load SCREEN$], scr, in_ulap.txt, ex_ulap.txt
	POKE 17,8
	STOP
ENDIF

# Sinclair QL

IF M=66
	ADDSAVE [+Save SCR], [Export|SCR], [Save screen], scr, ex_ql.txt
	ADDLOAD [+Load SCR], [Import|SCR], [Load screen], scr, in_ql.txt, ex_ql.txt
	STOP
ENDIF

# Atari ST

IF M=12
	ADDSAVE [+Save PI1], [Export ST|Degas PI1|32034 len], [Save PI1], pi1, ex_stpi1.txt
	ADDSAVE [+Save PI1b], [Export ST|Degas2 PI1|32066 len], [Save PI1], pi1, ex_stpi1b.txt
	ADDLOAD [+Load PI1], [Import ST|Degas PI1], [Load PI1], pi1, in_stpi1.txt, ex_stpi1.txt
	POKE 17,8
	STOP
ENDIF

# Amiga

IF M=11
	ADDMAKE [+Export IFF], [Export|Amiga IFF], [Save .iff], iff, ex_iff.txt
	POKE 17,8
	STOP
ENDIF

# Vic 20 Hires

IF M=22
	ADDMAKE [+Export PRG], [Export|Vic 20 prg], [Save .prg], prg, ex_vicprg.txt
	ADDMAKE [+Export uPRG], [Export|Vic 20 prg|Unexpanded|See notes!], [Save .prg], prg, ex_vic_unexp.txt

	#

	ADDSAVE [+Save VIC], [Save|VIC], [Save .vic], vic, ex_vicvic.txt
	ADDLOAD [+Load VIC], [Load|VIC], [Load .vic], vic, in_vicvic.txt, ex_vicvic.txt
	STOP
ENDIF

# Vic 20 Multicolor

IF M=222
	ADDMAKE [+Export PRG], [Export|Vic 20 prg|Expanded], [Save .prg], prg, ex_vicprg.txt
	ADDMAKE [+Export uPRG], [Export|Vic 20 prg|Unexpanded|See notes!], [Save .prg], prg, ex_vic_unexp.txt

	#

	ADDSAVE [+Save VIC], [Save|raw VIC], [Save vic], vic, ex_vicvic.txt
	ADDLOAD [+Load VIC], [Load|raw VIC], [Load vic], vic, in_vicvic.txt, ex_vicvic.txt
	STOP
ENDIF

# ZX Spectrum Next 256

IF M=70
	ADDMAKE [+Export NEX], [Export|NEX|executable], [Save .nex], nex, ex_specnex.txt
	ADDSAVE [+Save NXI], [Save|NXI with|palette], [Save nxi], nxi, ex_specnxi.txt  
	ADDSAVE [+Save NXI wo], [Save|NXI without|palette], [Save nxi], nxi, ex_specnxiwo.txt  
	ADDLOAD [+Load NXI], [Load|NXI|], [Load nxi], nxi, in_specnxi.txt, ex_specnxi.txt
	ADDSAVE [+Save PAL], [Save|PAL 9-bit|palette], [Save pal], pal, ex_specnxpal.txt  
	ADDLOAD [+Load PAL], [Load|PAL 9-bit|palette], [Load pal], pal, in_specnxpal.txt, ex_specnxpal.txt 
	ADDSAVE [+Save SL2], [Save SL2|No palette|plus3dos], [Save SL2], sl2, ex_specnxsl2.txt  
	ADDLOAD [+Load SL2], [Load SL2|], [Load sl2], sl2, in_specnxsl2.txt, ex_specnxsl2.txt
	ADDSAVE [+Save SPR], [Save|SPR 16K|Spritebank], [Save spr], spr, ex_specnxspr.txt  
	ADDLOAD [+Load SPR], [Load|SPR 16K|Spritebank], [Load spr], spr, in_specnxspr.txt, ex_specnxspr.txt 
	POKE 17,0
	INK 255 
	STOP 
ENDIF

# ZX Spectrum Next 320

IF M=71
	ADDMAKE [+Export NEX], [Export|NEX|executable], [Save .nex], nex, ex_specnexb.txt	
	ADDSAVE [+Save NXI], [Save|NXI with|palette], [Save nxi], nxi, ex_specnxi.txt  
	ADDSAVE [+Save NXI wo], [Save|NXI without|palette], [Save nxi], nxi, ex_specnxiwo.txt  
	ADDLOAD [+Load NXI], [Load|NXI|], [Load nxi], nxi, in_specnxi.txt, ex_specnxi.txt	
	ADDSAVE [+Save PAL], [Save|PAL 9-bit|palette], [Save pal], pal, ex_specnxpal.txt  
	ADDLOAD [+Load PAL], [Load|PAL 9-bit|palette], [Load pal], pal, in_specnxpal.txt, ex_specnxpal.txt 
	POKE 17,0
	INK 255
ENDIF

IF M=80
	ADDSAVE [+Save dump], [Save|dump no|palette], [Save dump], dat, ex_ticlua.txt  
ENDIF
