Hello,
After a long time I still write to you on this forum.
In Italy things are really bad! And it makes us feel less and less Italian, but that's another story.
We come to the problem in my question for MSX, as usual.
I ask your always kind help of all time.
I should map to MSX1, using a 16K RAM memory mapper cartridge,
and store the game levels for SCREEN1.
already have ready routines, but not finished, that's why I ask you.
name file BASIC: RAM16K.BAS
10 IF PEEK(&HF677)=128 THEN POKE &HC000,0:POKE&HF677,&HC0:RUN"RAM16K.bas" 20 OUT &HFE,2:BLOAD "LEVELS.BIN":OUT &HFE,1:REM start LEVELS at 4000h 22 PS=(INP(&HA8)AND192)/64:S=PS+PEEK(&HFCC1+PS)+(PEEK(&HFCC5+PS) AND192)/16:REM calculate slot ID 24 POKE &HFA00,&HF7:POKE &HFA01,S:POKE &HFA02,&H0 :POKE &HFA03,&H40:POKE &HFA04,&HC9:DEFUSR0=&HFA00 : REM Poke insterslot call to START 26 POKE &HFA05,&HF7:POKE &HFA06,S:POKE &HFA07,&H20 :POKE &HFA08,&H40:POKE &HFA09,&HC9:DEFUSR1=&HFA05 : REM Poke insterslot call to INTON 28 POKE &HFA0A,&HF7:POKE &HFA0B,S:POKE &HFA0C,&H50 :POKE &HFA0D,&H40:POKE &HFA0E,&HC9:DEFUSR2=&HFA0A : REM Poke insterslot call to INTOFF 29 U=USR(0):U=USR1(0): REM start and play 30 REM poke &Hf677,128:run "example.bas": REM RUN EXAMPLE GAME PROGRAM
This first program is the loader BASIC for LEVELS.BIN in RAM 16K RAM MAPPER
This routine assembler to use for LEVELS GAME for SCREEN1
; Prog: ; Code: [YOUR HANDLE] ; Date: 7/11/2017 ; ; ; ; Coded in TeddyWareZ' Chaos Assembler 3 ; ; (C) 2018 EDIZIONI DATAPRINT MAGAZINE LDIRVM .equ $005C ; routine del BIOS usata per riempire la VRAM CHRPUT .equ $1800 ; CHAR PUT (PRINT BASIC) .org $9000 - 7 .db $fe .dw startProgram,endProgram,startProgram startProgram: jr main sel: ; selezione livello di gioco .db 0 ; selezione livello di gioco main: ld ix,table ld a,(sel) add a,a ld c,a ld b,0 add ix,bc ld l,(ix+0) ld h,(ix+1) ; ld hl,LEVEL1 ; READ LEVELS ld de,CHRPUT+64 ld bc,32*22 call LDIRVM RET table: .DW LEVEL1,LEVEL2,LEVEL3,LEVEL4,LEVEL5,LEVEL6,LEVEL7,LEVEL8 .DW LEVEL9 LEVEL1: .............. .............. .............. LEVEL2: .............. .............. .............. LEVEL3: .............. .............. .............. ECT.... endProgram: .end
This last part you need to use the LEVELS.BIN file that must be stored there
GetPage3Slot: call RSLREG and %11000000 rlca rlca ld c,a ld b,0 ld hl,EXPTBL add hl,bc ld c,a ld a,(hl) and $80 or c ld c,a inc hl ; move to SLTTBL inc hl inc hl inc hl ld a,(hl) and %11000000 rrca rrca rrca rrca or c ret
Login sesión o register para postear comentarios