Tech and Homebrew > Turbo/PCE Game/Tool Development

The beginning of PCEASM programming - a few questions.

(1/2) > >>

I would like to get to know the PCE architecture to start programming something in PCEASM.

Searching the internet, I did not find any satisfactory answers to my questions.
Therefore, I would like to know:

1. What is the best PCE emulator to test the written code and to have SPRITES or NAMETABLE view (unfortunately the ones I found don't have it).

2. From what I read, NAMETABLE in PCE has 1024 bytes ($ 000-03FF) of 32x32 size and one 8x8 tile address is supposed to have 2-bytes - not very correct because it should have 2048 bytes. It is very unclear:

--- Quote ---"TileMap has to be at $0000 .. and it takes AT LEAST $0400 (it's minimum size is 32x32, and each definition takes 2 bytes)"

--- End quote ---

Due to this question, I do not know what the order of nametable tiles in PCE looks like - does it start like in NES (one-byte NAM)
xx00, xx01, xx02, xx03 ... xx1E, xx1F
xx20 ...
xx40 ...
Or like SMS (two-byte NAM)
xx00, xx02, xx04, xx06xx ... xx3E, xx3F
xx40 ...
xx80 ...


3. I have read PCE has the ability to access VRAM and VDP directly from the main processor loop without the need to perform additional graphics update functions, e.g. during VBLANK NMI? That's true? Are there maybe any limitations though? (For example, SegaMS can be written to VDP in the main loop (cpu loop) but you often have to make some delay between sequential writes due to slower transfer to VRAM.)
4. What exactly does a VRAM map look like? I found one but it is unclear - because if VRAM has 64K, why addresses from 8000 to FFFF are "unused"?

--- Quote ---$0000   $03FF   Min Tilemap (Tiles 0-63)
$0400   $0FFF   Possible Tilemap (Tiles 64-255)
$1000   $7FFF   Tiles 256-2048
$7F00   $7FFF   SATB sprite table
$8000   $FFFF   PC-Engine only has 64k, so this is unused

--- End quote ---

5. I couldn't find any good examples of HELLO WORLD in PCEASM - are there any? Correct reset code, joypad reading code, etc. Unfortunately, often different "hello world" have many errors and more confuse than advise.

1. I like Bizhawk, you can at least output the background and VRAM in separate windows.

2. I don't know crap about the Nametable, HuC handles that for me, sorry.

3. If you try and write palette data mid-frame, you get artifacting issues. Also, if you're changing both the VRAM and sprite size in the same frame, you often get glitchy looking graphics, due to the VRAM updating immediately and the SATB not being updated until the next frame. Otherwise, VRAM  updates during a frame are strangely A-OK. (It's one of the coolest things about the Turbografx, being a new retro dev)

4. Aside from the Sprite attribute table, I'm pretty sure the VRAM is completely open. You can put your tile map data pretty much anywhere. You can mix sprite and tile data to your hearts content. I think that's why you can't find a good map, it doesn't care if a sprite is at $0900 and a tile is at $6000, or vice-versa. 

Also 4. Because VRAM is in uint16, not bytes. Look at that link you sent. You'll see you always write data in byte pairs, not in singular bytes.

5. Unfortunately, I also can't help with this. The HuC tutorial is great. Don't know much from the ASM side.

I read a bit more about PCE. Now I know that VRAM is 16-bit or 32KBx16.
The system is very flexible, so a bit confusing for me when I switch from NES programming, which is very stiff :)

Currently, I have the biggest problem with creating graphics - earlier TILE (TILEBased) editing programs are not compatible with PCE graphics. I noticed that frequently used graphics are 4bit PCX format, but I do not have software for this purpose.
What's the best way to edit / draw graphics for PCE (4bit PCX)?

Using PCEASM when converting an image to PCX (uncompressed format, 16 colors (4bpp) it always pops up "Unsupported or invalid PCX format!"


--- Quote from: siudym on November 23, 2021, 06:39:24 AM ---I noticed that frequently used graphics are 4bit PCX format, but I do not have software for this purpose.

--- End quote ---

I've already read a lot and many things have become clear. I wrote a simple demo (Hello World) in PCEASM - very nice system, great graphics  :D
At the moment I don't know about PSG music - I have to read more here.

My test demo ROM:



[0] Message Index

[#] Next page

Go to full version