How to start

About Forums General Discussions How to start

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #985
    Mark
    Participant

    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

    #986
    8bit-Dude
    Keymaster

    Hi 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 3 months, 3 weeks ago by 8bit-Dude.
    #988
    Mark
    Participant

    This 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.
    #990
    Mark
    Participant

    Now, 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?

    #991
    Mark
    Participant

    also 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.

    #992
    8bit-Dude
    Keymaster

    Glad 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 3 months, 3 weeks ago by 8bit-Dude.
    #994
    Mark
    Participant
    #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?

    #995
    8bit-Dude
    Keymaster

    You can easily fix this problem!
    After initializing the BitmapMode, add the following line in your code:

    
    bmpToggle = 2;
    
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.