Flaming Intro

Talk about the PCE/TG. Easily the best home console of all time! ^_^
TheOldMan
Lord of the Poffertjes
Posts: 432
Joined: Thu Apr 08, 2010 5:54 pm
Location: Wherever

Flaming Intro

Postby TheOldMan » Mon Sep 27, 2010 6:36 pm

Tuoko:

The reason I asked about the size (without gfx) is I have a way to load that stuff ( about 1.5K of code) based on the ipl code. The Graphics load directly into VRam (via cd-bios) and the sound loads directly into adpcm memory without any calls to read the cd. (Well, the calls to do it are in the ipl code...) Then, the ipl code -can- jump to a (roughly) 1.5K section of user code. I believe this is specifically done in the cd-bios/ipl to allow just such an intro screen :-)

I have an iso that shows the aetherbyte logo, dropping it down from the top IIRC. But I think yours is much cooler, and I'm just waiting for arkhan to say "Can we do that?!". So I figure I better start finding out what it takes now...
User avatar
TOUKO
Rookie
Posts: 36
Joined: Sun May 23, 2010 8:33 am

Re: Flaming Intro

Postby TOUKO » Tue Sep 28, 2010 10:58 am

hum, yes without gfx my fire effect routine probably take less than 1,5 ko ..
;)

But like i said on pcenginefx, why you don't use an entire overlay to make your intro, it's more easy, and you can do all that you want for your intro ..

When player push start button, you lunch your start game menu with cd_execoverlay function ..
Because make cool effects in 1,5 ko with HuC is :o
TheOldMan
Lord of the Poffertjes
Posts: 432
Joined: Thu Apr 08, 2010 5:54 pm
Location: Wherever

Re: Flaming Intro

Postby TheOldMan » Tue Sep 28, 2010 11:55 am

why you don't use an entire overlay to make your intro,
Can do that, and have done it for insanity. But, that means the pce has to load all the overlay code, and I have to dedicate an overlay to the intro, which is only gonna be seen once most likely. And, it has to be compatible with the CD-Bios card that's being used.

If I use a small intro routine and the ipl loader, I can play the intro no matter which cd-bios is being used. Kinda like the sega game startup screens.

And I just think it would be cool to do :-)

Edit:
Using Huc would be out of the question; that's why I was using assembler. Nothing is loaded before we run the intro screen; we have a 'blank' machine, no huc libraries, nothing. And it can only be 1.5k because it fits into one of the sectors loaded directly from cd by the ipl code. The actual boot code is ~ 0.5K, leaving the rest of the sector for our intro code.

One interesting thought, though, is that the ipl code sets up the mappings for all 8 pages of RAM; in theory, the user boot code -could- continue to load from the cd while running the intro screen. So long as you don't jump anywhere until the page gets loaded, you could in theory have a complete 64K program for the intro. Haven't played with that kinda setup yet, but I'm sure it could be done. And if it's done right, it would look like the program loaded really, really fast :-)
User avatar
TOUKO
Rookie
Posts: 36
Joined: Sun May 23, 2010 8:33 am

Re: Flaming Intro

Postby TOUKO » Tue Sep 28, 2010 12:53 pm

Aaaah yes ..

1,5 ko of code is doable in 100% assembly for sure ..

But like your overlay intro, it's only visible once, when you're starting your console ..
TheOldMan wrote:
And I just think it would be cool to do :-)
Yes i fully agree with that
TheOldMan
Lord of the Poffertjes
Posts: 432
Joined: Thu Apr 08, 2010 5:54 pm
Location: Wherever

Re: Flaming Intro

Postby TheOldMan » Wed Sep 29, 2010 12:58 am

The neat thing is that it always runs, no matter which CD card is in the machine.
The overlay method will give the 'error' screen with the wrong CD card, and you don't get to see the intro.

Now I gotta go find that fire effect demo....<sigh>
User avatar
TOUKO
Rookie
Posts: 36
Joined: Sun May 23, 2010 8:33 am

Re: Flaming Intro

