Re: [MSX] NestorBASIC 1.10 available

2004-06-22 Thread Eric Boon
Patriek Lesparre wrote:
The proper way to detect the MSX-MUSIC is this:
[SNIP /me File-Save as...]
Wouldn't a website coughmap.tni.nl or sumt'n/cough be
*the* perfect place to put all this kind of info+sources?
(If it's already there, then find that trout and slap me;
 I just had a quick glance and didn't detect it :-))
Eric
___
MSX mailing list ([EMAIL PROTECTED])
Info page: http://lists.stack.nl/mailman/listinfo/msx


Re: [MSX] NestorBASIC 1.10 available

2004-06-20 Thread Néstor Soriano
 I assume this was a bug in the MoonBlaster MSX-MUSIC detection routine.

Yes, it was.

It is a strange history. In NB 0.07 and earlier, the same routine was
used, but with the POKE to the address #7FF6 removed (I don't remember
why I did it that way). This caused the japanese FMs to not be detected
by NB. So, in version 1.0, I added the poke... causing the problem in
the Panasonic machines.

I'm using now a correct routine now, I hope that the problems are over.


*** XXVI MSX USERS MEETING IN BARCELONA: OCTOBER 31th 2004 ***
-
 Konami Man - AKA Nestor Soriano (^^)v
http://www.konamiman.com- [EMAIL PROTECTED]
ICQ#: 18281450

 Be conservative in what you send and liberal in what you receive
-


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


Re: [MSX] NestorBASIC 1.10 available

2004-06-18 Thread Patriek Lesparre
This message is FYI :)
- Corrected some bugs, especially the one that caused NestorBASIC 1.0 to
hang on Panasonic WSX machines.
I assume this was a bug in the MoonBlaster MSX-MUSIC detection routine.
The proper way to detect the MSX-MUSIC is this:
1. First check for internal MSX-MUSIC: Check for APRL on 4018h of the 
MSX-MUSIC ROM. If found, MSX-MUSIC was successfully found.

2. Now check for FM-PAC: Check for OPLL on 401Ch of the MSX-MUSIC ROM. If 
found: set bit 0 of address 7FF6h. If not found: no FM-PAC inserted.

The bug is caused by MoonBlaster only checking for 'OPLL' and setting bit 0 
of address 7FF6h regardless of the MSX-MUSIC was internal or external. On 
these Panasonic machines 7FF6h belongs to the internal mapper, causing a crash.

Setting of bit 0 address 7FF6h is required on FM-PAC to enable it to listen 
to I/O commands. Without bit 0 of 7FF6h set, FM-PAC only listens to memory 
I/O 7FF4h and 7FF5h.

This mechanism has two purposes:
1. to prevent the I/O conflict when an FM-PAC is inserted into machines 
with MSX-MUSIC on-board.
2. to enable multiple FM-PACs to be used by accessing their memory I/O 
addresses.

So in short: there's no design flaw in the Panasonic machines (which has 
been suggested), there's 'just' a bug in the MoonBlaster MSX-MUSIC 
detection routine.

Full sourcecode of correct MSX-MUSIC detection and initialisation follows.
Greetings,
Patriek
---
FMSlot: db 0 ; slotnumber of MSX-MUSIC if found.
SearchTemp: db 0 ; temporary variable
InitFM: xor a
ld  [FMSlot],a  ; reset slotnr
ld  b,4
.pri_l: pushbc
ld  a,4
sub b
ld  c,a
ld  hl,EXPTBL
add a,l
ld  l,a
ld  a,[hl]
add a,a
jr  nc,.notExp
ld  b,4 ; slot is expanded
.exp_l: pushbc
ld  a,24h
sub b
rlca
rlca
or  c
ld  [SearchTemp],a
call.SearchFM
ld  a,[FMSlot]
or  a
pop bc
jr  nz,.end
djnz.exp_l
.nextpri:
pop bc
djnz.pri_l
ret
.notExp:; slot is not expanded
ld  a,c
ld  [SearchTemp],a
call.SearchFM
ld  a,[FMSlot]
or  a
jp  z,.nextpri
.end:   pop bc
ret
.SearchFM:
ld  b,8
ld  hl,.TxtAPRL
ld  de,4018h
call.Compare
ret nc
ld  b,4
ld  hl,.TxtOPLL
ld  de,401Ch
call.Compare
ret c
ld  hl,7FF6h
pushaf
pushhl
callRDSLT
or  1
ld  e,a
pop hl
pop af
callWRSLT
or  a
ret
.Compare:
ld  a,[SearchTemp]
ld  c,a
.loop:  pushbc
pushhl
pushde
ld  a,c
ex  de,hl
callRDSLT
pop de
pop hl
pop bc
cp  [hl]
scf
ret nz
inc hl
inc de
djnz.loop
ld  a,c
ld  [FMSlot],a
or  a
ret
.TxtAPRL: db APRL
.TxtOPLL: db OPLL
___
MSX mailing list ([EMAIL PROTECTED])
Info page: http://lists.stack.nl/mailman/listinfo/msx


Re: [MSX] NestorBASIC 1.10 available

2004-06-18 Thread Patriek Lesparre

1. First check for internal MSX-MUSIC: Check for APRL on 4018h of the 
MSX-MUSIC ROM. If found, MSX-MUSIC was successfully found.
Oops, ofcourse this should be Check for APRLOPLL on 4018h. The posted 
sourcecode reflects this correctly :)

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


[MSX] NestorBASIC 1.10 available

2004-06-15 Thread Néstor Soriano
Hi all, for the happiness of everyone I have uploaded NestorBASIC 1.10
to mi web. New in this version:

- Added support for InterNestor Lite.
- Now the available soundchips can be checked for without having to
first load a music replayer.
- Corrected some bugs, especially the one that caused NestorBASIC 1.0 to
hang on Panasonic WSX machines.

Enjoy!


*** XXVI MSX USERS MEETING IN BARCELONA: OCTOBER 31th 2004 ***
-
 Konami Man - AKA Nestor Soriano (^^)v
http://www.konamiman.com- [EMAIL PROTECTED]
ICQ#: 18281450

 Be conservative in what you send and liberal in what you receive
-


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