sometimes99er Posted December 3, 2010 Share Posted December 3, 2010 (edited) Well if I can simply use the assembly data from the Magellan output without offsetting anything, that would be great! I thought both the assembler output and the XB would have to be shifted. >20 and 32 are the same, so why would >20 work and not "32"? We will have to offset once only. Either outside your assembler program or within. >20 is the same as 32. If that is the case--- that I don't need to shift the assembler output, then that's what I will do. I only wrote the converter program because I was under the impression that when linking assembly and XB that the data had to be shifted regardless.... Converting outside is an extra manual step. Manual steps add to the chance of a mistake happening. Every time you update the map, you'll have to convert. Converting inside adds a tiny fraction of time to the drawing of the viewport, but you won't notice. And we'll write our own fast version of VMBW. If and when we move away from XB, we can drop the offset, use the data as is, won't need or wait for utilities to load (CALL INIT) and will have more room in RAM (much more actually). Edited December 3, 2010 by sometimes99er Quote Link to comment Share on other sites More sharing options...
Opry99er Posted December 3, 2010 Author Share Posted December 3, 2010 That's great! Thanks alot. I wasn't aware that the time it takes to convert would be so minimal. Quote Link to comment Share on other sites More sharing options...
sometimes99er Posted December 3, 2010 Share Posted December 3, 2010 (edited) I wasn't aware that the time it takes to convert would be so minimal. Compared to the execution of XB itself, it's nothing. But the main super loop moving bytes from RAM to VDP may be 30% slower (rough estimate). Overall much less. You'll go from instant coffee to instant coffee. As I said, you won't notice. Edited December 3, 2010 by sometimes99er Quote Link to comment Share on other sites More sharing options...
Opry99er Posted December 3, 2010 Author Share Posted December 3, 2010 That's great! Thanks alot. I wasn't aware that the time it takes to convert would be so minimal. Quote Link to comment Share on other sites More sharing options...
sometimes99er Posted December 3, 2010 Share Posted December 3, 2010 (edited) That's great! Thanks alot. I wasn't aware that the time it takes to convert would be so minimal. I hate to repeat what I just said. (looks like post #102 and #104 are exactly the same) I need you to add your own VMBV to your code. Only that. It should add about 11 instructions. You don't have to compile, run etc. Take a look at how it's done elsewhere like with Melt by Marc, Yin Yang by Matthew, Game Of Life by Mark or Spectra by Filip. Edited December 3, 2010 by sometimes99er Quote Link to comment Share on other sites More sharing options...
Opry99er Posted December 3, 2010 Author Share Posted December 3, 2010 Okay--- I'll be out of town all day today--- playing a show tonight, so I don't imagine I'll have much time until late tonight to work on this.... I'll be doing just what you asked tonight Quote Link to comment Share on other sites More sharing options...
Opry99er Posted December 4, 2010 Author Share Posted December 4, 2010 (edited) Here's Marc's Melter program DEF MELT VDPWA EQU >8C02 VDPWD EQU >8C00 VDPRD EQU >8800 BUF BSS 768 MELT LI R6,->0100 LI R0,0 LI R1,BUF LI R2,768 SWPB R0 MOVB R0,@VDPWA SWPB R0 MOVB R0,@VDPWA VMBW MOVB @VDPRD,*R1+ DEC R2 JNE VMBW START LI R1,BUF CLR R5 LOOP1 CLR R2 MOVB *R1,R2 CI R2,>8000 JEQ NEXT JL ADJUST A R6,R2 AI R6,->0100 CI R6,->1F00 JNE NOREST LI R6,->0100 NOREST LI R5,1 MOVB R2,*R1 JMP NEXT ADJUST LI R2,>8000 LI R5,1 MOVB R2,*R1 NEXT INC R1 CI R1,BUF+768 JNE LOOP1 CI R5,0 JEQ DONE CLR R0 LI R1,BUF LI R2,768 ORI R0,>4000 (THIS ROUTINE CHANGES THE SWPB R0 MEMORY CONTENTS) MOVB R0,@VDPWA SWPB R0 MOVB R0,@VDPWA NOP VMBW1 MOVB *R1+,@VDPWD DEC R2 JNE VMBW1 LI R0,>9F00 MOVB R0,@>8400 TURN SOUND OFF FOR OWENS PROG JMP START DONE RT END MELT I guess I'm having difficulty finding the ACTUAL VMBW routine in here... this looks like the spot (but I'm only basing that on the label VMBW1) CLR R0 LI R1,BUF LI R2,768 ORI R0,>4000 (THIS ROUTINE CHANGES THE SWPB R0 MEMORY CONTENTS) MOVB R0,@VDPWA SWPB R0 MOVB R0,@VDPWA NOP VMBW1 MOVB *R1+,@VDPWD DEC R2 JNE VMBW1 LI R0,>9F00 MOVB R0,@>8400 TURN SOUND OFF I'll keep studying.... perhaps I just haven't spent enough time with it yet. Right now I'm looking into Matthew's routines... They are very thoroughlly commented. =) Edited December 4, 2010 by Opry99er Quote Link to comment Share on other sites More sharing options...
Opry99er Posted December 4, 2010 Author Share Posted December 4, 2010 ***WARNING*** *This post contains information that in NO WAY relates to the VMBW routines I'm currently working on. I know this is outside the assembly talk, but maybe it's not... If I'm re-drawing the viewport each time the PC exits the screen, I could have a different character set (or partially different character set) each time the screen re-draws. That means I could go from the "typical forest" area look to a "dark forest" look, and maybe even a tileset-expensive castle graphic or something. I'm just thinking out loud here, but it's possible to trick the player into thinking, like, maybe I have alot more tiles to play with. =) I feel like Donald Sutherland in the movie "Kelly's Heroes" right now. ***BACK TO REAL ASSEMBLY TALK NOW*** Quote Link to comment Share on other sites More sharing options...
sometimes99er Posted December 4, 2010 Share Posted December 4, 2010 Here's Marc's Melter program I'll keep studying.... perhaps I just haven't spent enough time with it yet. Right now I'm looking into Matthew's routines... They are very thoroughlly commented. =) Not bad for one who hasn't been drinking - for years. Quote Link to comment Share on other sites More sharing options...
Opry99er Posted December 4, 2010 Author Share Posted December 4, 2010 (edited) Not bad for one who hasn't been drinking - for years. =) I'm afraid I don't understand what you mean. Am I close on where the VMBW is? Edited December 4, 2010 by Opry99er Quote Link to comment Share on other sites More sharing options...
sometimes99er Posted December 4, 2010 Share Posted December 4, 2010 (edited) ***WARNING*** *This post contains information that in NO WAY relates to the VMBW routines I'm currently working on. I know this is outside the assembly talk, but maybe it's not... If I'm re-drawing the viewport each time the PC exits the screen, I could have a different character set (or partially different character set) each time the screen re-draws. That means I could go from the "typical forest" area look to a "dark forest" look, and maybe even a tileset-expensive castle graphic or something. I'm just thinking out loud here, but it's possible to trick the player into thinking, like, maybe I have alot more tiles to play with. =) I feel like Donald Sutherland in the movie "Kelly's Heroes" right now. ***BACK TO REAL ASSEMBLY TALK NOW*** I think I understand maybe half of it. Whatever it is, it is of course possible. But I think it would be easier to add USB 3.0. Edited December 4, 2010 by sometimes99er Quote Link to comment Share on other sites More sharing options...
sometimes99er Posted December 4, 2010 Share Posted December 4, 2010 Not bad for one who hasn't been drinking - for years. =) I'm afraid I don't understand what you mean. Am I close on where the VMBW is? Thought you said somewhere that you hadn't been drinking for years. Was only tryin' to be funny. Sorry. Please forget. Yep, you're close ! Quote Link to comment Share on other sites More sharing options...
sometimes99er Posted December 4, 2010 Share Posted December 4, 2010 (edited) Okay--- I'll be out of town all day today--- playing a show tonight, so I don't imagine I'll have much time until late tonight to work on this.... I'll be doing just what you asked tonight So was it a good show ? Weren't you in the studio previously also ? We've been invited to eat at one of the neighbors, so I'll be back in about 4 hours. Edited December 4, 2010 by sometimes99er Quote Link to comment Share on other sites More sharing options...
Opry99er Posted December 4, 2010 Author Share Posted December 4, 2010 Ahhh. =) Yea, it's been 6 years. =) The money I've saved not drinking.... wow.... If you wanna see some pictures and listen to a couple songs we've been working on in the studio, check out http://www.facebook.com/firebrandky =) Here's the most recent band pic we're using as our media pic: Quote Link to comment Share on other sites More sharing options...
sometimes99er Posted December 4, 2010 Share Posted December 4, 2010 (edited) Very cool pictures. Was it a professional photographer ? I'll listen to the tracks later. Edited December 4, 2010 by sometimes99er Quote Link to comment Share on other sites More sharing options...
Opry99er Posted December 4, 2010 Author Share Posted December 4, 2010 Yea, our most recent shoot was with a pro. The older shoot when we had the skinny white bassist was not pro. =) Marcelo Bakos (our new bassist) is from Brazil, and he is freaking amazing. That last 12 pix in the pics folder are with Marcelo and we had a pro photographer. BTW I just listened to a couple of the tracks and they aren't the most recent ones. I need to update the music.... We were posting songs as we got new mixes from the studio and the tracks on the facebook site are all old mixes... they don't even have all the instrumentation in them. =) I'll get it updated today if I can find time around coding this RPG Lite, playing Chrono Trigger, and watching my kid. =) Quote Link to comment Share on other sites More sharing options...
Opry99er Posted December 4, 2010 Author Share Posted December 4, 2010 Hey sometimes... could we use a series of VSBWs and offset each one before we write it? Instead of using a MBW, I mean... It seems like a simple thing to accomplish, doesn't it? Quote Link to comment Share on other sites More sharing options...
sometimes99er Posted December 4, 2010 Share Posted December 4, 2010 (edited) Hey sometimes... could we use a series of VSBWs and offset each one before we write it? Instead of using a MBW, I mean... It seems like a simple thing to accomplish, doesn't it? Well, VSBW sets the address of the VDP and transfers one byte. VMBW sets the address and transfers many bytes - taking advantage of the VDP auto incrementing address. We'll do our own VMBW, then go into its stomach and do the offset there. It will execute like 5-10 times faster (than using a series of VSBWs). Edited December 4, 2010 by sometimes99er Quote Link to comment Share on other sites More sharing options...
Opry99er Posted December 4, 2010 Author Share Posted December 4, 2010 I wasn't even aware of a VMBV. Shows what I know I'm a newb... there's no doubt. =) Quote Link to comment Share on other sites More sharing options...
sometimes99er Posted December 4, 2010 Share Posted December 4, 2010 (edited) I wasn't even aware of a VMBV. Shows what I know I'm a newb... there's no doubt. =) Hmmm ... so it's VMBW (as in VDP Multiple Byte Write - Lottrup page 23). You know that one (Post #57) ? Edited December 4, 2010 by sometimes99er Quote Link to comment Share on other sites More sharing options...
Opry99er Posted December 4, 2010 Author Share Posted December 4, 2010 Yea, I'm aware of the VMBW. =) I used it in my sample program I sent you to write the 28 bytes to the screen. I thought you wrote "VMBV", I may have misread. Yes... I found one Matthew wrote that is very nicely commented. =) Quote Link to comment Share on other sites More sharing options...
sometimes99er Posted December 4, 2010 Share Posted December 4, 2010 Yea, I'm aware of the VMBW. =) I used it in my sample program I sent you to write the 28 bytes to the screen. I thought you wrote "VMBV", I may have misread. Yes... I found one Matthew wrote that is very nicely commented. =) Yes, I misspelled in post #118. Quote Link to comment Share on other sites More sharing options...
Opry99er Posted December 4, 2010 Author Share Posted December 4, 2010 Here's one Marc wrote: CLR R0 LI R1,BUF LI R2,768 ORI R0,>4000 (THIS ROUTINE CHANGES THE SWPB R0 MEMORY CONTENTS) MOVB R0,@VDPWA SWPB R0 MOVB R0,@VDPWA NOP VMBW1 MOVB *R1+,@VDPWD DEC R2 JNE VMBW1 LI R0,>9F00 MOVB R0,@>8400 Here's the one I found that Matthew wrote... VMBW MOVB @R0LB,@VDPWA * Send low byte of VDP RAM write address ORI R0,>4000 * Set read/write bits 14 and 15 to write (01) MOVB R0,@VDPWA * Send high byte of VDP RAM write address VMBWLP MOVB *R1+,@VDPWD * Write byte to VDP RAM DEC R2 * Byte counter JNE VMBWLP * Check if done B *R11 *// VMBW Quote Link to comment Share on other sites More sharing options...
Opry99er Posted December 4, 2010 Author Share Posted December 4, 2010 Obviously Matthew's is dependant on other VDP routines he wrote, but I have them all in the Beryl scroller that he sent me. It's really interesting to read through that source... just so neat and clean. =) Quote Link to comment Share on other sites More sharing options...
Opry99er Posted December 4, 2010 Author Share Posted December 4, 2010 (edited) I'm studying "ORI" right now.... Looks like it compares two words and sets the bits to the new word if either of the bits are set in either of the compared words. Therefore: 0101100110011001 and 0011101111000100 becomes 0111101111011101 I guess I'm just trying to figure out why this is so crucial in a VDP write routine.... Edited December 4, 2010 by Opry99er Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.