Postby TOUKO » Wed Sep 29, 2010 7:24 am

Ok, i have understood ..

But as overlay i spoke about the first overlay,not at console boot ..

For fire demo, you could use differents colors tiles (8*8 not 16*16) for simulate fire (white, black,yellow,and different shades of red) ...
i have seen it on 8 bits computers (1 or 3 mhz cpu), it's lightly pixelised but good to see ..

Mine is not really an effect, there was no algorithm, no special code, it's only a visual trics :mrgreen:
Last edited by TOUKO on Mon Oct 11, 2010 7:21 am, edited 2 times in total.
TheOldMan
Lord of the Poffertjes
Posts: 432
Joined: Thu Apr 08, 2010 5:54 pm
Location: Wherever

Re: Flaming Intro

Postby TheOldMan » Mon Oct 04, 2010 3:06 pm

I've thought about it a bit, and I think the plan will be to do an overlay version (in Huc) to get it working and see how it looks, and then move it to assembler for the cd intro.
I'm planning on using a pixel-based bubble-up and average version, so it's gonna be slow in Huc. Hopefully it will be faster in asm. And, if I don'l like it, I won't use it :)

<now I just gotta figure out how to do the sprites for the logo in asm....>
User avatar
TOUKO
Rookie
Posts: 36
Joined: Sun May 23, 2010 8:33 am

Re: Flaming Intro

Postby TOUKO » Mon Oct 04, 2010 7:01 pm

Hum, pixel based, is i think difficult because is not a native PCE mode ...

for sure the screen result will be better than a tiles version, but surely slowest, and hard to code .
But beware that in full ASM ,you 'll must manage memory banks by hand ..
TheOldMan
Lord of the Poffertjes
Posts: 432
Joined: Thu Apr 08, 2010 5:54 pm
Location: Wherever

Re: Flaming Intro

Postby TheOldMan » Thu Oct 07, 2010 7:31 pm

Okay, I found out how to do a fire routine, and have a generic version running under Huc.

Granted, it's slow as hell, but since I'm using arrays (slow) and multiplies to find indexes (even slower. No multi-dimensional arrays in Huc...), as well as the averaging for the points (again, really slow) and gfx_plot to draw the pixels (agonizingly slow - you can watch it draw the rows, one at a time) I can't complain.

Now that I have some idea of how it all works, and what has to be done, I can work on speeding it up. Guess that's the next job... And after that, removing gfx_plot() and getting things to work with my set up. I know it can be done much faster.


Yeah, I might have to manage the banks by hand, but that's not real bad. The startup code maps in all 8 banks for me, so I pretty much have 6 pages of free memory to work with (the program will get overlaid on them when it loads) The big problem is gonna be keeping the code < 1.5K :-)
TheOldMan
Lord of the Poffertjes
Posts: 432
Joined: Thu Apr 08, 2010 5:54 pm
Location: Wherever

Re: Flaming Intro

Postby TheOldMan » Mon Oct 11, 2010 10:33 am

Converted the averaging routine to assembler, using index registers to speed things up. Some. Now that I know what's going on / how to do it, I've come up with a slightly different way which will be a bit faster and use less memory. (It's still slow to me, but I Am doing some extra block-copies that I can get rid of.)
I moved the code to a cd-version (since that's the ultimate target), and ran into some trouble. Has anyone else noticed that ma_mul8u trashes the X register? Maybe others, too. I wonder if all the bios math routines do this...

Next up: split the averaging routine to take advantage of common code, replace the few remaining parts of it that are still in HuC with assembler code, and then get rid of extra block moves....
When that's running right, I'll start tackling how to draw pixels in planar memory :-)
( I know -how- to do it, I just need to code it in assembler...)

And fwiw, the user code in Huc starts at $A000 and ends at $AB2A, so its $B2A bytes long (2,858 byte). So it looks like it might actually be possible to squeeze it into 1.5K....Although when I re-write gfx_plot, that number is likely to grow...

Who is online

Users browsing this forum: No registered users and 1 guest