RE: Sprite pointers - mixed and scrambled
The actual bit settings of these registers are depending upon the current screen mode. This is the calculation in NLMSX: Screen 1, Screen 2, Screen 3 (Sprite Mode 1) Tables-SpriteAttribute = MSXVDPVRAM + ((MSXVDPRegisters[5] 0xff) 7) + ((MSXVDPRegisters[11] 3) 15); Screen 4, 5, 6, 7, 8, 10, 11, 12 (Sprite Mode 2) Tables-SpriteAttribute = MSXVDPVRAM + (((MSXVDPRegisters[5] 0xf8) | 4) 7) + ((MSXVDPRegisters[11] 3) 15); Tables-SpriteColor = MSXVDPVRAM + (((MSXVDPRegisters[5] 0xf8) | 0) 7) + ((MSXVDPRegisters[11] 3) 15); The last three bits of register 5 have to be '111'. And you really must write them into the register. Try it otherwise and you will see that it does not work in the way that you want it to. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Jorge Sent: Tuesday, October 12, 1999 6:14 AM To: [EMAIL PROTECTED] Subject: RE: Sprite pointers - mixed and scrambled R5: A14 A13 A12 A11 A10 1 1 1 Graphic 3 Mode (Screen 4): R5:A14 A13 A12 A11 A10 A9 A8 A7 Weird! Where you've got this info? I think that might be from the Portar docs. Well, as you can see it's not very clear what the actual bit configuration is, particularly that of R5. Any of the docs I've checked so far brought any light on the subject (the 1 1 1 thingie as Laurens pointed being my main concern now). I'll carry out some investigations on the BASIC side of things. On a side note, being a complete newbie to the MSX scene as I am I find rather surprising there's still disagreement on what could surely be referred to as 'the basics' of vdp programming. Back to my badly typed docs then. Hey I whish there was a 'COMPLETE AND ABSOLUTE GUIDE TO HARDWARE BANGING THE MSX' in the old style of, dare I say, the Amiga days. Oh well. I'll shut up now. MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED] and put in the body (not subject) "unsubscribe msx [EMAIL PROTECTED]" (without the quotes :-) Problems? contact [EMAIL PROTECTED] (www.stack.nl/~wiebe/mailinglist/) MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED] and put in the body (not subject) "unsubscribe msx [EMAIL PROTECTED]" (without the quotes :-) Problems? contact [EMAIL PROTECTED] (www.stack.nl/~wiebe/mailinglist/)
RE: Two questions!
I did dig in the large pile'o'disks _and_ found the sources. But, as I was browsing through the .GENs, I remembered vaguely doing the exact same thing before. So if anyone could check funet (I don't have FTP access @ the moment :-( ) ... Damn! I hate follow-ups to my owm msgs, but I found the sources I mentioned on funet: /pub/msx/programming/asm/sources/mbaurora.pma +-- Eric Boon ---+ | this signature was | | intentionally left blank | ++ MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED] and put in the body (not subject) "unsubscribe msx [EMAIL PROTECTED]" (without the quotes :-) Problems? contact [EMAIL PROTECTED] (www.stack.nl/~wiebe/mailinglist/)
Re: Two questions!
I did dig in the large pile'o'disks _and_ found the sources. But, as I was browsing through the .GENs, I remembered vaguely doing the exact same thing before. So if anyone could check funet (I don't have FTP access @ the moment :-( ) ... Damn! I hate follow-ups to my owm msgs, but I found the sources I mentioned on funet: /pub/msx/programming/asm/sources/mbaurora.pma Found out that you can also access FUnet via WWW? :-) Anyway, now someone has to program the DOS MBM player... Any volunteers? And about that screen 0-shift routine: thanks Daniel! I'll try it when I can. I had another idea for a solution: do something like LOCATE 60:FILES"*", so that the . and .. will be on a seperate line. This line can then be skipped or erased... This is fairly simple, but unfortunately it doesn't work: FILES always does a locate 0 (or CR/LF) before outputting... Shit. So, they only usable thing is Daniels ML proggie... But Daniel: I don't have CL80 nor a MSDOS computer. But I guess I can compile it on a MSX too? And then some remarks: 1) Wouldn't it be better to read out the screen width from the work-area, instead of assuming a certain width? 2) Why did you let it respond to Ok at all? As you said, in a program there is no Ok response, AND the prompt is probably changed anyway (mine is "Files"!). I don't think it's useful to run this program NOT in a BASIC program. But anyway: thanks a lot for helping me out in such a fast time, Daniel!! Grtjs, Manuel ((m)ICQ UIN 41947405) PS: MSX 4 EVER! (Questions? See: http://www.faq.msxnet.org/) PPS: Visit my homepage at http://www.sci.kun.nl/marie/home/manuelbi/ MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED] and put in the body (not subject) "unsubscribe msx [EMAIL PROTECTED]" (without the quotes :-) Problems? contact [EMAIL PROTECTED] (www.stack.nl/~wiebe/mailinglist/)
RE: Sprite pointers - mixed and scrambled
The actual bit settings of these registers are depending upon the current screen mode. This is the calculation in NLMSX: Thank you Frits. And all the others too. MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED] and put in the body (not subject) "unsubscribe msx [EMAIL PROTECTED]" (without the quotes :-) Problems? contact [EMAIL PROTECTED] (www.stack.nl/~wiebe/mailinglist/)
RE: Two questions!
Found out that you can also access FUnet via WWW? :-) Nope, has to do with limited internet access resources here. Anyway, now someone has to program the DOS MBM player... Any volunteers? /me sticks up his finger :-) But I really NEED the info on MBM file structure, then!! +-- Eric Boon ---+ | this signature was | | intentionally left blank | ++ MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED] and put in the body (not subject) "unsubscribe msx [EMAIL PROTECTED]" (without the quotes :-) Problems? contact [EMAIL PROTECTED] (www.stack.nl/~wiebe/mailinglist/)
RE: Two questions!
BTW: Does anyone have info on the filestructure of an MBM file? (Especially the 'header' part, where the songname, drumkit name etc is) If you look at the replayer source, you can find out the header structure without much trouble. Look at the "start playing" routine, it LDIRs most of the headers to the settings variables. Look which bytes are copied where, and then look at the settings variables (their labels start with "X"). Anyway, the songname and drumkit are real easy. They are fixed-length strings that always occur at the same offset in the file. Take a hex editor and you can't miss them. About drumkit: - sometimes the value listed is "NONE" (none + 4 spaces), this can either mean there is no drumkit or that it was not properly selected by the composer - sometimes the value in the drumkit field is not correct (the file doesn't exist) So you should make your player handle "file not found" on drumkit loads. A trick I used to get the drumkit right more often, is to look for a drumkit with the same name as the song (LALA.MBK if the song is LALA.MBM) in case no drumkit is specified or the specified drumkit doesn't exist. Bye, Maarten MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED] and put in the body (not subject) "unsubscribe msx [EMAIL PROTECTED]" (without the quotes :-) Problems? contact [EMAIL PROTECTED] (www.stack.nl/~wiebe/mailinglist/)
RE: Sprite pointers - mixed and scrambled
On Tue, 12 Oct 1999 06:13:47 +0200, Jorge wrote: R5:A14 A13 A12 A11 A10 A9 A8 A7 Weird! Where you've got this info? I think that might be from the Portar docs. Well, as you can see it's not very clear what the actual bit configuration is, particularly that of R5. Any of the docs I've checked so far brought any light on the subject (the 1 1 1 thingie as Laurens pointed being my main concern now). I'll carry out some investigations on the BASIC side of things. See, this info is wrong by both VDP datasheet and MSX2 TH (which is based on it). I've seen strange things on MSX2TH (and this could be one of them), but Portar have lots more errors than the MSX2TH. (-: By the way, what is your concern about Screen 4? Will you use it? []'s Daniel Caetano ([EMAIL PROTECTED]) ..."If you cannot make it works, make it beautiful!", Bill Gates OS/2 Sites: http://www.os2brasil.com.br/novidades/ http://www.os2brasil.com.br/novidades/drivers.shtml http://www.geocities.com/SiliconValley/8752/os2hp/os2index.html MSX Sites: http://www.fudeba.cjb.net/ e http://www.msxnews.cjb.net/ MSX Phoenix:http://www.msxphoenix.cjb.net/ MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED] and put in the body (not subject) "unsubscribe msx [EMAIL PROTECTED]" (without the quotes :-) Problems? contact [EMAIL PROTECTED] (www.stack.nl/~wiebe/mailinglist/)
Re: Two questions!
On Tue, 12 Oct 1999 10:06:43 +0200, Manuel Bilderbeek wrote: But Daniel: I don't have CL80 nor a MSDOS computer. But I guess I can compile it on a MSX too? Yes, you can. If you have any problems, contact me and I'll send you the .BAT file. And then some remarks: 1) Wouldn't it be better to read out the screen width from the work-area, instead of assuming a certain width? There is no way. The number of spaces will change due to width value. I certainly can so a routine that changes this on the width, but it will certainly slower. Once you need something fast... 2) Why did you let it respond to Ok at all? As you said, in a program there is no Ok response, AND the prompt is probably changed anyway (mine is "Files"!). I don't think it's useful to run this program NOT in a BASIC program. If you read allright, you can change it for your own program. I give you the source. Anyway, I have to give it a way to decide when to stop. If you have not a standard response, there is no way do determine. I used the second letter of "Ok" (the k is a lowercase, which never appear on a name on the dir) to stop it, OR a space (that also never appear on a filename). So you can PRINT " " after files BEFORE run the program, and everything will go Ok. I added the space feature because I know that in a program the "Ok" prompt will not appear in any case. But anyway: thanks a lot for helping me out in such a fast time, Daniel!! I have done a program for test it, and it works well. The only change I could made to it is verify in the start if the first entry is or not "." or ".." and if not, do nothing. But I think you can do this in basic too. My try was to make something as short as possible to do the task. I thought other ways, as get the PUTCHAR hook, and some things like that, but I think it would be a lot more complex than you would like... (-: Anything, just ask. I give you the source so you can change it. You can use M80/L80 for MSXDOS, but to do that you must be able to use them... (-: The MS DOS version do everything alone. I know use M80/l80 for MSX, and I know it requires some switches. If you have any problems with them, please, call back. Have in mind, of course, that if I had done this program in total ASM, I would have done it totally different (I would remake the FILES routine). []'s Daniel Caetano ([EMAIL PROTECTED]) ...Windows: an Unrecoverable Acquisition Error! OS/2 Sites: http://www.os2brasil.com.br/novidades/ http://www.os2brasil.com.br/novidades/drivers.shtml http://www.geocities.com/SiliconValley/8752/os2hp/os2index.html MSX Sites: http://www.fudeba.cjb.net/ e http://www.msxnews.cjb.net/ MSX Phoenix:http://www.msxphoenix.cjb.net/ MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED] and put in the body (not subject) "unsubscribe msx [EMAIL PROTECTED]" (without the quotes :-) Problems? contact [EMAIL PROTECTED] (www.stack.nl/~wiebe/mailinglist/)
Re: Two questions!
Yes, you can. If you have any problems, contact me and I'll send you the .BAT file. Do that anyway please. And then some remarks: 1) Wouldn't it be better to read out the screen width from the work-area, instead of assuming a certain width? There is no way. The number of spaces will change due to width value. I certainly can so a routine that changes this on the width, but it will certainly slower. Once you need something fast... Well, will reading a value from memory be that much slower? It might be a few tenths of seconds slower... It would be far more general if you/we do. It's that address called LINLEN: F3B0H LINLEN: DEFB 37 This variable contains the current text mode screen width. Its value is set from LINL40 or LINL32 whenever the VDP is initialized to a text mode via the INITXT or INIT32 standard routines. (from MSX Red Book) This definately works, since the width during the FILES command is also POKEd here. (At least, it should be, not?) 2) Why did you let it respond to Ok at all? As you said, in a program there is no Ok response, AND the prompt is probably changed anyway (mine is "Files"!). I don't think it's useful to run this program NOT in a BASIC program. If you read allright, you can change it for your own program. I give you the source. Anyway, I have to give it a way to decide when to stop. If you have not a standard response, there is no way do determine. I used the second letter of "Ok" (the k is a lowercase, which never appear on a name on the dir) to stop it, OR a space (that also never appear on a filename). So you can PRINT " " after files BEFORE run the program, and everything will go Ok. I added the space feature because I know that in a program the "Ok" prompt will not appear in any case. That's why I said: skip the "Ok" checking, and only check on a space. But anyway: thanks a lot for helping me out in such a fast time, Daniel!! I thought other ways, as get the PUTCHAR hook, and some things like that, but I think it would be a lot more complex than you would like... (-: Indeed. have done it totally different (I would remake the FILES routine). Ofcourse... :-) But it is for a Basic menu. Grtjs, Manuel ((m)ICQ UIN 41947405) PS: MSX 4 EVER! (Questions? See: http://www.faq.msxnet.org/) PPS: Visit my homepage at http://www.sci.kun.nl/marie/home/manuelbi/ MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED] and put in the body (not subject) "unsubscribe msx [EMAIL PROTECTED]" (without the quotes :-) Problems? contact [EMAIL PROTECTED] (www.stack.nl/~wiebe/mailinglist/)
RE: Two questions!
Maarten ter Huurne wrote: Anyway, the songname and drumkit are real easy. They are fixed-length strings that always occur at the same offset in the file. Take a hex editor and you can't miss them. I _did_ take an hex editor and these names do NOT appear at the same offset :-( Maybe they do in the EDIT mode files, but definitely not in the replayable USER files... About drumkit: [tricks tips] I was aware of that, but thanx for the info :-) +-- Eric Boon ---+ | this signature was | | intentionally left blank | ++ MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED] and put in the body (not subject) "unsubscribe msx [EMAIL PROTECTED]" (without the quotes :-) Problems? contact [EMAIL PROTECTED] (www.stack.nl/~wiebe/mailinglist/)
Re: Two questions!
On Tue, 12 Oct 1999 17:53:47 +0200, Manuel Bilderbeek wrote: Yes, you can. If you have any problems, contact me and I'll send you the .BAT file. Do that anyway please. I'm sending it. There is no way. The number of spaces will change due to width value. I certainly can so a routine that changes this on the width, but it will certainly slower. Once you need something fast... Well, will reading a value from memory be that much slower? It might be a few tenths of seconds slower... It would be far more general if you/we do. It's that address called LINLEN: F3B0H LINLEN: DEFB 37 This variable contains the current text mode screen width. Its value is set from LINL40 or LINL32 whenever the VDP is initialized to a text mode via the INITXT or INIT32 standard routines. (from MSX Red Book) This definately works, since the width during the FILES command is also POKEd here. (At least, it should be, not?) Nah, did you not understand the problem. The computer understand the memory always as 80 columns! If you write a word in the 0,0 position, in 80 columns, it will be, in the memory, this way: word (actualy, the "0" are 32 - or spaces, if you preffer. I used 0 to save space). if you write this word in 79 columns, it will be the same on the VRAM (but the last position will not be available from BASIC/System PUTCHAR isntructions): word But, if you use 78, it will not be the same. It will be (again, the last position will not be available from BASIC/System PUTCHAR instructions): 0word000 and the same for 77. For 76, it will be (now, the last (for 77) and the two last (for 76) positions will not be available from BASIC/System PUTCHAR instructions): 00word00 and so on. The computer automaticaly adjusts the spaces before and after the words. This cause the number of spaces before and after the line to be different for each screen width. So, I'll have to do some calculus, which will decrease speed (not much, but in really will increase a lot the complexity of the program) or I can use a table, which will make the program be greater, and this is not the target. Have in mind that this program was made for your needs only, and in ASM we always do what is needed, for speed and space concerns. That's why I said: skip the "Ok" checking, and only check on a space. Just delete the verify! (-: I'm sending the MS-DOS BATCH, but it should work on MSXDOS also. @echo off echo M80/L80 Z80 Compiler - IBM PC echo Ported by AL Software echo ÿ if "%1"=="" goto error if not exist %1.mac goto error echo MSX.M-80 1.00 01-Apr-85 (c) 1981,1985 Microsoft m80 =%1.mac/r/z%2%3%4%5%6%7%8 rem _clerror rem this line was cutted of because this program is not rem available under MSXDOS. if not errorlevel 1 goto end l80 %1,%1/e/n if exist %1.com del %1.com nul ren %1.cpm *.com nul del %1.rel nul goto end :error echo Usage: echo CL80 program [options] echo ÿ echo [options] are any of M80 options, except /L and /Z echo program is the source code (.MAC) to compiled, without extension :end []'s Daniel Caetano ([EMAIL PROTECTED]) ...No need for WindowsVideoAccelerator, get OS/2. OS/2 Sites: http://www.os2brasil.com.br/novidades/ http://www.os2brasil.com.br/novidades/drivers.shtml http://www.geocities.com/SiliconValley/8752/os2hp/os2index.html MSX Sites: http://www.fudeba.cjb.net/ e http://www.msxnews.cjb.net/ MSX Phoenix:http://www.msxphoenix.cjb.net/ MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED] and put in the body (not subject) "unsubscribe msx [EMAIL PROTECTED]" (without the quotes :-) Problems? contact [EMAIL PROTECTED] (www.stack.nl/~wiebe/mailinglist/)
Re: Two questions!
and so on. The computer automaticaly adjusts the spaces before and after= the words. This cause the number of spaces before and after the line to be d= ifferent for each screen width. So, I'll have to do some calculus, which will dec= rease speed (not much, but in really will increase a lot the complexity of the= program) or I can use a table, which will make the program be greater, and this i= s not the target. Have in mind that this program was made for your needs only,= and in ASM we always do what is needed, for speed and space concerns. Ah, now I see what you mean. But I thought the 'pre'-spaces could be calculated really easily, like: NUMBER_OF_PRESPACES:=(80-LINLEN) DIV 2 or so. I'm sending the MS-DOS BATCH, but it should work on MSXDOS also. It will not. MSXDOS does not know things like 'if', 'goto', labels. But I can find out now myself. Thanks anyway. (Now we'll stop this thread-part ok! :-) Grtjs, Manuel ((m)ICQ UIN 41947405) PS: MSX 4 EVER! (Questions? See: http://www.faq.msxnet.org/) PPS: Visit my homepage at http://www.sci.kun.nl/marie/home/manuelbi/ MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED] and put in the body (not subject) "unsubscribe msx [EMAIL PROTECTED]" (without the quotes :-) Problems? contact [EMAIL PROTECTED] (www.stack.nl/~wiebe/mailinglist/)
Re: Two questions!
Found out that you can also access FUnet via WWW? :-) Nope, has to do with limited internet access resources here. Anyway, now someone has to program the DOS MBM player... Any volunteers? /me sticks up his finger :-) But I really NEED the info on MBM file structure, then!! Simple. The docs are in the MiLC database. You've got MiLC, right??? Well, if not, it's also online on internet at www.database.nl/mccm/milc I think. If not, just try www.database.nl/mccm and browse to MiLC. ~Grauw -- email me: [EMAIL PROTECTED] or ICQ: 10196372 visit the Datax homepage at http://datax.cjb.net/ MSX fair Bussum / MSX Marathon homepage: http://msxfair.cjb.net/ MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED] and put in the body (not subject) "unsubscribe msx [EMAIL PROTECTED]" (without the quotes :-) Problems? contact [EMAIL PROTECTED] (www.stack.nl/~wiebe/mailinglist/)
Re: Two questions!
I'm sending the MS-DOS BATCH, but it should work on MSXDOS also. It will not. MSXDOS does not know things like 'if', 'goto', labels. MSX-DOS 2.3 does accept IF (EXIST). But indeed no GOTO nor labels. Maybe Dos 2.41??? Anyways the GOTO and labels thingie can easily be solved. Simply make multiple batchfiles (those batchfiles are the routines then). ~Grauw -- email me: [EMAIL PROTECTED] or ICQ: 10196372 visit the Datax homepage at http://datax.cjb.net/ MSX fair Bussum / MSX Marathon homepage: http://msxfair.cjb.net/ MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED] and put in the body (not subject) "unsubscribe msx [EMAIL PROTECTED]" (without the quotes :-) Problems? contact [EMAIL PROTECTED] (www.stack.nl/~wiebe/mailinglist/)
Re: Sprite pointers - mixed and scrambled
Well, as you can see it's not very clear what the actual bit configuration is, particularly that of R5. Any of the docs I've checked so far brought any light on the subject (the 1 1 1 thingie as Laurens pointed being my main concern now). I'll carry out some investigations on the BASIC side of things. Well in fact my docs (and I think the official ones too) state those three 111s to be A9, A8 and A7. However, experiments showed that it doesn't work on the most-used screenmodes when those bits are not set. As well as a lot of other registers, setting those bit to another value than 1s will cause some kind of 'repeat'-effect. With the 'set screen' register, you can make very nice use of this effect because using that you can copy the 1st 8 lines up to the first 128 lines to several other places in some kind of repeat over the screen. This way you can create 26 (.5) equal scrolls below eachother without any hard tricks like lots of screensplits etc. On a side note, being a complete newbie to the MSX scene as I am I find rather surprising there's still disagreement on what could surely be referred to as 'the basics' of vdp programming. Well if something doesn't exactly work the way I want it to be I always keep in mind it could be another form of the effect stated above. And I try out how it works, and how Basic does the trick. I don't think there is disagreement. Some people just haven't tried it before but are simply stating right from the manual. It's just that the official manuals aren't right everywhere. Now it seemed that the manual WAS right, but seemingly only in mode 3 (that would be old MSX1 multicolor mode?). Back to my badly typed docs then. Hey I whish there was a 'COMPLETE AND ABSOLUTE GUIDE TO HARDWARE BANGING THE MSX' in the old style of, dare I say, the Amiga days. Yep, it ain't really there. Too bad. But I think I have most tricks - or in my head, - or somewhere in a documentation. And that goes for most MSX programmers I think. It's just that no-one has taken the effort to make such a guide yet (I made a start once but I never finished it... it was just so much work, and I had other things to do too). ~Grauw -- email me: [EMAIL PROTECTED] or ICQ: 10196372 visit the Datax homepage at http://datax.cjb.net/ MSX fair Bussum / MSX Marathon homepage: http://msxfair.cjb.net/ MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED] and put in the body (not subject) "unsubscribe msx [EMAIL PROTECTED]" (without the quotes :-) Problems? contact [EMAIL PROTECTED] (www.stack.nl/~wiebe/mailinglist/)
RE: Sprite pointers - mixed and scrambled
By the way, what is your concern about Screen 4? Will you use it? My concern was not about screen mode 4 itself but the mysterious bits on R5. I've worked out their meaning already, thank you lot. And as a matter of fact, yes, I will. Greets, Jorge MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED] and put in the body (not subject) "unsubscribe msx [EMAIL PROTECTED]" (without the quotes :-) Problems? contact [EMAIL PROTECTED] (www.stack.nl/~wiebe/mailinglist/)
Re: Two questions!
On Tue, 12 Oct 1999, Laurens Holst wrote: Well, if not, it's also online on internet at www.database.nl/mccm/milc I think. If not, just try www.database.nl/mccm and browse to MiLC. I can't find it... The URL you mentioned doesn't work, and when browsing the site I couldn't find any mention of MiLC either. Bye, Maarten MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED] and put in the body (not subject) "unsubscribe msx [EMAIL PROTECTED]" (without the quotes :-) Problems? contact [EMAIL PROTECTED] (www.stack.nl/~wiebe/mailinglist/)