oompa loompa I AM THE GOVERNATOR member is offline
"Git 'Er Dun!"
Joined: Sept 2003 Gender: Male Posts: 1,012 Location: Up
Re: RAMDISK for BasiEgaXorz « Result #1 on Dec 28, 2009, 3:02pm »
I finally have my development computer up and running (after 1 year of no usage - it's good I still have the basiegaxorz sources!), and I'm working on my RAM uploader . Possibly, I'm going to release a new version of basiegaxorz that will compile for this RAM execution thing
Re: kramlib v.1.0 december launch « Result #3 on Dec 26, 2009, 1:20am »
I have more questions: What must be done so that when writing to addresses like $A00000 or $A04000, it does not give a 68K illegal operation and instead, plays the music like normal? And in the Sonic 2 ROM, where can the piece of code that reads and writes the music headers be found?
Joined: Apr 2007 Gender: Male Posts: 13 Location: España...pero de Bariloche :)
Re: Scroll background image « Result #5 on Dec 24, 2009, 1:11am »
As you can see, the VRam is not only to store tiles. All the info for create the current screen (except for the colors and the V Scroll), is stored here.
Thanks for the reply, i want to know, because 1kb here is a lot!!
this days im not working, and stay in home, i hope i can make some progress in my code..
For all, happy christmas and new year!!!! and thanks for the help for everybody!!
Feliz navidad y año nuevo, a todos los que hablen castellano!
One unit of <Tile Destination.....> is equal to one 8*8 tile, and the destination starts at 0 and end at 1343. So, the video memory can hold 1344 simultaneous tiles (43008 bytes of VRAM)
This text is in help, in loadtiles section. Why only use 43008 bytes, if the megadrive vram is 64kb in the specs..?
Thanxs!
If you see near to the end of the help, you will see this:
As you can see, the VRam is not only to store tiles. All the info for create the current screen (except for the colors and the V Scroll), is stored here.
Joined: Apr 2007 Gender: Male Posts: 13 Location: España...pero de Bariloche :)
Re: Scroll background image « Result #7 on Dec 23, 2009, 1:39pm »
One unit of <Tile Destination.....> is equal to one 8*8 tile, and the destination starts at 0 and end at 1343. So, the video memory can hold 1344 simultaneous tiles (43008 bytes of VRAM)
This text is in help, in loadtiles section. Why only use 43008 bytes, if the megadrive vram is 64kb in the specs..?
Joined: Apr 2007 Gender: Male Posts: 13 Location: España...pero de Bariloche :)
Re: Scroll background image « Result #9 on Dec 21, 2009, 7:03pm »
Here is the code that I used when I wrote my scrolling engine (well, actually this is a different one, but the functionallity is the same). All the code is fully commented and is (I think) very easy to understand. If someone has doubts, the image is 720*320 (resized to 720*224), converted with ImaGenesis in 4bpp mode,15 colors, optimised. The map was saved in a file, because sometimes BEX has problems to recognise big chains of data. I leave you as a homework the vertical displacement. It's not that hard, just pay attention to horizontal scrolling code;).
Sorry the delay to reply. THANXS!! the code is amazing! is very well quoted, and i understand not all, but almost all.
The most difficult work, is to convert the 640x224 background, that is 2240 tiles in 950-1050 tiles. Very difficult!!
I spend 6 or 8 hours in photoshop, and finally i finish the conversion of a NeoGeo background, from last Blade 2. Is 640x224, 11 colours, and only 985 tiles!
Joined: Mar 2007 Gender: Male Posts: 22 Location: Russia (BeloRussia)
Re: kramlib v.1.0 december launch « Result #10 on Dec 21, 2009, 11:33am »
Mairtrus, thanks, but in what place I have must made change's??? Can you give a little example??? Engine work slower on PAL machine - you can use last Regen emulator with Europe setting country to see it
kram1024, great work!!! This is a good way to use more sound hardware then Shiru's TFM does!!! I have got real SMD system with flash cart and can test it on real hardware. But I have PAL machine Can somebody explain me how to speed up song a little for a 50Hz hardware?
You should have no problems, since the Z80 SMPS does not depend on the verticals interruptions to play music. Anyway, the bytes 4-5 changes the playback speed. Byte 5 changes the speed a little, while the byte 4 changes the speed a lot.
In the Sonic 2 music format, since $00-$7F denote the note lengths, what is the byte value used for a quarter note, a half note, whole note, triplet, etc.?
There is no real equivalence, but since $00 is the maximum length and $01 the minimun (yep, it's 01,02...7F,00), I like to use the following equivalent list: 00: Whole 40: Half 20: Quarter 10: Eighth 08: Sixteenth 04: Thirty-second 02: Sixty-fourth
A triplet can be done by dividing the note lenght by 3 and fixing the values to get, by addition, the length of the original note. For example: To make a quarter triplet, you can do 32/3=10.66, so you will have 11+10+11 ($0B+$0A+$0B). I do it this way and gives me really acurate results.
Re: kramlib v.1.0 december launch « Result #12 on Dec 20, 2009, 5:58pm »
In the Sonic 2 music format, since $00-$7F denote the note lengths, what is the byte value used for a quarter note, a half note, whole note, triplet, etc.?
Joined: Mar 2007 Gender: Male Posts: 22 Location: Russia (BeloRussia)
Re: kramlib v.1.0 december launch « Result #13 on Dec 20, 2009, 12:03pm »
kram1024, great work!!! This is a good way to use more sound hardware then Shiru's TFM does!!! I have got real SMD system with flash cart and can test it on real hardware. But I have PAL machine Can somebody explain me how to speed up song a little for a 50Hz hardware?
im still need how to load the tiles in a dynamic way, because in the gelda example, you load only a few tiles, and repeat in the array/grid, or i understand wrong the example?
Your gelda code is amazing, the first i need is know how to change the array/grid from 24x24 to 24x7, because i dont want up/down move in background, only left/right, and second how to load in a dynamic the tiles that are now visibles. Wow, a lot to work to this weekend. I hope i can...
You are understanding correctly. Due to limitations in the number of tiles you can put in the VRAM, it is necessary to always load the minimum amount of tiles and redistribute them in the best possible way. Does this mean is not possible do what you ask? Of course it's possible but not advisable due to the high consumption of resources required, coupled with the huge space occupied by the graphics in ROM. Unless you make a game like "The Legend of Zelda: Link's Awakening", where the entire screen is redrawn when moving from one room to another...
Here is the code that I used when I wrote my scrolling engine (well, actually this is a different one, but the functionallity is the same). All the code is fully commented and is (I think) very easy to understand. If someone has doubts, the image is 720*320 (resized to 720*224), converted with ImaGenesis in 4bpp mode,15 colors, optimised. The map was saved in a file, because sometimes BEX has problems to recognise big chains of data. I leave you as a homework the vertical displacement. It's not that hard, just pay attention to horizontal scrolling code;).
Joined: Apr 2007 Gender: Male Posts: 13 Location: España...pero de Bariloche :)
Re: Scroll background image « Result #16 on Dec 17, 2009, 6:03am »
I don't have a very good tutorial on how to dynamically load tiles (and we do need one because this is the most common thing that newcomers ask for). This is a link to some code I made to dynamically load tiles:
I think synphias did improvements on the code to make it faster by optimizing the writes to VRAM
Hi! thanxs oompa loompa for the reply.
I check the gelda example, and i see you "cut" the screen in 32x32 pixels (10x7 for 320x224 res) or im wrong?
im still need how to load the tiles in a dynamic way, because in the gelda example, you load only a few tiles, and repeat in the array/grid, or i understand wrong the example?
Your gelda code is amazing, the first i need is know how to change the array/grid from 24x24 to 24x7, because i dont want up/down move in background, only left/right, and second how to load in a dynamic the tiles that are now visibles. Wow, a lot to work to this weekend. I hope i can...
Im graphist, and i was making a game for RPG maker. I have near 50% of graphics done, and some musics... Is a dream from child make a game for MegaCD, maybe i have a chance now!
If i can or not, i write a post in this days. Thanxs for all help. I really want to learn!
I was illustrating how sonic2 does it by showing him the drawing code Edi: I also see that you had to spoil the fun of him learning from the drawing code itself even more. the drawing code tells a lot about how the games work. Obviously you already know how the routine works, XD, so why not just add comments to the code I provided from sonic2 so he sees better how THAT works.
??
Aren't you the poster of this code? I know the original poster asked for a reference to a Sonic 2 routine, but can you or can you not explain this code?
I don't understand how it "spoil the fun of him learning from the drawing code itself even more". Can you elaborate more? Mairtus post is to give general information about drawing a dynamically loaded map onto the screen.
Is this not the forums for a newbie BASIC compiler? lol
Quote:
Hi! first sorry my english.
I know how to draw in screen a 320x224 image (like in ffantasy example).
If i need to draw sprites, i made the image background smaller like 320x192, and i have 160 tiles to sprites free.. (i dont know another way, because a background fill al tiles)
My question is, if i have a 512x224 image, and i want to scroll following the sprite coordinates (like a sonic), how i can make the image fit in the 1120 tile limit?
I want to load a 512x224 image, put the sprite, and that this background follow the sprite (again, like a sonic game for example)
Hope someone can help me, Thanxs!
PD: EDIT: Because my english is so bad, and maybe dont understand me, i made a little example. A Final Fight "level" , with a static bakground, but the idea is that scroll !! how?¿¿ THANXS!
I don't have a very good tutorial on how to dynamically load tiles (and we do need one because this is the most common thing that newcomers ask for). This is a link to some code I made to dynamically load tiles:
Joined: Apr 2007 Gender: Male Posts: 13 Location: España...pero de Bariloche :)
Re: Scroll background image « Result #18 on Dec 15, 2009, 1:00pm »
Hi! thanxs kram1024 for the code and your help, but sorry, i dont understand assembler. I only know a basic basic
A bigger code like this is like chinesse for me. I need small code examples to understand, if not, i lost.
Here's a fairly simple explanation of how to do what you're looking for: First, you need to define a camera. It is nothing more that the coordinates (X, Y) of the current screen. Second, every time the camera moves, you need to check that the distance that moved the camera (say, 8 pixels) is sufficient to load new tiles. If this happens, you will need to load the new tiles.That's all. Now, let's see from the graphic point of view ...
To fill a 320 * 224 screen, you need 1120 tiles, assuming that the camera is in a position multiple of 8 (0,8,16,24, etc ...). Assuming that the camera move 4 pixels to the right, although the size of the screen is the same, now there are 2 lines of tiles incomplete screen, so that the number of tiles that are viewed is 1148 tiles (28 tiles more ...).
Do you understand?
If i dont understand bad, you say that i need to create a camera, and (for example) 4x4 tiles sprite. If the sprite is in, example, x=<32 i scroll left, one column of tiles, and free from memmory the most right column of tiles...? in this case i need to load all the 1120 tiles, one by one?
The problem is i dont know how to make a code of this. Do you know how to download a example?
Re: Scroll background image « Result #20 on Dec 15, 2009, 6:02am »
I was illustrating how sonic2 does it by showing him the drawing code Edi: I also see that you had to spoil the fun of him learning from the drawing code itself even more. the drawing code tells a lot about how the games work. Obviously you already know how the routine works, XD, so why not just add comments to the code I provided from sonic2 so he sees better how THAT works.