Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
where can I get help with the memory on the spectrum 128k?
#7
hello, good day.

the way it works here for me is that you can switch on the bank at $c000 and then draw on it and then copy from $c000 to $4000.

you don't need to first draw on $4000 and then copy $c000 into the bank.

so you have two screens $4000 and when a bank is switched on $c000.

draw a graphic in the background ($c000) and then copy to $4000.

greetings


-----------------------------------------
#Include <SP/Fill.bas>
#include <memcopy.bas>

DIM wert AS UInteger

Sub fastcall _bank(n as UByte)
ASM
  ld c, a  ; A register contains the n parameter
  ld a,(0x5b5c)
  and 0xf8
  or c ;bank N auswählen
  ld bc,0x7ffd
  di
  ld (0x5b5c),a
  out ©,a
  ei
END ASM
end sub

CLS

_bank(3)
for wert=$c000 to $c000+6143
  poke wert,129
next wert

_bank(1)
for wert=$c000 to $c000+6143
  poke wert,137
next wert

do
    IF INKEY$ = "w" THEN
      _bank(1)
      MemMove($c000, $4000, 6144)
end if
IF INKEY$ = "e" THEN
      _bank(3)
      MemMove($c000, $4000, 6144)
end if 
loop

------------------------------------------------
Reply


Messages In This Thread
RE: where can I get help with the memory on the spectrum 128k? - by funkheld - 11-15-2024, 01:16 PM

Forum Jump:


Users browsing this thread: 5 Guest(s)