Re: [MSX] switching r800 - z80 in TP

2004-01-02 Thread raymond
Hello Patriek,

Sorry for my late reply, I'm just back from a holiday... ;-) )

I will give it a try and let you all know asap!

Kind regards,

Raymond




Patriek Lesparre [EMAIL PROTECTED] 
Sent by: [EMAIL PROTECTED]
29-12-2003 15:49
Please respond to
[EMAIL PROTECTED]


To
[EMAIL PROTECTED]
cc

Subject
Re: [MSX] switching r800 - z80 in TP






Yup, and the stupid thing is, it checks the MSX type EVERY time a song is 
started, switches to R800, and modifies the appropriate I/O routines. This 

should be in some kind of initialisation routine.
I understand why there's no such routine, because the original assembly 
player doesn't have one either, and the pascal version follows it closely.

After taking a closer look: the code DOES check the CPU mode, after it has 

determined it's turboR, but here's the kicker: The CPU mode check destroys 

the BC,DE,HL,IX registers, in which the modified routine addresses are 
stored!

This is a very grave bug, and this 'feature' (Z80 mode on turboR) 
obviously 
has NEVER been tested, because it will surely crash every time. Maybe it's 

not so obvious the 0183h routine destroys BC-HL, but if you use IX for the 

interslotcall to 0183h, you must realize IX will not hold its previous 
value later ^^;;;

Working around this just requires some PUSH/POP instructions, but I didn't 

want to risk losing possible code/data alignment later, so that's why I 
suggested the patch to always assume Z80.

Anyway, no reply from Raymond yet, but I hope he has the same version as I 

worked with (got it from manuel bilderbeek's page) and that it'll work for 

him :)

Greetz,
 Patriek

Laurens Holst wrote:
Ah, yes... It probably doesn't detect the current CPU mode - instead it
detects the computer type, which is ofcourse always turboR (which it
interprets as R800) whether it actually is in Z80 mode or not.


~Grauw

Patriek Lesparre wrote:
  Hi Raymond,
 
  That's indeed a pretty good indication the problem indeed lies with
  the player.
 
  I suppose you're using Kari Lammassaari's Moonblaster player for
  Pascal? I took a small look at it and here's how to disable the
  turboR detection:
 
  Load a Hex-Editor (DiskView on MSX will do fine) and edit the
  mbplayer.mpc file. Byte 0327h should contain 38h, change this to 18h.
 
  This will make the player think it's always running on Z80.
 
  Greetz,
  Patriek
 
  ___
  MSX mailing list ([EMAIL PROTECTED])
  Info page: http://lists.stack.nl/mailman/listinfo/msx

---
Ushiko-san! Kimi wa doushite, Ushiko-san nan da!!

___
MSX mailing list ([EMAIL PROTECTED])
Info page: http://lists.stack.nl/mailman/listinfo/msx

___
MSX mailing list ([EMAIL PROTECTED])
Info page: http://lists.stack.nl/mailman/listinfo/msx


___
MSX mailing list ([EMAIL PROTECTED])
Info page: http://lists.stack.nl/mailman/listinfo/msx


Re: [MSX] switching r800 - z80 in TP

2003-12-30 Thread Eric Boon
Patriek Lesparre wrote:
Mr. Boon,
	bla

Mr Lesparre,

get a life.

	Eric

___
MSX mailing list ([EMAIL PROTECTED])
Info page: http://lists.stack.nl/mailman/listinfo/msx


Re: [MSX] switching r800 - z80 in TP

2003-12-29 Thread Laurens Holst
Ah, yes... It probably doesn't detect the current CPU mode - instead it
detects the computer type, which is ofcourse always turboR (which it
interprets as R800) whether it actually is in Z80 mode or not.


~Grauw

