News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_ervin

Using extra 64KB of 6128

Started by ervin, 12:54, 11 February 24

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ervin


ZorrO

@ervin - You almost did RAM tester. :)
10 a=&4000:o=&7F00:FOR b=252 TO 196 STEP-8:OUT o,b:POKE a,b:NEXT:OUT o,192:POKE a,188:FOR b=252 TO 196 STEP-8:OUT o,b:r=MAX(r,(8*PEEK(a)-180)):NEXT:PRINT r"K
CPC+PSX 4ever

eto

Quote from: ervin on 11:38, 04 March 24However, I'm wondering if it's possible to use a basic loader, and use OUT commands to change the current banking scheme, and then load a BIN file into the appropriate bank.
You can page in RAM bank 4-7 at &4000 and then use a normal load command for binary files with the target address &4000.

LOAD "binary.bin",&4000

andycadley

Yeah, BASIC won't mess up your banking arrangement, so you can just do MEMORY &3FFF, page with an OUT and the load binary data into &4000.

ervin

Excellent! Thanks everyone.
:)

Jean-Marie

Quote from: ervin on 11:38, 04 March 24However, I'm wondering if it's possible to use a basic loader, and use OUT commands to change the current banking scheme, and then load a BIN file into the appropriate bank.
That is what I did with Sly Spy allegro : I fill the banks with music files & the player from the basic loader.
1 SYMBOL AFTER 256:OPENOUT"JMB":MEMORY HIMEM-1:CLOSEOUT    
10 DATA CD,01,56,CD,6B,54,01,C0,7F,ED,49
20 MODE 1:BORDER 0:INK 0,0:INK 1,26:PEN 1:PAPER 0:CALL &BB00
30 h=HIMEM-1:MEMORY &3FFF:PRINT "LOADING PATCH..."
40 OUT &7F00,&C4
50 REM Setup a dummy interrupt handler in extra-ram, offset 38h
60 POKE &4038,&FB:POKE &4039,&C9
70 REM ORG &0717:jp &00AA
80 POKE &4717,&C3:POKE &4718,&AA:POKE &4719,0
90 REM ORG &0736:call &5601:call &546B:ld bc,&7FC0:out (c),c
100 FOR x%=&4736 TO &4740:READ a$:POKE x%,VAL("&"+a$):NEXT
110 LOAD"PATCH.BIN",&40AA
120 REM Bounce 64K users
130 OUT &7F00,&C0
140 IF PEEK(&4038)=&FB AND PEEK(&4039)=&C9 THEN PRINT"ERROR: 128K OF RAM REQUIRED. ";CHR$(225):END
150 PRINT"LOADING PATCH 2..."
160 LOAD"PATCH2.BIN",&6000
170 REM Load AYC player & music files in extra-ram (4000h to F???h)
180 PRINT"LOADING MUSIC BLOCK 1..."
190 OUT &7F00,&C5
200 LOAD"MUSIC1.BIN",&4000
210 PRINT"LOADING MUSIC BLOCK 2..."
220 OUT &7F00,&C6
230 LOAD"MUSIC2.BIN",&4000
240 PRINT"LOADING MUSIC BLOCK 3..."
250 OUT &7F00,&C7
260 LOAD"MUSIC3.BIN",&4000
270 REM Run original loader from default RAM banks
280 PRINT "RUNNING SLY SPY (allegro)... "
290 OUT &7F00,&C0
300 MEMORY h:RUN"CNG.BAS"

ervin

That's brilliant!
Thanks so much.

Powered by SMFPacks Menu Editor Mod