Autor
| Bios is called at linesplit?
|
ro msx guru Mensajes: 2347 | Publicado: Diciembre 21 2005, 13:28   |
it hangs because your interrupts are prolly still running #38
hang on there, it's not all that e.z. indeed geheh. |
|
ro msx guru Mensajes: 2347 | Publicado: Diciembre 21 2005, 13:32   |
Quote:
| Quote:
| why not do something like:
di
a,(a8) ;get primslot settings
and #fc ;keep pages 1-3
ld b,a
ld a,(f343) ;get RAM primslot
and #03 ;keep page 0
or b
out (a8),a ;write primslot again
ei
fast and furious.

|
changed the a,(a8) to in a,($a8) and the out (a8),a to out ($a8),a
If i type this code at the beginning of $c000 it immediately hangs when i run it...
It was allmost getting clear to me what was going on, but now Im very confused again  haha
|
it is important you grasp the whole idea.
the A8 port is where primslots are to be set/read. |
|
norakomi msx professional Mensajes: 861 | Publicado: Diciembre 21 2005, 13:37   |
.
|
|
norakomi msx professional Mensajes: 861 | Publicado: Diciembre 21 2005, 13:38   |
Quote:
| Im allmost convinced that this code is incorrect:
;set page 0 to RAM
ld a,(#F341) or ld a,(#F343) ; get RAM primslot for page 0
ld h,0 (indicates page 0 to be set)
call #24 ; change slot
because when I use ld a,%00 00 11 00 it seems to work..... ???
|
What SHOULD A be in my case? Quote:
| When I type "page" in Wbass2 I get this:
Page Slot Mem
0.......0.... 3.....
1.......3-2..5.....
2.......3.2..4.....
3.......3.2..0.....
|
|
|
norakomi msx professional Mensajes: 861 | Publicado: Diciembre 21 2005, 13:41   |
Quote:
| ;page2 to mapper 6
ld a,6
out ($fe),a
;make a copy of page 0 (ROM) to page 2 (RAM)
ld hl,0 ;start
ld de,$8000 ;destiny
ld bc,$4000 ;lenght
ldir ;copy block
;page0 to mapper 6 NOW PAGE 0 contains the copied Bios which was in page 0 initially
ld a,6
ld ($fc),a
|
doesnt this make sure that page0 is in memmap 6, and contains the BIOS info, which was in a different memmap before?
And if so; doesnt this mean that after changing the ROM (page 0) to RAM, the data in this page is still the same (because it readsout memmap 6)??? |
|
norakomi msx professional Mensajes: 861 | Publicado: Diciembre 21 2005, 13:51   |
Quote:
| putting BIOS in RAM is hell
|
I seem to feel a bit misplaced....
Being in hell.....
thats comforting  |
|
ro msx guru Mensajes: 2347 | Publicado: Diciembre 21 2005, 13:52   |
Quote:
| Quote:
| Im allmost convinced that this code is incorrect:
;set page 0 to RAM
ld a,(#F341) or ld a,(#F343) ; get RAM primslot for page 0
ld h,0 (indicates page 0 to be set)
call #24 ; change slot
because when I use ld a,%00 00 11 00 it seems to work..... ???
|
What SHOULD A be in my case? Quote:
| When I type "page" in Wbass2 I get this:
Page Slot Mem
0.......0.... 3.....
1.......3-2..5.....
2.......3.2..4.....
3.......3.2..0.....
|
|
A should be 3, your primairy slot nr.
page 1,3,2,5 for example means: page 1 containts PRIM slot 3 (#a8) and SEC slot 2 (#FFFF) set at mapper nr 5 |
|
ro msx guru Mensajes: 2347 | Publicado: Diciembre 21 2005, 13:54   |
Quote:
| Quote:
| ;page2 to mapper 6
ld a,6
out ($fe),a
;make a copy of page 0 (ROM) to page 2 (RAM)
ld hl,0 ;start
ld de,$8000 ;destiny
ld bc,$4000 ;lenght
ldir ;copy block
;page0 to mapper 6 NOW PAGE 0 contains the copied Bios which was in page 0 initially
ld a,6
ld ($fc),a
|
doesnt this make sure that page0 is in memmap 6, and contains the BIOS info, which was in a different memmap before?
And if so; doesnt this mean that after changing the ROM (page 0) to RAM, the data in this page is still the same (because it readsout memmap 6)???
|
yes, I rec'n
let's see:
page 0: ROM
page 2: RAM
set map 6 @ page 2
copy ROM to RAM
set map 6 @ page 0
page 0: RAM
this should work indeed.
|
|
BiFi msx guru Mensajes: 3142 | Publicado: Diciembre 21 2005, 15:36   |
Quote:
| because when I use ld a,%00 00 11 00 it seems to work..... ???
|
let's do a small rewrite of that value in binary:
E xxx SS PP
0 000 11 00 E = expanded slot flag. when this flag is set the SS part is valid (slot 0-3), otherwise it's only the PP part... (slot 0)
in this case, just unexpanded slot 0... which is where the BIOS is actually located. |
|
norakomi msx professional Mensajes: 861 | Publicado: Diciembre 22 2005, 11:56   |
Quote:
| let's see:
page 0: ROM
page 2: RAM
set map 6 @ page 2
copy ROM to RAM
set map 6 @ page 0
page 0: RAM
this should work indeed.
|
except for the fact that this only changes page 0's mapper, and doesnt change its ROM to RAM |
|
ro msx guru Mensajes: 2347 | Publicado: Diciembre 22 2005, 14:13   |
it does.. the last "pseudo" instruction  |
|
BiFi msx guru Mensajes: 3142 | Publicado: Diciembre 22 2005, 15:01   |
followed by a crash...  |
|
norakomi msx professional Mensajes: 861 | Publicado: Diciembre 22 2005, 16:17   |
Quote:
| followed by a crash... 
|
hmmm, I dont get it....
why the crash....
If it DOES change page 0's ROM to RAM,
then why does it crash??
set map 6 @ page 2
copy ROM to RAM
set map 6 @ page 0
doesnt this make sure, that all the content of page 0's ROM is copied to Mapper 6?
And if so, after switching page 0 to Mapper 6........ the initial content of page 0's Bios should be there right??
confusing |
|
Sonic_aka_T
 msx guru Mensajes: 2269 | Publicado: Diciembre 22 2005, 16:27   |
won't the BIOS ISR just switch itself back? (or the first subrom call for that matter)
|
|
norakomi msx professional Mensajes: 861 | Publicado: Diciembre 22 2005, 16:31   |
I'm out of ideas....
Anyone?
|
|
|
|
|