Patriek Lesparre wrote:
 Hi Raymond,

 That's indeed a pretty good indication the problem indeed lies with
 the player.

 I suppose you're using Kari Lammassaari's Moonblaster player for
 Pascal? I took a small look at it and here's how to disable the
 turboR detection:

 Load a Hex-Editor (DiskView on MSX will do fine) and edit the
 mbplayer.mpc file. Byte 0327h should contain 38h, change this to 18h.

 This will make the player think it's always running on Z80.

 Greetz,
 Patriek

 ___
 MSX mailing list ([EMAIL PROTECTED])
 Info page: http://lists.stack.nl/mailman/listinfo/msx

---
Ushiko-san! Kimi wa doushite, Ushiko-san nan da!!

___
MSX mailing list ([EMAIL PROTECTED])
Info page: http://lists.stack.nl/mailman/listinfo/msx


Re: [MSX] switching r800 - z80 in TP

2003-12-29 Thread Patriek Lesparre
Yup, and the stupid thing is, it checks the MSX type EVERY time a song is 
started, switches to R800, and modifies the appropriate I/O routines. This 
should be in some kind of initialisation routine.
I understand why there's no such routine, because the original assembly 
player doesn't have one either, and the pascal version follows it closely.

After taking a closer look: the code DOES check the CPU mode, after it has 
determined it's turboR, but here's the kicker: The CPU mode check destroys 
the BC,DE,HL,IX registers, in which the modified routine addresses are stored!

This is a very grave bug, and this 'feature' (Z80 mode on turboR) obviously 
has NEVER been tested, because it will surely crash every time. Maybe it's 
not so obvious the 0183h routine destroys BC-HL, but if you use IX for the 
interslotcall to 0183h, you must realize IX will not hold its previous 
value later ^^;;;

Working around this just requires some PUSH/POP instructions, but I didn't 
want to risk losing possible code/data alignment later, so that's why I 
suggested the patch to always assume Z80.

Anyway, no reply from Raymond yet, but I hope he has the same version as I 
worked with (got it from manuel bilderbeek's page) and that it'll work for 
him :)

Greetz,
Patriek
Laurens Holst wrote:
Ah, yes... It probably doesn't detect the current CPU mode - instead it
detects the computer type, which is ofcourse always turboR (which it
interprets as R800) whether it actually is in Z80 mode or not.
~Grauw

Patriek Lesparre wrote:
 Hi Raymond,

 That's indeed a pretty good indication the problem indeed lies with
 the player.

 I suppose you're using Kari Lammassaari's Moonblaster player for
 Pascal? I took a small look at it and here's how to disable the
 turboR detection:

 Load a Hex-Editor (DiskView on MSX will do fine) and edit the
 mbplayer.mpc file. Byte 0327h should contain 38h, change this to 18h.

 This will make the player think it's always running on Z80.

 Greetz,
 Patriek

 ___
 MSX mailing list ([EMAIL PROTECTED])
 Info page: http://lists.stack.nl/mailman/listinfo/msx
---
Ushiko-san! Kimi wa doushite, Ushiko-san nan da!!
___
MSX mailing list ([EMAIL PROTECTED])
Info page: http://lists.stack.nl/mailman/listinfo/msx
___
MSX mailing list ([EMAIL PROTECTED])
Info page: http://lists.stack.nl/mailman/listinfo/msx


Re: [MSX] switching r800 - z80 in TP

2003-12-29 Thread Eric Boon
Patriek Lesparre wrote:

Yup, and the stupid thing is, it checks the MSX type EVERY time a song 
is started, switches to R800, and modifies the appropriate I/O routines.
...to make sure that the I/O timing is always correct, I presume.
(Although, to be 100% sure, the routine would have to check the MSX type
 R800 mode on every interrupt ;-P)
This should be in some kind of initialisation routine.
I understand why there's no such routine, because the original assembly 
player doesn't have one either, and the pascal version follows it closely.
Hm, the replay routine I have does have this check, and it's pretty 
close to 'original', since I got it directly from Remco Scrijvers,
ages ago :-)

