Just compiling a hucard project as-is makes no positive effect -- I have bank 0 with startup code plus 4 more banks I pull graphics from and map during startup. I imagine that there's some preparation to be done but I can't find any documentation. What's the minimum setup for an ASM CD project?
IPLCONFG
BANKS
O
GRAPHC
ADPCM
RESERVE
PC Engine CD-ROM SYSTEM
Copyright HUDSON SOFT / NEC Home Electronics,Ltd.
GameTitleHere!RESERVED
OK, I found the Hu7 pdf. So from what I can tell the important part of IPL.bin starts at $0800 and has this layout:Code: [Select]IPLCONFG
BANKS
O
GRAPHC
ADPCM
RESERVE
PC Engine CD-ROM SYSTEM
Copyright HUDSON SOFT / NEC Home Electronics,Ltd.
GameTitleHere!RESERVED
I still don't get how stuff is supposed to be referenced on disc ("record no."), is it a "CD frame" index or something? Do I have to generate all that stuff by hand?
Oh boy. ](*,)
I thought the IPL file that HuC had was just like a static signature thing the CD bios checked for copyright and disc validation
(which MPR banks can I use? interrupt vectors are ok to be assigned on the last bank? any special function to load before doing regular game stuff?)
I could also use HuC to do all that hard work for me...
I still don't get how stuff is supposed to be referenced on disc ("record no."), is it a "CD frame" index or something? Do I have to generate all that stuff by hand?
I'm not even sure if the IPL loader even allows you to load up more that 64KB in the boot process.
If you want to make a CDROM project in ASM, at least take a look at HuC's "startup.asm" (and anything else it references).
The ipl by itself can load all of vram, and up to 5 pages of code.
But if you set the execution address (to the last part of the ipl, iirc) it can call your ipl code. At that point, you can do pretty much what you want, if you can fit it into ~1K. You have to direct execute your main program, though....
Do you mean actually putting your code in the IPL sector itself???
Yes. As long as you don't change the signature (which is actually a routine that does the gfx/pallete/sound loading and playing), you can set the execution address to run code in RAM. Unfortunately, there's only about 1K left at the end of the ipl stuff.
OK, I just looked at the loading process in Mednafen.Right. Keep in mind that there is a split in the ipl though; part of it is data, part of it is boot code....
So the 2 IPL sectors are loaded into RAM $2800-$37FF.
The contents of $2800-$2D1F are verified as a valid IPL (the signature).Right. That's the first half of the ipl.
Then the code jumps to $2B26 to actually run some code before loading/running the game program/data that is specified in the IPL.Not sure about the addresses, but ok. The code that gets run has been verified as the NEC boot code. That part loads the graphics, etc. Can't change it, or the boot fails.
So you've actually got 736 bytes of space for your own code in there if you don't overwrite that area with boot code.
I was thinking for a second that your code inside the IPL would run while loading the main program code .Unfortunately not; I think the main program gets loaded last (maybe first), iirc. That is, assuming its not running from the ipl area, though maybe the main code gets loaded anyway. Don't quote me on that, though; it's been a long time since I did that stuff....
I see that there's a lot to learn so I might not do a CD version as I was planning for my homebrew in development
I see that there's a lot to learn so I might not do a CD version as I was planning for my homebrew in development (I thought it would be way easier than it actually is to play with CDs), but I will look more into it later.
You're going to laugh, but here's my suggestion. And I'm serious.
Write a HuCard game (assembler is fine, HuC not required). Get it to work. Try to keep it under 128K.
This thread makes me feel retarded...
This thread makes me feel retarded...
You guys are simply the best.
! No longer available (http://www.youtube.com/watch?v=ItwuYVlRhVE#)(http://i.imgur.com/I3rCv1d.png)
Takaki Kobayashi Seal of Approval
I see that there's a lot to learn so I might not do a CD version as I was planning for my homebrew in development (I thought it would be way easier than it actually is to play with CDs), but I will look more into it later. Thanks everyone, your really did help me a lot. And also thanks for the nice discussion about the IPL itself holding some code, I'll look into that later, too.