News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Ast

Multiface 2 programming

Started by Ast, 19:30, 17 November 16

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ast


Hello everybody...

Is it possible to execute a rom code using the ram plage (#2000-#37ff) in the multiface 2 interface?
(Direct jump, of course!)


The code will use the rst#18 to run a rom proggy.




Thanks for reply.
_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"

http://amstradplus.forumforever.com/index.php
http://impdos.wikidot.com/
http://impdraw.wikidot.com/

All friends are welcome !

arnoldemu

Quote from: Ast on 19:30, 17 November 16
Hello everybody...

Is it possible to execute a rom code using the ram plage (#2000-#37ff) in the multiface 2 interface?
(Direct jump, of course!)


The code will use the rst#18 to run a rom proggy.




Thanks for reply.
Execute in another ROM?

Yes if you jump direct (out df00 and jump to rom), no if you use rst#18.

You will need to go to ram first and disable the mf2 ram/rom before the rst#18.


Ast

Is this like that ?



Di
Ld bc,#fee8 ; enable multiface 2
Out (c ),c
....
Ld bc,#feea ; disable multiface 2
Out (c),c
Ei
Ret


_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"

http://amstradplus.forumforever.com/index.php
http://impdos.wikidot.com/
http://impdraw.wikidot.com/

All friends are welcome !

arnoldemu

Quote from: Ast on 13:45, 18 November 16
Is this like that ?



Di
Ld bc,#fee8 ; enable multiface 2
Out (c ),c
....
Ld bc,#feea ; disable multiface 2
Out (c),c
Ei
Ret

Yes, but it depends on what you need to do.

Are you calling mf2 rom, or another rom?

if your code is in mf2 ram, and you want to call another rom then do this:


org &2000
ld hl,call_rom
ld de,&be00
ld bc,end_call_rom-call_rom
ldir
call &be00
ret

call_rom:
di
ld bc,&feea
out (c),c
ei
rst 18
defw rst_addr
di
ld bc,&fee8
out (c),c
ei
ret


Ast

Quote
if your code is in mf2 ram, and you want to call another rom then do this:


org &2000
ld hl,call_rom
ld de,&be00
ld bc,end_call_rom-call_rom
ldir
call &be00
ret

call_rom:
di
ld bc,&feea
out (c),c
ei
rst 18
defw rst_addr
di
ld bc,&fee8
out (c),c
ei
ret



Thanks Kevin. That's exactly how i do. I'll post soon my final code.
_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"

http://amstradplus.forumforever.com/index.php
http://impdos.wikidot.com/
http://impdraw.wikidot.com/

All friends are welcome !

Powered by SMFPacks Menu Editor Mod