Working around this just requires some PUSH/POP instructions, but I 
didn't want to risk losing possible code/data alignment later, so that's 
why I suggested the patch to always assume Z80.
Hm, that will *only* work if the MSX really is in Z80 mode, which 
fortunately will be the casr for Raymond. Otherwise the OUT timing will 
be too fast, I'm afraid. So'd say it's a hack, not a patch ;-P

	Eric

___
MSX mailing list ([EMAIL PROTECTED])
Info page: http://lists.stack.nl/mailman/listinfo/msx


Re: [MSX] switching r800 - z80 in TP

2003-12-29 Thread Patriek Lesparre
Mr. Boon,

If you know so well, why don't you release a proper patch then?
In fact, if you know so well, why didn't you help Raymond in the first place?
You wrote:
(Although, to be 100% sure, the routine would have to check the MSX type
 R800 mode on every interrupt ;-P)
That's only when assuming the music player can't be interrupted, which is 
not always the case. For example, when using a lot of line interrupts, you 
really want a multi-level interrupt.

This should be in some kind of initialisation routine.
I understand why there's no such routine, because the original assembly 
player doesn't have one either, and the pascal version follows it closely.
Hm, the replay routine I have does have this check, and it's pretty close 
to 'original', since I got it directly from Remco Scrijvers,
ages ago :-)
I didn't say the original didn't have this CHECK, I said the original 
doesn't have a seperate initialisation routine. Please READ before trying 
to be smart.

Hm, that will *only* work if the MSX really is in Z80 mode
OBVIOUSLY

which fortunately will be the casr for Raymond.
duh! I wouldn't have suggested it otherwise.

Otherwise the OUT timing will be too fast, I'm afraid. So'd say it's a 
hack, not a patch ;-P
It *IS* a patch, a patch to assume Z80 mode always! There's nothing hacky 
about it. I even said a real FIX would be possible and I even said how to 
do it!

So in the future, please keep the smart-ass comments to yourself, if you 
can't be helpful. If this was the first time, I could laugh about it, but 
it's getting REALLY annoying that you always try to find faults in what I 
say and make stupid remarks and lame jokes.

Or maybe I shouldn't go out of my way to help other people?

A good day to you, asshole!

- Patriek

___
MSX mailing list ([EMAIL PROTECTED])
Info page: http://lists.stack.nl/mailman/listinfo/msx


Re: [MSX] switching r800 - z80 in TP

2003-12-28 Thread raymond
Hello Patriek,

I understand your sarcasm, but trust me we have spend two saterdays on 
this problem now. Tried to get rid of it in several ways, but haven't 
succeeded in our attempts.

We've been bugsearching, and I can you tell more about this problem. To be 
exact it looks like the player is only willing to play in R800 mode on a 
Turbo R. When I switch to Z80 before I load the player or when the player 
is loaded it crashes. I even tried it without the game and then it also 
crashes. The problem is, this moonblaster player that cannot work 
correctly on a Turbo R when you switch to Z80 before or after you have 
loaded it. All I can do with this is not using it, but nobody is waiting 
for a game without music. As I am not a ML programmer and I do not have 
the sourcecode from this I cannot search for the bug in this code and if I 
had the ML sourcecode I wouldn't know what I should search for as we are 
creating our game in TP.

Thanks.

Raymond





Patriek Lesparre [EMAIL PROTECTED] 
Sent by: [EMAIL PROTECTED]
28-12-2003 07:50
Please respond to
[EMAIL PROTECTED]


To
[EMAIL PROTECTED]
cc

Subject
Re: [MSX] switching r800 - z80 in TP






Raymond wrote:
Isn't there somebody out there who can rewrite this so that it will work 
correctly?

sarcasm
What would you like rewritten? Your program, the MoonBlaster player, MSX 
BIOS, the compiler?
Please send an application form in threefold to the address shown on the 
screen when the error occurs.
/sarcasm

