Page 3 of 4

Re: How To: Try It Now

Posted: Sat Apr 15, 2023 6:13 pm
by deadhead
Where on the forums should I go if I just want to put my code on the online emulator and share the link with people? I don't really have anything to say or ask about the code, I just want to share it. Is there a specific place I should post it to?

Re: How To: Try It Now

Posted: Sat Apr 15, 2023 8:12 pm
by mwiedmann
I have a Bitmap mode 256 color, 320x240, 8bpp image that displays as my opening screen. It doesn't show in the web emulator. I just get a black screen. The game doesn't crash and the music plays and you can press the button to move on which then switches out of Bitmap mode and everything works at that point.

Any ideas? Is this Bitmap mode not supported?

Re: How To: Try It Now

Posted: Sun Apr 16, 2023 2:25 am
by desertfish
Bitmap mode is supported just fine in the web emulator.

I suspect the program can't find the graphics file. Has the bitmap file name been properly mentioned in the manifest json? does it have the correct spelling/casing?

Re: How To: Try It Now

Posted: Sun Apr 16, 2023 4:57 am
by Cyber
deadhead wrote: Sat Apr 15, 2023 6:13 pm Where on the forums should I go if I just want to put my code on the online emulator and share the link with people? I don't really have anything to say or ask about the code, I just want to share it. Is there a specific place I should post it to?
Programming forum (viewforum.php?f=5) suits you fine from your explanation.

Re: How To: Try It Now

Posted: Sun Apr 16, 2023 8:33 pm
by TomXP411
deadhead wrote: Sat Apr 15, 2023 6:13 pm Where on the forums should I go if I just want to put my code on the online emulator and share the link with people? I don't really have anything to say or ask about the code, I just want to share it. Is there a specific place I should post it to?
If it's a complete program, put it in one of the Downloads sub-forums. That's what they are here for.
viewforum.php?f=29

We do ask that the program be complete and release-ready. If it's incomplete, experimental, or just a proof of concept, we have a "Works In Progress" section: viewforum.php?f=21

Re: How To: Try It Now

Posted: Mon Apr 17, 2023 5:34 pm
by mwiedmann
desertfish wrote: Sun Apr 16, 2023 2:25 am Bitmap mode is supported just fine in the web emulator.

I suspect the program can't find the graphics file. Has the bitmap file name been properly mentioned in the manifest json? does it have the correct spelling/casing?
You nailed it. It was an uppercase/lowercase typo that made a difference. Works now thanks for the idea!

Re: How To: Try It Now

Posted: Tue Apr 25, 2023 7:28 am
by Cyber
Now you can "Try It Now!" singular BAS or PRG file directly without packing it to ZIP.

Also you may ommit creating manifest.json file. In this case emulator will fetch all files from ZIP, and then look for a singular BAS or PRG file, and execute it.

Updated first post in thread for more details.

Re: How To: Try It Now

Posted: Thu Jul 13, 2023 5:55 pm
by Ed Minchau
BruceRMcF wrote: Tue Apr 11, 2023 10:58 pm
Cyber wrote: Tue Apr 11, 2023 5:37 am ... I want to redirect this question to all developers, since I'm only a beginner in X16 development field. If I'm not mistaken Commodore disk drives did not support subdirectories. And I notice many X16 developers also don't use subdirectories, despite X16 supports them. Is it just a habbit? Or a safe side? Or is there more to it?
If I understand correctly, the X16 SD routines followed the subdirectory system used by CMD drives that supported subdirectories.

The dual drive systems for PET computers use a "1:" or "2:" to distinguish drive 1 and drive 2 on a disk drive unit. So CMD took advantage of the fact that ":" is a reserved separator in front of the file name to allow path references to be included before the ":", as in "//files/misc/:game1.prg", if "files" is a directory in the root directory.

Only a lucky minority of Commodore owners had CMD drives (though quite a lot had CMD JiffyDos), so it could well just be habit that sees many of us continuing to pile all of our files together without using sub-directories, when developing for retro systems.

Note that cross-developers have to keep straight two different different ways to refer to the same thing -- when working with the cross-development tools in the modern operating system, they are in the system they are used to ... be it C:\ or C:/ or /mnt/c or whatever ... but when operating on the X16, then any directory name has to be ENCLOSED by "/", so the relative reference to the "files/misc/game1.prg" file in the Commodore world (from CMD and inherited by, eg, SD2IEC, etc.) is "/files/misc/:game1.prg" and the absolute reference to the "/files/misc/game1.prg" file is "//files/misc/:game1.prg".

Those doing development hosted on the X16 would simply stay in "CMD subdirectories" world, so it will be less confusing, but only a small handful of us can, at present, be entirely in that space, since most of us are still reliance on the emulator which keeps us being cross-developers to at least some extent.
I must be missing something fundamental here. I'm having a heckuva time trying to load files from subdirectories.

I had no problem saving a file with the filename
@:DEMO/IMG/PIX41.DAT
The file saved properly, and I was able to verify with Irfanview that the data saved was correct.

But, no matter what combination of slashes and colons I've used, I cannot get it to load that same file back into memory
DEMO/IMG/PIX40.DAT
DEMO/IMG/:PIX40.DAT
/DEMO/IMG/:PIX40.DAT
//DEMO/IMG/:PIX40.DAT
/:DEMO/:IMG/:PIX40.DAT
:/DEMO:/IMG:/PIX40.DAT (and all other combinations where the / and the : are switched from the above)

This has brought me to a complete halt for quite a while. I really need to be able to load files from subdirectories, not just save them. How come I can save but not load?

Which raises another question: why make it different from the commonly accepted syntax in use for the last 40 years?

Re: How To: Try It Now!

Posted: Fri Jul 14, 2023 5:09 pm
by kelli217
Would you believe that it's actually
:DEMO/IMG/PIX40.DAT

Re: How To: Try It Now!

Posted: Fri Jul 14, 2023 7:11 pm
by ahenry3068
Instead of using the directory path as part of the file name just
DOS "CD:DIR"