GeorgRottensteiner / C64Studio

C64Studio is a .NET based IDE specializing in game development for the C64 in assembler and BASIC
Other
252 stars 38 forks source link

Char Screen Editor: exported assembly code with "" chars between each byte #116

Closed hkramer70 closed 2 months ago

hkramer70 commented 3 months ago

Studio 7.8

In the "Char Screen Editor", when I export my small level into assembly with Petscii style activated, I'll get many "" entries between each byte, for example: !pet "", $4F, "", $77, "", $77, "", $77, "", $77, "", $77 ...

In the screenshot you can see all my settings. When I deactivate "Prefer PetSCII", then I get the following (for me correct) output: !byte $4f,$77,$77,$77,$77,$77,$77,$77,$77,$77,$77,$77,$77,$77,$77,$77,$77,$77,$77,$77,$77,$77,$77,$77,$77,$77,$77,$77,$77,$77,$77,$77,$77,$77,$77,$77,$77,$77,$77,$50 ...

Maybe, I am wrong and those NULL items are correct, then ignore my bug report because I am new to the screen editor.

Screenshot 2024-06-14 123404

GeorgRottensteiner commented 3 months ago

Hmm, blanks would be fine, but empty is weird. Which mode did you set your char screen to? Generic Commodore, or is it using one of the Mega 65 16bit char modes? I see that in those cases the upper byte (which is usually zero) is wrongly exported as "".

hkramer70 commented 3 months ago

I worked with the Mode "Commodore 40x25 HiRes" (see screenshot 2). Screenshot 2024-06-14 153813

GeorgRottensteiner commented 3 months ago

Ah, got it. Stupid bug of mine, where I expected readable strings most of the time.

GeorgRottensteiner commented 3 months ago

Fixed with commit 6cf3364f4e51dfe968b59325fcdbae9bd286e4be. Updated the WIP version at https://www.georg-rottensteiner.de/webmisc/C64StudioRelease.zip

hkramer70 commented 3 months ago

Thanks for instant fixing :). The unnecessary "" entry is gone 👍.

But: Is that normal, that in "Prefer petscii" mode the colors won't be exported when selecting "Export Data" "characters, then colors"?

GeorgRottensteiner commented 3 months ago

Good question. I think it comes from the fact that this specific export is derived from the PRINT statement creator, where the colors are included in the statements.

I'll add the colors, they won't be !pet however, but !byte statements.

New WIP version is up (both issue 117 and 116 included)

GeorgRottensteiner commented 2 months ago

Closing this, if you feel it's wrong feel free to reopen