First thing you do is pinpointed the EXACT moment the hang occurs.
Then, find out whether or not the processor is executing an interrupt 
routine or whether interrupts are enabled or disabled.
Also check for variables that have values that seem impossible and other 
things that are just plain weird.

Only once you find out WHAT is wrong, you can find out how to FIX IT. This 

can be tedious, I know, I've been there... But you can't just say 'rewrite 

this and that' if you don't know for certain where the problem is, and the 

best person to find out is you, the programmer. (hence the sarcasm at the 
top)

Even though it may seem to be the moonblaster player, it could be YOUR 
program that causes an environment in which moonblaster can't function. 
For 
instance, you may be overwriting parts of the moonblaster code that causes 

the hang.

Good luck, and happy bughunting!

 Patriek

___
MSX mailing list ([EMAIL PROTECTED])
Info page: http://lists.stack.nl/mailman/listinfo/msx


___
MSX mailing list ([EMAIL PROTECTED])
Info page: http://lists.stack.nl/mailman/listinfo/msx


Re: [MSX] switching r800 - z80 in TP

2003-12-28 Thread Eric Boon
Patriek Lesparre wrote:

sarcasm
What would you like rewritten? Your program, the MoonBlaster player,
 MSX  BIOS, the compiler?

Yes. :-)

Even though it may seem to be the moonblaster player, it could be
 YOUR  program that causes an environment in which moonblaster can't
 function.
Indeed. If I may add an suggestion: write a *small* TP program, that
does nothing except for loading the MB routine and start a song. If
that works, then you most probably will find the root cause of the
problem in your own application, not in the MB routine...
	Eric

___
MSX mailing list ([EMAIL PROTECTED])
Info page: http://lists.stack.nl/mailman/listinfo/msx


Re: [MSX] switching r800 - z80 in TP

2003-12-28 Thread Patriek Lesparre
Hi Raymond,

That's indeed a pretty good indication the problem indeed lies with the player.

I suppose you're using Kari Lammassaari's Moonblaster player for Pascal?
I took a small look at it and here's how to disable the turboR detection:
Load a Hex-Editor (DiskView on MSX will do fine) and edit the mbplayer.mpc 
file. Byte 0327h should contain 38h, change this to 18h.

This will make the player think it's always running on Z80.

Greetz,
Patriek
___
MSX mailing list ([EMAIL PROTECTED])
Info page: http://lists.stack.nl/mailman/listinfo/msx


Re: [MSX] switching r800 - z80 in TP

2003-12-27 Thread raymond
We now switched of the R800 completely in the beginning. Then we chain to 
the menu where the moonblaster routine is loaded (in Z80 mode). And now 
our machine still hangs. So there is NO switching from the processor 
during loading. We switched immediately at the beginning of starting the 
game...

If I leave the music routine everything runs fine. Isn't there somebody 
out there who can rewrite this so that it will work correctly?

All help is very appreciated!!

Kind regards,

Raymond





Laurens Holst [EMAIL PROTECTED] 
Sent by: [EMAIL PROTECTED]
04-12-2003 00:14
Please respond to
[EMAIL PROTECTED]


To
[EMAIL PROTECTED]
cc

Subject
Re: [MSX] switching r800 - z80 in TP






Laurens Holst wrote:
 Well, as was explained before, the MB routines detect the CPU mode at
 a certain point, and all the I/O timing after that is based on that
 detection. Probably, it detects the CPU mode somewhere in the period
 before switching to Z80 (during initialization or loading), so it
 detects a R800. If you then switch to Z80, the replayer's timing is
 still done for the R800, which means that it puts in very long delay
 instructions to slow down the I/O access... Which the Z80 can't
 handle.

Or uh... maybe not -_-... (just read in Eric's mail that it detects the
speed when the music *starts* to play).

