|
Post by gredler on May 19, 2022 2:52:52 GMT
This is Zuks! 320x224 MAPeD edition! does anyone know if there are better settings for running and capturing at 320x224 resolution? We have been using bizhawk to record uncompressed avi videos for captures, and have been fairly successful. I then can take that video and pop it in after effects or premier and scale it with point sampling to any resolution we need.
|
|
|
Post by 0x8bitdev on May 19, 2022 10:47:23 GMT
- Attract Sequence has 7 scrollable windows. Previously 4. IMHO, the star field in the old version with 4-layers looks better. With the 7-layers it looks too ordered by a layer speed. Have you tried placing the layers randomly by speed? I will add tile drawing functions to the library. -Is it somehow possible to remove the Flash during the screen jump to "Zuks! Title" Time code ? [upd]: Done! Added tile drawing functions. MPD v0.5 all details is here
All the changes in the dev build. Also added a dialog for reordering CHR banks (MainMenu->CHR Bank->Reorder Banks). Need testing!
|
|
|
Post by hyperfighting on May 19, 2022 13:55:00 GMT
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
|
Post by 0x8bitdev on May 19, 2022 14:06:44 GMT
1. 'PUSH RUN' is a sprite? 2. Why did you use screen jump there? [upd]: As far as I understand you have a two copies of the "Zuks!" logo. The first one as a sprite and the second one is baked into a screen. So the logo costs x2 memory! If you want to avoid sprites flickering, the falling stars must form a line below the "Zuks!" logo. The "Zuks!" logo is 13 sprites width +1 star -> no flickering and less memory for the logo! Since the 'PUSH RUN' is baked into a screen image, align it to grid 8x8 to minimize the memory usage and draw it over the title screen with ' mpd_draw_block2x2' As a result you will get less memory for graphics, only ONE title screen and no screen jumps!
|
|
|
Post by hyperfighting on May 19, 2022 17:24:11 GMT
gredler - Thanks for the tips! I'm hoping to avoid post. Mednafen has a pretty slick .mov output that is compatible with YouTube uploads! Its just the image seems skewed as if it is being squished into a 256x224 box if that makes any sense. I installed "ootake" see if there were any movie output features but it doesn't look like it! 0x8bitdev "Push Run" is now built into the map (Previously All Title Text was sprites now its MAP data!) - Floating blocks are fixed! I used "mpd_draw_block2x2( 0, 144, 0 );" I converted the map back to 2x2 to control the placement of the 2x2 blocks. - Now that you mention it the scrollers look odd I'll play with offsetting the Layout in MAPeD before export...I cheated and repeated alot of the star field so the pattern really shows. - Matched the Level Intro - to the level Map! (Very Early but I think it matches! I will take your advice and try to eliminate the screen jump and save GFX! - Another point is the Stars are 32x32 sprites when they should be 16x16 so that might make a difference for flicker etc... I'm wondering if now SPReD becomes the focus and the first plan of attack is to optimize the Zuks? What do you think? [upd] I'm not sure why but it looks like the BANK jump to LEVEL 1 has a bad frame. I handle the jump the same as the others.. void LAYOUT_WORLD_1() { disp_off(); vsync(); mpd_init(map_ind=3, 1); mpd_draw_screen_by_ind(2); //The other jumps always reference screen index 0 but in this case I reference screen index 2 disp_on(); vsync(); } The test level is 4 screens...I think the index must work like this? I am attempting to get at where [2] is pictured. [0][1] [2][3] maybe the scrollx and y need to be reset?
|
|
|
Post by 0x8bitdev on May 19, 2022 18:20:37 GMT
- Floating blocks are fixed! I used "mpd_draw_block2x2( 0, 144, 0 );" I converted the map back to 2x2 to control the placement of the 2x2 blocks. I don't quite understand why the 2x2 mode is needed for this? You can do all the things in the 4x4 mode. The exported format remains the same - 4x4 ? I'm wondering if now SPReD becomes the focus and the first plan of attack is to optimize the Zuks? What do you think? I would focus on SPReD after fixing all the things: removing screen with the baked logo from the layout, eliminating of useless screen jump, drawing 'PUSH RUN' etc... So, when the star size 32x32 is the only problem, it's time for SPReD. [upd] I'm not sure why but it looks like the BANK jump to LEVEL 1 has a bad frame. I handle the jump the same as the others.. void LAYOUT_WORLD_1() { disp_off(); vsync(); mpd_init(map_ind=3, 1); mpd_draw_screen_by_ind(2); //The other jumps always reference screen index 0 but in this case I reference screen index 2 disp_on(); vsync(); } The test level is 4 screens...I think the index must work like this? I am attempting to get at where [2] is pictured. [0][1] [2][3] maybe the scrollx and y need to be reset? I do almost the same in the samples and it works without glitches. Try the ' mpd_draw_screen();' instead of the ' mpd_draw_screen_by_ind(2)'. The ' mpd_draw_screen();' draws a screen marked as start one in the MAPeD.
|
|
|
Post by hyperfighting on May 19, 2022 18:46:15 GMT
I am replacing 1 - 16x16 block at a time so I figured 2x2 mode is the best plan (I guess it is the easiest...but thinking about it now I can make some 4x4 replacement blocks and use "mpd_draw_tile4x4( u8 _x, u8 _y, u8 _tile4x4_ind )"
One thing I can say is "mpd_draw_block2x2" works like a charm.
I will focus on removing the screen jump. I already fixed "push run" using "mpd_draw_block2x2" but I assume that will need to be adjusted to ""mpd_draw_tile4x4"
Thanks for the tips adding the "scroll( 0, mpd_scroll_x(), mpd_scroll_y(), 0, ScrPixelsHeight, 0xC0 );" fixed it in my case.
void LAYOUT_WORLD_1()
{
disp_off();
vsync();
mpd_init(map_ind=3, 1);
mpd_draw_screen_by_ind(2);
scroll( 0, mpd_scroll_x(), mpd_scroll_y(), 0, ScrPixelsHeight, 0xC0 );
disp_on();
vsync();
} [upd] "mpd_draw_block2x2" works with 4x4 exports!!!!!!!! I believed that I would not be able to use this function due my export being 4x4 but I stand corrected!
|
|
|
Post by 0x8bitdev on May 19, 2022 19:05:39 GMT
I am replacing 1 - 16x16 block at a time so I figured 2x2 mode is the best plan (I guess it is the easiest...but thinking about it now I can make some 4x4 replacement blocks and use "mpd_draw_tile4x4( u8 _x, u8 _y, u8 _tile4x4_ind )"The Blocks2x2/Tiles4x4 modes do not depend on ' mpd_draw_block2x2' in any way... Why do you need the mpd_draw_tile4x4 for blocks 2x2 ? I will focus on removing the screen jump. I already fixed "push run" using "mpd_draw_block2x2" but I assume that will need to be adjusted to ""mpd_draw_tile4x4" For the 'push run' the 'mpd_draw_CHR' multiple times is enough... but mpd_draw_tile4x4... why? Thanks for the tips adding the "scroll( 0, mpd_scroll_x(), mpd_scroll_y(), 0, ScrPixelsHeight, 0xC0 );" fixed it in my case. Read this again, again and again... Don't use it! If you can't, send me your test project.
|
|
|
Post by hyperfighting on May 19, 2022 19:24:56 GMT
I didn't realize this at first. I believed if you exported your MAP in 4x4 you were constrained to the 'mpd_draw_block4x4' I realize there are no constraints and the new functions are interchangeable!
I already programmed "Push Run" with 'mpd_draw_block2x2' but I'll redesign using the more efficient 'mpd draw CHR'!
I'll see if I can get this working...the reason I didn't use it is because you made a note saying not mix and match so since I was already doing the scrolling in the Demo sequence I thought I was stuck but I'll give it a try.
pokew( 0x220c, mpd_scroll_x() );
pokew( 0x2210, mpd_scroll_y() );
vsync();
|
|
|
Post by 0x8bitdev on May 19, 2022 19:40:01 GMT
I'll see if I can get this working...the reason I didn't use it is because you made a note saying not mix and match so since I was already doing the scrolling in the Demo sequence I thought I was stuck but I'll give it a try. pokew( 0x220c, mpd_scroll_x() ); pokew( 0x2210, mpd_scroll_y() ); vsync();
There are two options: 1. Fullscreen scrolling. Without HuC's scroll.2. Area scrolling with HUD. With HuC's scroll.
You can't use them together. But do you use an area scrolling with HUD in your project? If no, what option do you need to use?
|
|
|
Post by hyperfighting on May 19, 2022 21:15:00 GMT
I think I found a little BUG - Possible inaccurate CHR location data v.07b DevThe highlighted block in the image displays the text in the bottom left corner of the window. By my calculation to display that CHR I need this code -> mpd_draw_CHR( 192, 192, 0X61, 0xDA); But actually I need this code -> mpd_draw_CHR( 192, 192, 0X61, 0xDC); which is based on the information displayed when the opposite bottom CHR is selected. [upd]The code to draw "PUSH RUN" with 2x2 tiles mpd_draw_block2x2 ( 112, 192, 0x5B);
mpd_draw_block2x2 ( 128, 192, 0x5C);
mpd_draw_block2x2 ( 144, 192, 0x5D);
mpd_draw_block2x2 ( 160, 192, 0x5E);
mpd_draw_block2x2 ( 176, 192, 0x5F);
mpd_draw_block2x2 ( 192, 192, 0x60); The code to draw "PUSH RUN" with CHR tiles mpd_draw_CHR( 122, 192, 0X5C, 0x05);
mpd_draw_CHR( 130, 192, 0X5D, 0xD0);
mpd_draw_CHR( 138, 192, 0X5D, 0xCD);
mpd_draw_CHR( 146, 192, 0X5E, 0xD4);
mpd_draw_CHR( 152, 192, 0X5E, 0xD1);
mpd_draw_CHR( 160, 192, 0X5F, 0xCC);
mpd_draw_CHR( 168, 192, 0X5F, 0xD5);
mpd_draw_CHR( 176, 192, 0X60, 0xD0);
mpd_draw_CHR( 184, 192, 0X60, 0xD9);
mpd_draw_CHR( 192, 192, 0X61, 0xDC); Which one is better to use? I only ask because in this case the CHR has more lines? [upd] I think I'm starting to see the light....I can save tiles if I pack "PUSH RUN" tightly into as few tiles as possible then use "mpd_draw_CHR" to display "PUSH RUN". I am going to edit and reimport my map with a tighter packing so I can hopefully have a few extra tiles for a rainy day.
|
|
|
Post by gredler on May 20, 2022 2:16:39 GMT
gredler - Thanks for the tips! I'm hoping to avoid post. Mednafen has a pretty slick .mov output that is compatible with YouTube uploads! Its just the image seems skewed as if it is being squished into a 256x224 box if that makes any sense. I installed "ootake" see if there were any movie output features but it doesn't look like it! Oh yeah dude if you are only uploading to YouTube and not needing to do post grab bizhawk and record directly uncompressed avi and toss it on youtube and you're golden, that's what DarkKobold does and works great.
|
|
|
Post by 0x8bitdev on May 20, 2022 9:04:48 GMT
I think I found a little BUG - Possible inaccurate CHR location data You've not found a BUG. You've just inattentively read the function description. Let's read together... IN: _x, _y - screen space coordinates in pixels _block2x2_ind - 0..255 _CHR_ind - 0..3 void mpd_draw_CHR( u16 _x, u16 _y, u8 _block2x2_ind, u8 _CHR_ind ) _CHR_ind - 0..3
Hmm... There are 2048 CHRs in a CHR bank. But only the first four CHRs can be passed as argument???!!!... No way! Are you kidding me? WHATTA ...K! I've found a really HUGE, FAT BUG!!!1 But wait!.. 2048 doesn't fit into 8-bit (u8)! How many CHRs in a block 2x2 ?.. It's 4 (0..3), I saw it in MAPeD! They are placed left-to-right, top-to-bottom. So may be this is the answer ?
Now, I hope, you can rewrite your ' mpd_draw_CHR' code. Or ask? You are VERY inattentive!The action plan, how to work with a new information:
1. READ at least three times. 2. THINK what you've read and re-read. 3. ASK even if you think that everything is clear. You can be wrong. 4. WRITE clean and effective code! Which one is better to use? I only ask because in this case the CHR has more lines? You did the right thing by asking. Let's calculate together: How many CHRs will be drawn when you call ' mpd_draw_block2x2' How many CHRs in a block 2x2 ? Finally we know, it's -> 4
How many CHRs will be drawn when you call ' mpd_draw_CHR' -> 1
Thus, 6 x mpd_draw_block2x2 = 6x4 = 24 CHRs will be drawn! And 10 x mpd_draw_CHR = 10x1 = 10 CHRs will be drawn! So which one is better? [upd] I think I'm starting to see the light....I can save tiles if I pack "PUSH RUN" tightly into as few tiles as possible then use "mpd_draw_CHR" to display "PUSH RUN". I am going to edit and reimport my map with a tighter packing so I can hopefully have a few extra tiles for a rainy day. I wrote you before that you need to align it to grid 8x8. And it's even better if you'll pack them into Blocks2x2. Have you removed all the HuC's ' scroll' functions except the star field ones in your project? How it works?
|
|
|
Post by hyperfighting on May 20, 2022 14:07:08 GMT
gredler - Thanks a bunch I will check bizhawk out! First progress of the day. The Zuks Map is reformatted with the text aligned to the 8x8 grid and the colour logo is removed to save precious memory. 0x8bitdev Is there an easy way to delete all CHRS in a bank without deleting the BANK itself? The steps to insert the above image... 1. Delete BANK 1 where the old map data was stored. (The result shuffled BANK 2 (Level Data) into BANK 1) 2. Create a (BANK +) resulting in BANK 2 3. Import the new MAP into BANK 2 4. Use the all new "CHR -> Reorder Banks" to move BANK 2 to BANK 1. My thought is these steps would be a good alternative. 1. Delete all CHR's in BANK 1 but do not actually delete BANK. Essentially clear the BANK. 2. Import the new MAP into the clear BANK 1. 0x8bitdev apologies for being inattentive. In my defense you can see my confusion when I actually got "Push Run" to display using my backwards methodology. My new code looks like this. The function is awesome! //PUSH
mpd_draw_CHR( 122, 192, 0X61, 0x01);
mpd_draw_CHR( 130, 192, 0X63, 0x00);
mpd_draw_CHR( 138, 192, 0X63, 0x01);
mpd_draw_CHR( 146, 192, 0X65, 0x00);
mpd_draw_CHR( 152, 192, 0X65, 0x01);
//RUN
mpd_draw_CHR( 160, 192, 0X61, 0x01);
mpd_draw_CHR( 168, 192, 0X63, 0x02);
mpd_draw_CHR( 176, 192, 0X63, 0x03);
mpd_draw_CHR( 184, 192, 0X65, 0x02);
mpd_draw_CHR( 192, 192, 0X65, 0x03); 0x8bitdev regarding the question on CHR VS 2x2 - I do understand that CHR's are 1 VS 4. However there are more calls to the PCE in the case of CHR's being used to get the job done. I just wanted to verify that more calls using CHR was not burdening the system more than fewer calls using the 2x2 method. Thank you for clarifying. 0x8bitdev - My current focus is to correct the "star fall" code on the title screen. Now that the Title Screen MAP is shorter my codez need to be adjusted to accommodate the new MAP height and the ZUKS! Logo will need to be coded to move up as the stars fall. When I get to investigating the MAP rendering my setup looks like this... main()
{
//320x224 resolution vreg( 10, 0x0502 ); vreg( 11, 0x0427 ); poke( 0x0400, 0x01 );
//Load Map scroll( 0, 0, 0, 0, ScrPixelsHeight, 0xC0 ); SET_MAP_BANK_1X(); init_satb();
//Jump mode=M_TITLE_SCREEN; stateOfTheGame=TITLESCREEN_LOAD_GFX;
/* main game loop! */ for(;;) { /*Set Sides of Screen to be black*/ set_color(256,0); switch (mode) {
case M_DEMO: Demo(); break;
case M_TITLE_SCREEN: TitleScreen(); break;
case M_PLAYER_SELECT: PlayerSelect(); break;
case M_WORLD_1_INTRO: LevelSelect(); break;
case M_WORLD_1: World1(); break; }
switch (map.render) { case 0://No Scroll vsync(); break;
case 1: //Scroll mpd_update_screen(); scroll(0, mpd_scroll_x(), mpd_scroll_y(), 0, ScrPixelsHeight, 0xC0); break;
case 2: //I have not yet successfully got this method to work....next focus after Star Fall sequence is complete. mpd_update_screen(); pokew( 0x220c, mpd_scroll_x() ); pokew( 0x2210, mpd_scroll_y() ); vsync(); break; } /*Animate Zuks!*/ if (pauseflag==OFF)
{ Zuk_State_Machine();
} satb_update(); }
}
|
|
|
Post by 0x8bitdev on May 20, 2022 15:17:34 GMT
0x8bitdev Is there an easy way to delete all CHRS in a bank without deleting the BANK itself? The steps to insert the above image... 1. Delete BANK 1 where the old map data was stored. (The result shuffled BANK 2 (Level Data) into BANK 1) 2. Create a (BANK +) resulting in BANK 2 3. Import the new MAP into BANK 2 4. Use the all new "CHR -> Reorder Banks" to move BANK 2 to BANK 1. My thought is these steps would be a good alternative. ... You've described correct steps. But, CHR bank is not only CHRs. It's blocks, tiles and screens. Clearing CHR array, automatically clears all the bank's screens. And you must delete that empty screens manually. A CHR bank without CHRs has no any sense. So just delete whole bank and create a new one. Adding "Clear CHRs" options is another way to accidentally kills bank data. So, the "Bank-" is enough. 0x8bitdev apologies for being inattentive. In my defense you can see my confusion when I actually got "Push Run" to display using my backwards methodology. My new code looks like this. The function is awesome! You got "Push Run" to display because _CHR_ind clamps to the 0..3 range ( _CHR_ind & 0x03 ). So the function can work with any random values. [upd]: I'll remove this clamping. Now your code looks correct! 0x8bitdev regarding the question on CHR VS 2x2 - I do understand that CHR's are 1 VS 4. However there are more calls to the PCE in the case of CHR's being used to get the job done. I just wanted to verify that more calls using CHR was not burdening the system more than fewer calls using the 2x2 method. Thank you for clarifying. The problem is that, when drawing a static screen, drawing of blocks 2x2 is faster (it takes 2 load to vram calls), because block data never overlap BAT left-to-right and to-to-bottom. But when you use the 'mpd_draw_block2x2', the block data can overlap BAT in any directions and VRAM address must be calculated for each CHR, so it takes 4 load to vram. 0x8bitdev - My current focus is to correct the "star fall" code on the title screen. Now that the Title Screen MAP is shorter my codez need to be adjusted to accommodate the new MAP height and the ZUKS! Logo will need to be coded to move up as the stars fall. When I get to investigating the MAP rendering my setup looks like this... The 'Star fall' code is one of the last steps. First of all, you need to deal with scrolling. Please, do not show me your code with HuC's scroll !.. Just forget about HuC's scroll in your project!
|
|