About › Forums › General Discussions › How to start
- This topic has 7 replies, 2 voices, and was last updated 2 years, 6 months ago by 8bit-Dude.
-
AuthorPosts
-
April 20, 2022 at 5:01 am #985MarkParticipant
Hello!
I wanted to echo another comment that was made, in that it isn’t clear how to start.
Still, in case help was offered I wanted to start my own thread.
It has been several months since I downloaded 8-bit unity. I compiled some of the examples and then tried to see if I could begin a project.
Since I dont have assets for say Apple platform, the first thing I tried to do was remove Apple as an output. It wasn’t clear how to do that.
Let’s start with the simplest of examples – my only output is Atari 8-bit. What is required to put together? What’s a simple hello world for that?
thanks
April 20, 2022 at 5:10 am #9868bit-DudeKeymasterHi Mark!
That’s correct, you cannot disable a platform currently.
Build scripts will be generated for all platforms, but you don’t need to worry about those.So Hello world for Atari 8bit:
Create a main.c file, and put typical hello world contents inside.
(unity.h header only should be required).Go to builder, and add this file in “general” > “code”.
Put “hello” in the disk name.
Press “Build Scripts”.
Then go to folder build and run the hello-atari.bat script
Lemme know if any of the above is unclear.
- This reply was modified 2 years, 7 months ago by 8bit-Dude.
April 22, 2022 at 2:30 am #988MarkParticipantThis post is for anyone else that may have similar questions.
In the project folder, I created a helloworld folder. In that I placed a helloworld.builder file as follows:
{
“format”: “8bit-Unity Project”,
“formatVersion”: 2,
“general”: {
“disk”: “helloworld”,
“code”: [
“projects/helloworld/src/helloworld.c”
],
“shared”: [],
“charmap”: [],
“tilesize”: “None”
},
“platform”: {
“Atari”: {
“music”: [],
“chunks”: [],
“diskSize”: “180KB”,
“crunchAssets”: “No”,
“networkDriver”: “IP65(TCP/UDP)”
}}
}I created a src subfolder, in that I created a helloworld.c as follows:
#include <cc65.h> #include "unity.h" #include <stdio.h> #include <string.h> char st[]={"hello world"}; int main(void) { // Reset screen clrscr(); printf("%s\n",st); while(1) { } return 1; }
At this point I received a screenshot which I’ve attached.
However, this is not what I was expecting. I was expecting a cool game like pac-man.
OK, I will adjustment my expectations.
I think I will be OK with writing in cc65, but the main thing is – I guess I need to learn what 8bit-unity is offering in terms of sdk….I’ll probably post more questions.
Attachments:
You must be logged in to view attached files.April 22, 2022 at 2:40 am #990MarkParticipantNow, first provided function I need to master is PrintStr
Here, I did attempt to use PrintStr initially and received nothing for my efforts.
This code:
#include <cc65.h>
#include “unity.h”int main(void)
{// Reset screen
clrscr();
PrintStr(“hello world\n”);while(1) {
}
return 1;
}Produce only a blank screen. Unlike above which printed the text.
What did I do wrong?
April 22, 2022 at 2:43 am #991MarkParticipantalso thanks for the help, I may or may not have any manners – but actually I hope to produce a game, and have fun doing so, thanks for your interesting project.
April 22, 2022 at 4:01 am #9928bit-DudeKeymasterGlad to see that you are making some progress, pacman is on the horizon! 🙂
To use PrintStr() you need to initialize the Hires Bitmap mode first!
Please check the file: projects/demos/src/demo-gfx.c
For a full list of API function in release 0.4, see: https://8bit-unity.com/?page_id=121
P.S: Please note that some functions got simplified (fewer args to save memory) in up-coming release 0.5 (in case you are using GitHub version). In that case, look-up /unity/unity.h
- This reply was modified 2 years, 7 months ago by 8bit-Dude.
April 26, 2022 at 1:41 am #994MarkParticipant#include <cc65.h> #include "unity.h" int main(void) { InitBitmap(); ClearBitmap(); ShowBitmap(); txtX = 15; txtY = 2; PrintStr("hello world\n"); while(1) { } return 1; }
This kind of belies the true progress I’ve made. I’ve gone into targets/atari looked at dli.s and vbi.s and gone through the documentation again.
I’ve played some RMT files, done through demo – and overall I like everything I see, it’s logical, well done, and could be very helpful. There is a “but” coming.
And I’ve put grubs on a real Atari. Therein lies a problem. If on an Atari 800XL, NTSC using XEP80-II as output, it just plain doesn’t work. That device has an HDMI converter that cannot handle frame flicker modes.
Luckily my system has a couple a/b switches to quickly switch out to a true s-video to s-video monitor mode. But while that mode does look “OK” – until I blink. When I blink I clearly see one frame, not the other. And be cause the flicker quite clearly occurs when I blink, the mode causes me to concentrate on my blinking – which drives me frankly mad.
I don’t know if this can be overcome. The emulator has frame blending that works, but is there any real atari output that frame blends? For me it needs to work on a real atari,and I’m not sure I ever would’ve used interpainter. Some people did, I guess – maybe not me.
still the music player and networking stuff and automatic disk creation, is a lot. Pity about the 160x200x9 mode. Does any known scan doubler, converter correctly do frame blending for a real atari?
April 28, 2022 at 11:47 am #9958bit-DudeKeymasterYou can easily fix this problem!
After initializing the BitmapMode, add the following line in your code:bmpToggle = 2;
-
AuthorPosts
- You must be logged in to reply to this topic.