Anyways it may not hurt to test if it runs ok when the game starts (and
stays) in Z80 mode. If it does, the problem probably lays in some routines
not liking the switching between different CPU speeds. And the MB routines
are a good candidate for that. If it does not, it is not so much a 
switching
as a more general Z80 timing problem. Actually all I can really think of
that could give problems of that kind (on a 'low' Turbo Pascal level at
least) is the interrupt handler being too slow...

Hey, or maybe the game engine uses some R800-only instructions? MULUB,
anyone? Oh, wait, it's Turbo Pascal...


~Grauw

---
Ushiko-san! Kimi wa doushite, Ushiko-san nan da!!

___
MSX mailing list ([EMAIL PROTECTED])
Info page: http://lists.stack.nl/mailman/listinfo/msx


___
MSX mailing list ([EMAIL PROTECTED])
Info page: http://lists.stack.nl/mailman/listinfo/msx


Re: [MSX] switching r800 - z80 in TP

2003-12-27 Thread Patriek Lesparre
Raymond wrote:
Isn't there somebody out there who can rewrite this so that it will work 
correctly?
sarcasm
What would you like rewritten? Your program, the MoonBlaster player, MSX 
BIOS, the compiler?
Please send an application form in threefold to the address shown on the 
screen when the error occurs.
/sarcasm

First thing you do is pinpointed the EXACT moment the hang occurs.
Then, find out whether or not the processor is executing an interrupt 
routine or whether interrupts are enabled or disabled.
Also check for variables that have values that seem impossible and other 
things that are just plain weird.

Only once you find out WHAT is wrong, you can find out how to FIX IT. This 
can be tedious, I know, I've been there... But you can't just say 'rewrite 
this and that' if you don't know for certain where the problem is, and the 
best person to find out is you, the programmer. (hence the sarcasm at the top)

Even though it may seem to be the moonblaster player, it could be YOUR 
program that causes an environment in which moonblaster can't function. For 
instance, you may be overwriting parts of the moonblaster code that causes 
the hang.

Good luck, and happy bughunting!

Patriek

___
MSX mailing list ([EMAIL PROTECTED])
Info page: http://lists.stack.nl/mailman/listinfo/msx


Re: [MSX] switching r800 - z80 in TP

2003-12-04 Thread Laurens Holst
The MSX Files wrote:
 I have a better one: detect if the computer is a turbo-r, and if it
 is, set R800 mode, and set a flag so the program knows you are in
 7mhz, not in 3Mhz.

 So wherever your animation gets too fast (or any other routines you
 want to slow down), just check the speed flag and set a couple of
 delay(x) in the code if you are in 7mhz.

Gah, one should just time on the TIME value (in Basic) / JIFFY (in
assembly). CPU-dependant timing, well, it kinda sucks.


~Grauw

---
Ushiko-san! Kimi wa doushite, Ushiko-san nan da!!

___
MSX mailing list ([EMAIL PROTECTED])
Info page: http://lists.stack.nl/mailman/listinfo/msx


Re: [MSX] switching r800 - z80 in TP

2003-12-03 Thread Alex Wulms
Hi Raymond,

The solution to your problem seems to be very simple:
Don't switch back to the Z80. Why would you want to switch back to the Z80 
anyway? The R800 is more powerfull.


Kind regards,
Alex Wulms


Op zaterdag 29 november 2003 19:20, schreef [EMAIL PROTECTED]:
 What we do is the following.

 R800 is running when we start or program
 We load the music file
 Do some graphic moves etc in VRAM to prepare the game
 Switch to Z80 as we want to start the game
 Start music and then the MSX hangs...

 When I remove the switch to Z80 it runs fine. When I remove the Start Music
 routine it also works fine. Together in one game - MSX Hangs

 Kind regards,

 Raymond





  Eric Boon
  [EMAIL PROTECTED]
  l To
  Sent by:  [EMAIL PROTECTED]
  [EMAIL PROTECTED]  cc
  l
