How To: Try It Now!

Announcements by the development team or forum staff.
deadhead
Posts: 2
Joined: Mon Oct 17, 2022 5:59 am

Re: How To: Try It Now

Post 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?
mwiedmann
Posts: 70
Joined: Fri Jan 20, 2023 2:21 am
Location: New York City

Re: How To: Try It Now

Post 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?
User avatar
desertfish
Posts: 1095
Joined: Tue Aug 25, 2020 8:27 pm
Location: Netherlands

Re: How To: Try It Now

Post 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?
User avatar
Cyber
Posts: 482
Joined: Mon Apr 27, 2020 7:36 am

Re: How To: Try It Now

Post 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.
TomXP411
Posts: 1781
Joined: Tue May 19, 2020 8:49 pm

Re: How To: Try It Now

Post 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
mwiedmann
Posts: 70
Joined: Fri Jan 20, 2023 2:21 am
Location: New York City

Re: How To: Try It Now

Post 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!
User avatar
Cyber
Posts: 482
Joined: Mon Apr 27, 2020 7:36 am

Re: How To: Try It Now

Post 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.
Ed Minchau
Posts: 503
Joined: Sat Jul 11, 2020 3:30 pm

Re: How To: Try It Now

Post 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?
kelli217
Posts: 531
Joined: Sun Jul 05, 2020 11:27 pm

Re: How To: Try It Now!

Post by kelli217 »

Would you believe that it's actually
:DEMO/IMG/PIX40.DAT
User avatar
ahenry3068
Posts: 1134
Joined: Tue Apr 04, 2023 9:57 pm

Re: How To: Try It Now!

Post by ahenry3068 »

Instead of using the directory path as part of the file name just
DOS "CD:DIR"
Post Reply