Bios is called at linesplit? (Development Foros MSX)MSX Resource Center            
                       
English Nederlands Espa�ol Portugu�s Russian                  
 Noticias
   Página principal
  Almacén de noticias
  Temas de noticias

 Recursos
   Foros MSX
  Artículos
  Analisis
  Informe de ferias/RUs
  Álbum de fotos
  Ferias y encuentros
  Encuestas
  Enlaces
  Buscar

 Software
   Descargas
  Tienda Online

 MRC
   Quiénes somos
  Únete a nuestro equipo
  Donar
  Políticas
  Contacta con nosotros
  Enlázanos
  Estadísticas

 Buscar
 
  

  

 Login
 

Login

Contraseña




¿Aún no tienes una cuenta? ¡Conviértete en miembro del MSX Resource Center! ¡Únete a nosotros!.


 Estadísticas
 

Hay 50 invitados y 3 miembros en línea

Eres un usuario anónimo.
 

Foros MSX


Foros MSX

Development - Bios is called at linesplit?

Ir a la página ( Página anterior 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 Siguiente página )
Autor

Bios is called at linesplit?

norakomi
msx professional
Mensajes: 861
Publicado: Diciembre 20 2005, 14:14   
Quote:

setting RAM in page 0 might be something like this:

ld a,(#F341) ; get RAM primslot for page 0
ld h,0 (indicates page 0 to be set)
call #24 ; change slot

back to ROM might be simple:
ld a,0
ld h,0
call #24

Ok, this is what I did:

;copy page 0 to page 1
ld hl,0 ;start
ld de,$4000 ;destiny
ld bc,$4000 ;lenght
ldir ;copy block

;set page 0 to RAM
ld a,(#F341) ; get RAM primslot for page 0
ld h,0 (indicates page 0 to be set)
call #24 ; change slot

ld hl,$4000 ;start
ld de,0 ;destiny
ld bc,$4000 ;lenght
ldir ;copy block

So I copied page 0 to page 1
then I changed page 0 to RAM
then I copied page 1 back to page 0

So now I have RAM in page 0 and it still looks like it was before.

but..... eh.....

it
doesnt


...
hmmm

work

ARTRAG
online
msx master
Mensajes: 1802
Publicado: Diciembre 20 2005, 14:27   
Ok, this is what you did:

;copy page 0 to page 1
ld hl,0 ;start
ld de,$4000 ;destiny
ld bc,$4000 ;lenght
ldir ;copy block

you copied Rom basic to ROM basic => no effect

;set page 0 to RAM
ld a,(#F341) ; get RAM primslot for page 0
ld h,0 (indicates page 0 to be set)
call #24 ; change slot

you try to enable ram in page 0 using a routine in page 0 => the bios routine hangs or ingores you

ld hl,$4000 ;start
ld de,0 ;destiny
ld bc,$4000 ;lenght
ldir ;copy block

you hanged before, but in case you are again copying ROM to ROM

Maybe you could need a deeper understanding of
page swap before going further...


PS
maybe if you say what you need someone could guide you....
ro
msx guru
Mensajes: 2353
Publicado: Diciembre 20 2005, 14:29   
Quote:

Actually this seems a complicated solution to a simple problem.

A part from the waste of space (you pointed by yourself),
when interrupt occurs you do a call to 4141$.

At 4141$ you have to do ints managemnet by yourself.

Now, you do not need to handle all the bios actions,
your sole goal is to wait for FH and setting vdp regs.

so what is the point in playing havoc with the ints, when you can
disable ints and do polling for FH?

It is easyer and error safe.

And you can switch ram pages (included page0) at you willing!!!



What's with the polling man.
When busy doing some main routines (like an animation for example, or WHATEVER) you don't wanna spend precious time (and sourcecode) on polling the interrupt status. Why not automatic like ints should do?!
so never worry about int stat. just set and let'm run.

Interrupts have always been crucial stuff, everyone's nightmare when starting assembly coding. but once you grasp the whole it's your best friend.
set up a good environment for ints to react properly. I know it can be hard. . .
ro
msx guru
Mensajes: 2353
Publicado: Diciembre 20 2005, 14:41   
like ATRAG said:

FISRT set page 0,0 to RAM (in order to be able to write data eh!)
then do the copy (ldir) instrucion


You don't need to copy anything in order to use RAM in page 0
it might be a good idead, however, to set MEMMAP in page 0 too

like you do in wbass 2:
> PAGE 0,3,2,3
*assuming primslot=3, secslot=2
Memmap 3 will now be available as RAM in page 0,0

in assembly something like this:

;make sure all pages have correct sec.slots
(poke -a,xx)

;Set page 0, primairy slot to RAM
ld a,(#F341)
ld h,0 (indicates page 0 to be set)
call #24 ; change slot

;set memmap 3
ld a,3
out (#FC),A ;or use dos2 call (call out_fc)





ARTRAG
online
msx master
Mensajes: 1802
Publicado: Diciembre 20 2005, 14:43   
@ro
I agree in principle, but you cannot do a screen split and a 60fps shooter
if you do VDP I/O both in the main and in the int routine.

norakomi
msx professional
Mensajes: 861
Publicado: Diciembre 20 2005, 15:11   
Quote:

;Set page 0, primairy slot to RAM
ld a,(#F341)
ld h,0 (indicates page 0 to be set)
call #24 ; change slot

as soon as I do this the computer hangs.
Making sure all pages have correct sec.slots is not clear to me.
In Wbass2 I can type:
Quote:

> PAGE 0,3,2,x
*assuming primslot=3, secslot=2
Memmap x will now be available as RAM in page 0,0


but how does this work in assembly?

I mean this:
Quote:

;make sure all pages have correct sec.slots
(poke -a,xx)


ro
msx guru
Mensajes: 2353
Publicado: Diciembre 20 2005, 15:15   
when setting to RAM remember to set back to ROM eh, or else your environment might crash. (remember WBASS2 makes good use of BIOS)
also depends where your code is stored eh.

like org #c000 will work prolly
norakomi
msx professional
Mensajes: 861
Publicado: Diciembre 20 2005, 15:24   
org $c000

;Set page 0, primairy slot to RAM
ld a,(#F341)
ld h,0 (indicates page 0 to be set)
call #24 ; change slot

;Set page 0, primairy slot to ROM
ld a,0
ld h,0 (indicates page 0 to be set)
call #24 ; change slot

ret

this doesnt even work
norakomi
msx professional
Mensajes: 861
Publicado: Diciembre 20 2005, 15:25   
Hey call $24 changes secondary or primary slot?
ARTRAG
online
msx master
Mensajes: 1802
Publicado: Diciembre 20 2005, 15:27   
try MemMan 2.32 or 2.4
http://map.tni.nl/resources/tsrdev_en.php

It can be used both in basic and in dos and masks you
the HW memory details like mapper or slots.

look for "memman24tsr.zip" on the fun taboo site


PS

AFAIK, it is nonsense to set ram in page 0 by using a
routine that is in page 0. You cannot do that without
hanging everithing (unless the bios goes itself outside
page o to do enableslot, but this is not the case).
Look for a routine in page 3 if you need to enable
ram in page 0....

ro
msx guru
Mensajes: 2353
Publicado: Diciembre 20 2005, 15:32   
Quote:

org $c000

;Set page 0, primairy slot to RAM
ld a,(#F341)
ld h,0 (indicates page 0 to be set)
call #24 ; change slot

;Set page 0, primairy slot to ROM
ld a,0
ld h,0 (indicates page 0 to be set)
call #24 ; change slot

ret

this doesnt even work


this only works, ofcourse, if BIOS is set initially !!
(so if you've set page 0,3,2 in Wbass you're already screwed. set page 0,0,0 again)
ro
msx guru
Mensajes: 2353
Publicado: Diciembre 20 2005, 15:34   
Quote:


PS

AFAIK, it is nonsense to set ram in page 0 by using a
routine that is in page 0. You cannot do that without
hanging everithing (unless the bios goes itself outside
page o to do enableslot, but this is not the case).
Look for a routine in page 3 if you need to enable
ram in page 0....


no, BIOS will do an interslot call and calls to HIMEM here

ARTRAG
online
msx master
Mensajes: 1802
Publicado: Diciembre 20 2005, 15:39   
Ok, in this case things could work, but why not using
directly the routine at HIMEM in this case ?
norakomi
msx professional
Mensajes: 861
Publicado: Diciembre 20 2005, 15:42   
Quote:

this only works, ofcourse, if BIOS is set initially !!
(so if you've set page 0,3,2 in Wbass you're already screwed. set page 0,0,0 again)

it is, and i have.
so what about setting the primary slot, and the secondary??
norakomi
msx professional
Mensajes: 861
Publicado: Diciembre 20 2005, 15:47   
Quote:

........ the routine at HIMEM in this case ?

whats 'the routine at HIMEM' ???
I found this info:
___________________________________________________
RDSLT

Address : #000C
Function : Reads the value of an address in another slot
Input : A - ExxxSSPP
| || Primary slotnumber (00-11)
| - Secundary slotnumber (00-11)
+----------- Expanded slot (0 = no, 1 = yes)
HL - Address to read
Output : A - Contains the vaule of the read address
Registers: AF, C, DE
Remark : This routine turns off the interupt, but won't turn it on again


ENASLT

Address : #0024
Function : Switches indicated slot at indicated page on perpetual
Input : A - ExxxSSPP
+-?------ see RDSLT
H - Bit 6 and 7 must contain the page number (00-11)
___________________________________________________

so A should be:
ld a,%00 00 11 00 ;page 0 slot 3 ??

 
Ir a la página ( Página anterior 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 Siguiente página )
 







(c) 1994 - 2009 Fundación MSX Resource Center. MSX es una marca registrada de MSX Licensing Corporation