Subject
Re: [MSX] switching r800 - z80 in
  26-11-2003 21:09  TP


  Please respond to
[EMAIL PROTECTED]

 [EMAIL PROTECTED] wrote:
  I've added th enable interrupt at the end. But everything works fine
  without the music. Then when I add the music routines, it goes wrong.  So
  it looks like something in this music routine doesn't like the CPU to be
  switched at all.

 Hm, when exactly do you call these switching routines?
 While music is playing?  IIRC the music routines make pretty
 extensive use of the IX and IY registers, as do your switching
 routines...  Also, the MB replay routine does check whether you're
 running on R800 or Z80, but only when replaying a song is started,
 no tduring replay. It uses slightly different routines to OUT data
 to the Music Module and FM-PAC: the R800 routine has a few NOPs
 thrown in (or an other pausing mechanism), because the R800 would
 OUT the data too fast to the music chips. Now if this test happens
 to be run while you're in Z80 mode, but later on you try to replay
 a song in R800 mode, I can imagine things going kaboom.

 (Just 2 wild guesses)

   Does someone have a new routine for TP to play moonblaster
 
  1.4 music?

 Nope :-(

  Eric

 ___
 MSX mailing list ([EMAIL PROTECTED])
 Info page: http://lists.stack.nl/mailman/listinfo/msx


 ___
 MSX mailing list ([EMAIL PROTECTED])
 Info page: http://lists.stack.nl/mailman/listinfo/msx

___
MSX mailing list ([EMAIL PROTECTED])
Info page: http://lists.stack.nl/mailman/listinfo/msx


Re: [MSX] switching r800 - z80 in TP

2003-12-03 Thread Laurens Holst
[EMAIL PROTECTED] wrote:
 What we do is the following.

 R800 is running when we start or program
 We load the music file
 Do some graphic moves etc in VRAM to prepare the game
 Switch to Z80 as we want to start the game
 Start music and then the MSX hangs...

 When I remove the switch to Z80 it runs fine. When I remove the Start
 Music routine it also works fine. Together in one game - MSX Hangs

Well, as was explained before, the MB routines detect the CPU mode at a
certain point, and all the I/O timing after that is based on that detection.
Probably, it detects the CPU mode somewhere in the period before switching
to Z80 (during initialization or loading), so it detects a R800. If you then
switch to Z80, the replayer's timing is still done for the R800, which means
that it puts in very long delay instructions to slow down the I/O access...
Which the Z80 can't handle.

So... Basically Alex Wulms has the correct solution ^_^. Or you could keep
the R800 disabled all the time.


~Grauw

---
Ushiko-san! Kimi wa doushite, Ushiko-san nan da!!

___
MSX mailing list ([EMAIL PROTECTED])
Info page: http://lists.stack.nl/mailman/listinfo/msx


Re: [MSX] switching r800 - z80 in TP

2003-12-03 Thread Laurens Holst
Laurens Holst wrote:
 Well, as was explained before, the MB routines detect the CPU mode at
 a certain point, and all the I/O timing after that is based on that
 detection. Probably, it detects the CPU mode somewhere in the period
 before switching to Z80 (during initialization or loading), so it
 detects a R800. If you then switch to Z80, the replayer's timing is
 still done for the R800, which means that it puts in very long delay
 instructions to slow down the I/O access... Which the Z80 can't
 handle.

Or uh... maybe not -_-... (just read in Eric's mail that it detects the
speed when the music *starts* to play).

Anyways it may not hurt to test if it runs ok when the game starts (and
stays) in Z80 mode. If it does, the problem probably lays in some routines
not liking the switching between different CPU speeds. And the MB routines
are a good candidate for that. If it does not, it is not so much a switching
as a more general Z80 timing problem. Actually all I can really think of
that could give problems of that kind (on a 'low' Turbo Pascal level at
least) is the interrupt handler being too slow...

Hey, or maybe the game engine uses some R800-only instructions? MULUB,
anyone? Oh, wait, it's Turbo Pascal...


~Grauw

---
Ushiko-san! Kimi wa doushite, Ushiko-san nan da!!

___
MSX mailing list ([EMAIL PROTECTED])
Info page: http://lists.stack.nl/mailman/listinfo/msx


Re: [MSX] switching r800 - z80 in TP

2003-12-03 Thread The MSX Files
At 12:05 AM 04/12/2003 +0100, you wrote:

So... Basically Alex Wulms has the correct solution ^_^. Or you could keep
the R800 disabled all the time.


~Grauw

I have a better one: detect if the computer is a turbo-r, and if it is, set
R800 mode, and set a flag so the program knows you are in 7mhz, not in 3Mhz.

So wherever your animation gets too fast (or any other routines you want to
slow down), just check the speed flag and set a couple of delay(x) in the
code if you are in 7mhz.

Cheers,


SLotman
MSX Files  Megaram Project ( http://www.msxfiles.tk )

___
MSX mailing list ([EMAIL PROTECTED])
Info page: http://lists.stack.nl/mailman/listinfo/msx


Re: [MSX] switching r800 - z80 in TP

2003-11-29 Thread raymond





What we do is the following.

R800 is running when we start or program
We load the music file
Do some graphic moves etc in VRAM to prepare the game
Switch to Z80 as we want to start the game
Start music and then the MSX hangs...

When I remove the switch to Z80 it runs fine. When I remove the Start Music
routine it also works fine. Together in one game - MSX Hangs

Kind regards,

Raymond




   
 Eric Boon 
 [EMAIL PROTECTED] 
 l To 
 Sent by:  [EMAIL PROTECTED]
 [EMAIL PROTECTED]  cc 
 l 
   Subject 
   Re: [MSX] switching r800 - z80 in 
 26-11-2003 21:09  TP  
   
   
 Please respond to 
   [EMAIL PROTECTED]
   
   




[EMAIL PROTECTED] wrote:
 I've added th enable interrupt at the end. But everything works fine
 without the music. Then when I add the music routines, it goes wrong.  So
 it looks like something in this music routine doesn't like the CPU to be
 switched at all.

Hm, when exactly do you call these switching routines?
While music is playing?  IIRC the music routines make pretty
extensive use of the IX and IY registers, as do your switching
routines...  Also, the MB replay routine does check whether you're
running on R800 or Z80, but only when replaying a song is started,
no tduring replay. It uses slightly different routines to OUT data
to the Music Module and FM-PAC: the R800 routine has a few NOPs
thrown in (or an other pausing mechanism), because the R800 would
OUT the data too fast to the music chips. Now if this test happens
to be run while you're in Z80 mode, but later on you try to replay
a song in R800 mode, I can imagine things going kaboom.

(Just 2 wild guesses)

  Does someone have a new routine for TP to play moonblaster
 1.4 music?

Nope :-(

 Eric

___
MSX mailing list ([EMAIL PROTECTED])
Info page: http://lists.stack.nl/mailman/listinfo/msx


___
MSX mailing list ([EMAIL PROTECTED])
Info page: http://lists.stack.nl/mailman/listinfo/msx


Re: [MSX] switching r800 - z80 in TP

2003-11-26 Thread Alex Wulms
Op woensdag 26 november 2003 20:32, schreef [EMAIL PROTECTED]:
 I've added th enable interrupt at the end. But everything works fine
 without the music. Then when I add the music routines, it goes wrong.  So
 it looks like something in this music routine doesn't like the CPU to be
 switched at all. Does someone have a new routine for TP to play moonblaster
 1.4 music?
Raymond,

It might be that the R800 addresses the sound chip too fast.

You might want to do the following in your interrupt routine to work around 
it:

switchcpu(z80)
call moonblaster_interrupt_driver
switchcpu(r800)

In this way, you still have optimal performance for everything outside the 
music routine itself.


Kind regards,
Alex

___
MSX mailing list ([EMAIL PROTECTED])
Info page: http://lists.stack.nl/mailman/listinfo/msx


Re: [MSX] switching r800 - z80 in TP

2003-11-26 Thread Eric Boon
[EMAIL PROTECTED] wrote:
I've added th enable interrupt at the end. But everything works fine
without the music. Then when I add the music routines, it goes wrong.  So
it looks like something in this music routine doesn't like the CPU to be
switched at all.
Hm, when exactly do you call these switching routines?
While music is playing?  IIRC the music routines make pretty
extensive use of the IX and IY registers, as do your switching
routines...  Also, the MB replay routine does check whether you're
running on R800 or Z80, but only when replaying a song is started,
no tduring replay. It uses slightly different routines to OUT data
to the Music Module and FM-PAC: the R800 routine has a few NOPs
thrown in (or an other pausing mechanism), because the R800 would
OUT the data too fast to the music chips. Now if this test happens
to be run while you're in Z80 mode, but later on you try to replay
a song in R800 mode, I can imagine things going kaboom.
(Just 2 wild guesses)

 Does someone have a new routine for TP to play moonblaster
1.4 music?
Nope :-(

	Eric

___
MSX mailing list ([EMAIL PROTECTED])
Info page: http://lists.stack.nl/mailman/listinfo/msx


Re: [MSX] switching r800 - z80 in TP

2003-11-24 Thread Patriek Lesparre

We have loaded the moonblaster routines and when we switch the CPU to Z80,
it will completely hang the machine. We have found that if we do not use
this routine above, the problem doesn't occure, but we need to switch to
the Z80...
I assume you've also tested without the moonblaster routines? If it works 
without them, the problem could be there in stead of the cpu switch.

Otherwise I'd say.. Maybe an interrupt problem? ^^;

Greetz,
Patriek
___
MSX mailing list ([EMAIL PROTECTED])
Info page: http://lists.stack.nl/mailman/listinfo/msx


RE: [MSX] switching r800 - z80 in TP

2003-11-24 Thread Frits Hilderink

You should also add the:

  $fb);  { ei }

after the SetCPU to keep the interrupts enabled.

Frits

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of
 [EMAIL PROTECTED]
 Sent: Monday, November 24, 2003 7:41 PM
 To: [EMAIL PROTECTED]
 Subject: [MSX] switching r800 - z80 in TP
 
 
 We have a routine to switch the R800 to the Z80 and vice 
 versa in TP. The
 code is as follows:
 
 function RomBios : Byte;
 
 var
   Versie: Byte;
 
 begin
   inline ($3a/$c1/$fc/   { ld a,(#fcc1}
   $21/$2d/$00/  { ld hl,#2d  }
   $cd/$0c/$00/  { call #0c   ; rdslt }
   $32/Versie/{ ld (versie),a  }
   $fb);  { ei }
   RomBios := Versie;
 end;
 
 procedure SetCPU(mode:byte);
 
 begin
   if RomBios = 3 then
 inline ($3a/mode/ { ld a,(mode)   }
 $fd/$2a/$c0/$fc/{ ld iy,(#fcc0) }
 $dd/$21/$80/$01/ { ld ix,#180}
 $cd/$1c/$00); { call #1c  }
 end;
 
 We have loaded the moonblaster routines and when we switch 
 the CPU to Z80,
 it will completely hang the machine. We have found that if we 
 do not use
 this routine above, the problem doesn't occure, but we need 
 to switch to
 the Z80...
 
 Thanks for your help!
 
 Raymond
 
 
 
 ___
 MSX mailing list ([EMAIL PROTECTED])
 Info page: http://lists.stack.nl/mailman/listinfo/msx
 

___
MSX mailing list ([EMAIL PROTECTED])
Info page: http://lists.stack.nl/mailman/listinfo/msx