Shop OBEX P1 Docs P2 Docs Learn Events
Catalina 2.6 - a FREE C compiler for the Propeller - The Final Frontier! - Page 12 — Parallax Forums

Catalina 2.6 - a FREE C compiler for the Propeller - The Final Frontier!

191012141520

Comments

  • Cluso99Cluso99 Posts: 18,069
    edited 2010-11-02 17:52
    RossH: You can edit the title. You need to go to the advanced section when editting to get to the extra bits.
  • RossHRossH Posts: 5,573
    edited 2010-11-02 18:07
    @Cluso,

    Are you sure? All I can seem to edit is the title of an individual post - not the title of the whole thread - for example, I have edited the title of this post to be "See what I mean?" - but I can't edit the title of the thread itself, which is still "Catalina 2.6 ... (etc) ..."

    Am I missing something?

    Ross.
  • jazzedjazzed Posts: 11,803
    edited 2010-11-02 18:20
    I was able to edit a title recently going advanced on the very first thread post.

    Using multiple threads does seem to be more effective for exposure though. For example, I couldn't help but notice all the Forth version threads that show up for example recently browsing that topic. This forum software has gotten more friendly and disaster has been averted it seems.
  • RossHRossH Posts: 5,573
    edited 2010-11-02 18:30
    Hi Jazzed,

    Thanks, but I tried that as well - no luck. This new forum software seems a bit quirky at times regarding what it will let you do or not do. For instance, sometimes when I log in I can't edit old my posts at all - other times I can.

    In any case, I think I agree that using a separate thread per release is more effective anyway.

    Ross.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2010-11-04 04:06
    Ok, I'm deep inside the Catalina Reference Manual.

    I see mention of the dracblade, and it seems that external ram chip can be made to do some clever tricks in C that I never even thought of!

    I'd like to port some programs over from Spin into Catalina and take advantage of all that memory. I see there is some code for keyboard and sd card. So - this is the design challenge:

    I'd like to replicate KyeDOS in C. But KyeDOS almost fills up the propeller chip, so I'm very interested in using external ram.

    Components:
    1) Keyboard object - load into a cog and interface via some known hub ram locations
    2) VGA object. The KyeDOS boot menu fills an 80x40 text display, and that is a two cog piece of code, currently mostly written in pasm
    3) SD card object. One or two cogs - I'm not sure. I can live with FAT16 but Kye's most recent Fat32 code does seem to cope with a wider range of SD card brands.
    4) Serial port object. Tim Moore wrote the 4 port in one cog code, and Pullmoll changed it to two ports and in doing so increased the buffer size. Code is almost entirely pasm.

    Why the above? Well, I think they are the minimum one needs for a 'hello world' without worrying too much about what you type 'hello' on, and what 'world' is displayed on. Then you can get straight on with coding.

    So - can this be done?

    First, I think there are enough cogs with maybe one or two spare.

    Looking through the catalina maunal, I see there is keyboard and sd card code. I'm not sure about serial port but I think that will be quite easy.

    The part that has me stumped is vga driver code. Does this exist in catalina, even if for a boring old two colour text display?

    If so, I'd like to see if it is possible to replicate KyeDOS in C. Any help here would be most appreciated.
  • RossHRossH Posts: 5,573
    edited 2010-11-04 05:37
    Hi Dr_Acula,

    I'm not familiar with KyeDos, but everything you describe is fairly easy in Catalina, since most of it is already built-in.

    VGA, mouse, keyboard and UNIX style file system access to an SD Card is already included. To use these with a DracBlade, go to the Catalina demos subdirectory and enter the command:
    catalina -lcx -x5 -M 128k -D DRACBLADE -D VGA hello_world.c
    
    The -lcx tells Catalina you want the version of the C library with extended file system support (even though the simple "hello world" demo program doesn't need it, and you could simply use -lc instead, or even -lci).

    The -x5 tells Catalina to use the LARGE XMM mode. Or you could use -x2 (SMALL XMM mode). You need one of these two options when using -lcx because that library is so large. If you instead used -lci or -lc, you could skip the -x option, and generate a normal LMM program that doesn't need any XMM at all.

    The -M 128k tells Catalina you have at least 128k RAM available. Or you could say -M 256k or -M 512k. Again, if you didn't use the extended library, you could skip this because the resulting program would not need XMM (it would fit into the normal 32k).

    The -D DRACBLADE tells Catalina to include pin assignments and memory access code suitable for the DracBlade.

    The -D VGA tells Catalina to use the VGA driver. A keyboard and mouse driver are also included (unless you specifically exlcude them).

    If you examine the resulting binary built using these options, you will see it is about 70kb - this is because we included an extended version of stdio with full ANSI file system support, and this makes the executable larger than can fit in normal Hub RAM (it isn't actually 70kb of program code, by the way - the first 32kb is the first phase loader, and the remainder is the second phase loader plus the application program - the actual program code may even be less than 32k, but because you specified XMM, the 2-phase loader is used by default. This is because in most cases the program would be larger than 32k). This file cannot be loaded using the normal Parallax loader. To load it you will need to either put it on an SD Card and load it with Catalyst (which knows how to deal with such files) or use the Payload XMM serial loader (which does too). All this is explained in the manual, but lets assume you want to use Payload. To build the XMM loader specific to the dracblade, go to the Catalina utilities directory and type in:
    build_all DRACBLADE
    
    Then you can load the program you just built using a command like:
    payload XMM ..\demos\hello_world
    
    Some further things to note if you want to emulate KyeDos:

    The ANSI C version of the standard file access library does not have directory management functions (since these are always platform dependent, whereas the other file functions are not) - but reading a directory is supported by the underlying DOSFS functions (assuming KyeDos needs this). A "create directory" function is probably the only function missing (I assume KyeDos would need this as well?).

    A 4 port serial object is not currently included (only a single port object, and it is accessed using stdin and stdout in place of the VGA and keyboard driver) - but if PullMoll's 4 port object is written in PASM it should be able to be turned into a Catalina plugin with a little work.
  • PaxiPaxi Posts: 10
    edited 2010-11-04 12:04
    Hey guys,
    I´m currently having a hard time trying to access a register with using C only with the Calatina Compiler.
    First of all: I haven´t got much experience in embedded C programmig and only did some programming on the Arduino Microcontroller, where I got quite a lot build in functions that eased my life.

    Well I want to write a pure C Gamepad driver. The code itself in SPIN is quite easy to understand (at least i think i get most of it^^) and i want to port it to C.

    First of all i just wanted to switch on the Debug LED but already failed on this one..
    Thats what i got so far:
    void main()
    {
    int *DIRA = NULL;
    int *OUTA = NULL;
    
    DIRA = (int*)0x1F6; //DIRA Register to set Direction State @0x1F6
    *DIRA = 0x1; //DebugLED uses Port1
    
    OUTA = (int*)0x1F4 //OUTA Register to set the defined Port to Output @0x1F4
    *OUTA = 1;  //Set Output HIGH (1)
    
    while(1) {}
    }
    

    Well i thought that´s it but looks like I´m wrong..
    Another problem would be if i start to program the Gamepad driver, i don´t know the adress of every instruction.
    I guess there is a better way of doing this and I´m thinking in the wrong direction. Thanks in advance
  • RossHRossH Posts: 5,573
    edited 2010-11-04 17:06
    Paxi wrote: »
    Hey guys,
    I´m currently having a hard time trying to access a register with using C only with the Calatina Compiler.
    First of all: I haven´t got much experience in embedded C programmig and only did some programming on the Arduino Microcontroller, where I got quite a lot build in functions that eased my life.

    Well I want to write a pure C Gamepad driver. The code itself in SPIN is quite easy to understand (at least i think i get most of it^^) and i want to port it to C.

    First of all i just wanted to switch on the Debug LED but already failed on this one..
    Thats what i got so far:
    void main()
    {
    int *DIRA = NULL;
    int *OUTA = NULL;
    
    DIRA = (int*)0x1F6; //DIRA Register to set Direction State @0x1F6
    *DIRA = 0x1; //DebugLED uses Port1
    
    OUTA = (int*)0x1F4 //OUTA Register to set the defined Port to Output @0x1F4
    *OUTA = 1;  //Set Output HIGH (1)
    
    while(1) {}
    }
    
    Well i thought that´s it but looks like I´m wrong..
    Another problem would be if i start to program the Gamepad driver, i don´t know the adress of every instruction.
    I guess there is a better way of doing this and I´m thinking in the wrong direction. Thanks in advance

    Hi Paxi,

    In Catalina, pointers do not point to cog RAM, and therefore the special registers cannot be accessed via a pointer in the way you are attempting to do. Instead, Catalina uses a more "function-like" syntax to access the special registers.

    This is documented in the Catalina Reference Manual (pp 28) and also in the header file catalina_cog.h. For example, to get the value of the INA register in Catalina, you would say something like:
    #include <catalina_cog.h>
    
    void main() {
       unsigned reg;  
       reg = _ina();
    }
    
    There are more examples in the Catalina\demos subdirectory. A complete example for flashing a LED is given in test_leds.c

    Ross.

    P.S.

    If you plan to use both ICC and Catalina, there is another header file (called catalina_icc.h) that defines a compromise syntax between what Catalina uses and what ICC uses - it would allow you to say something like
    #include <catalina_icc.h>
    
    void main() {
       unsigned reg;  
       reg = get_ina();
    }
    
    This code would then compile under both Catalina and ICC. However, if you don't need to make your code portable, just stick to the Catalina syntax.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2010-11-04 22:29
    Great news RossH. I'm off to start coding a demo program. I may be away for some time...
  • PaxiPaxi Posts: 10
    edited 2010-11-05 02:38
    Hi RossH,
    thanks for the quick reply. You really did an amazing job with the compiler and the support rocks as well according to this thread!
    I should had a better look at the manual before to see how to do this..
    But I´m curious, what exactly does these functions do to acces the special registers?
    Is there a catalina_cog.c file anywhere to have a closer look or some kind of asm file? I would be interested in how the functions work.
    And beloging to asm, is there any way of doing some kind of inline asm if ever needed?
    Thanks so far, I´ll report back if i got further with the driver and if there are some questions left.
  • RossHRossH Posts: 5,573
    edited 2010-11-05 04:41
    Hi Paxi,

    The Catalina functions simply access the relevant cog locations - the function code is available in the appropriate library subdirectory - e.g. Catalina\source\lib\catalina\ina.e contains the following LMM PASM code:
    C__ina
     mov r0, INA
     jmp #RETN
    
    Within LMM PASM I access the special cog registers directly, and return it as the result of the C _ina function. This is not possible directly from C - even using pointers.

    While this may look a little inefficient, when you use the Catalina Optimizer, this C function call will be automatically 'inlined' wherever it appears into a single PASM instruction -i.e. instead of:
    jmp #CALA
    long @C__ina
    
    you would simply see
    mov r0, INA
    
    ... which is exactly as you would probably code it yourself in hand-crafted LMM PASM.
  • Nick MuellerNick Mueller Posts: 815
    edited 2010-11-05 13:03
    Ross, what's wrong with:
    sizeof(sometype);

    Nick
  • RossHRossH Posts: 5,573
    edited 2010-11-05 16:11
    Ross, what's wrong with:
    sizeof(sometype);

    Nick

    Hi Nick. Nothing as far as I know - are you having a problem with it? It works ok in all the cases I have tried.

    Ross.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2010-11-05 17:49
    Hi Ross,

    See below - I'm getting an error. I downloaded the latest catalina version, but does this include the latest homespun version or do I need that too? Or is there some other reason for the error?
    C:\Program Files\Catalina>use_catalina
    
       ===================
       SETTING UP CATALINA
       ===================
    
    
    CATALINA_DEFINE  = [default]
    CATALINA_INCLUDE = [default]
    CATALINA_LIBRARY = [default]
    CATALINA_TARGET  = [default]
    CATALINA_LCCOPT  = [default]
    CATALINA_TEMPDIR = [default]
    LCCDIR           = [default]
    
    C:\Program Files\Catalina>cd demos
    
    C:\Program Files\Catalina\demos>catalina -lcx -x5 -M 128k -D DRACBLADE -D VGA hello_world.c
    Catalina Compiler 2.7
    Homespun Spin Compiler 0.27
    parsing C:\Program Files\Catalina\target\xmm_default.spin
    parsing C:\Program Files\Catalina\target\Catalina_HUB_XMM_Loader.spin
    parsing C:\Program Files\Catalina\target\Catalina_Common.spin
    Error: Catalina_HUB_XMM_Loader.spin (1433, 7): Expected instruction mnemonic
    ERROR : DRACBLADE XMM SUPPORT NOT IMPLEMENTED YET
          ^
    Homespun Spin Compiler 0.27
    parsing C:\Program Files\Catalina\target\Catalina.spin
    compiling Catalina.spin
    Error: Catalina.spin (289, 8): Unknown symbol C_arg_setup
     long @C_arg_setup
           ^
    
    C:\Program Files\Catalina\demos>
    
  • RossHRossH Posts: 5,573
    edited 2010-11-05 18:43
    Hi Dr_Acula,

    Somehow you are picking up an old version of the Catalina libraries and target files. The message about XMM not being supported on the DRACBLADE was from quite a few versions ago (to remind me to implement it!) and the function C_arg_setup was introduced in release 2.6.

    My best guess is that you have not actually installed 2.6, but instead installed 2.7 over a previous version. Release 2.7 is a patch release that will work only if applied to an existing 2.6 release.

    Does this sound correct? If so, you will need to first install 2.6, then re-install the 2.7 patch.

    Ross.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2010-11-05 19:56
    Ah, that would explain things.

    I'm missing something obvious here, but where do I get catalina v2.6?

    See attached screen capture - there is the big "download" button but this seems to be the patch, not the actual program? Is v2.6 included in the patch?

    Sorry for such a dumb question!
    710 x 623 - 90K
  • RossHRossH Posts: 5,573
    edited 2010-11-05 20:06
    Hi Dr_Acula,

    Just click on the "View all files" button (next to the big green button) then click on the "releases" folder near the bottom of the list of files, then the "2.6" folder, then the "Catalina_2.6_Win32.zip" file.

    Ross.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2010-11-05 20:17
    Ok, got that. Thanks++ for the real time support!

    Next thing, I compiled the hello_world.

    Now I have a program "hello_world.binary" on the sd card.

    KyeDOS can see this, and indeed, can run it, but it crashes.

    So I'm confused about what to do next. I see mention of Catalyst. In the manual on page 51 it says "All filenames must be entered in DOS 8.3 format"

    But for a start, this "hello_world.binary" is not 8 nor 3.

    Do I need to change this? Or do I need another type of bootloader? Actually, more to the point, does this 89.7k binary file contain its own internal loader (like a auto unzipping zip file) or does it need a special program to run it?
  • RossHRossH Posts: 5,573
    edited 2010-11-05 20:21
    Hi Dr_Acula,

    If you compiled it with all the options I listed earlier, then it is not a normal ".binary" - check the size and you'll probably see it is over 32kb. Only Catalyst and Payload can load such programs. I gave details on how to load it below the explanation of the various command options.

    If instead you want to compile it as a simple LMM program (which wont have access to XMM, but any loader can load) then you can use a much simple command, such as:
    catalina -D DRACBLADE -D VGA hello_world.c -lci
    
  • RossHRossH Posts: 5,573
    edited 2010-11-05 20:23
    Dr_Acula,

    As to Catalyst and 8.3 filenames, when you copy hello_world.binary to your SD card, simply rename it as hello.bin

    Ross.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2010-11-05 20:28
    I'm working off post #337 but I seem to have got stuck. Catalyst looks like a simple version of KyeDOS. Presumably I need to get this onto the eeprom, and for that I'm looking for a "main.spin" in the sub directories so I can compile it with the propeller tool.

    Once I get this working I'm going to wrap all this up into an IDE, along with a C editor (which I already have for BDS C) and make the whole compile/download a single keypress (probably with an xmodem transfer of the data because xmodem is working on KyeDOS), but for the moment, I'd very much like to get a handle on each step.

    So, I have a large binary file sitting on an sd card and it is not named with an 8.3 file format (I did rename it to "HELLO.BIN" but no luck).

    So how do I get either payload or catalyst running on the propeller, in order to load these oversized binary files?

    Addit: I followed the step on post #337 in the utilities directory buildall dracblade and that created a file XMM.BINARY

    Is this part of the solution?
  • RossHRossH Posts: 5,573
    edited 2010-11-05 20:36
    Dr_Acula,

    I don't know KyeDos, but Catalyst is a fairly simple SD Card loader. It's main advantage is that it allows you to load Catalina XMM programs straight off the SD card using a simple command line - and pass arguments to the program when it starts execution.

    To compile Catalyst, just go to the Catalina\catalyst folder and type:
    build_all DRACBLADE
    

    Then copy all the files in the Catalina\catalyst\bin subdirectory to an SD Card, and load the main program Catalyst.binary into EEPROM.

    Ross.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2010-11-05 20:43
    Ah, I missed the bit about copying all the other files to the sd card.

    Ok, compiling catalyst I get an error:
    C:\Program Files\catalina>use_catalina
    
       ===================
       SETTING UP CATALINA
       ===================
    
    
    CATALINA_DEFINE  = dracblade
    CATALINA_INCLUDE = [default]
    CATALINA_LIBRARY = [default]
    CATALINA_TARGET  = [default]
    CATALINA_LCCOPT  = [default]
    CATALINA_TEMPDIR = [default]
    LCCDIR           = [default]
    
    C:\Program Files\catalina>cd catalyst
    
    C:\Program Files\catalina\catalyst>build_all dracblade
    
    ERROR: Environment variable CATALINA_DEFINE is set (to dracblade        )
    
    You must undefine this environment variable before using this batch
    file, and instead specify the target and options on the command line.
    
    
     ====
     Done
     ====
    
    
    C:\Program Files\catalina\catalyst>
    
  • RossHRossH Posts: 5,573
    edited 2010-11-05 20:54
    Hi Dr_Acula,

    You have a couple of problems here. First is that you seem to be using dracblade instead of DRACBLADE - case is important in C!

    The second is that (as the message says) the environment variable is set, and this batch file doesn't like that (it wants to set it itself).

    Just enter the command:
    set CATALINA_DEFINE=
    
    or
    unset CATALINA_DEFINE
    
    and try again.

    Ross.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2010-11-05 23:24
    Ah, thanks++.

    Lots of things worked this time.
    C:\Program Files\catalina>use_catalina
    
       ===================
       SETTING UP CATALINA
       ===================
    
    
    CATALINA_DEFINE  = [default]
    CATALINA_INCLUDE = [default]
    CATALINA_LIBRARY = [default]
    CATALINA_TARGET  = [default]
    CATALINA_LCCOPT  = [default]
    CATALINA_TEMPDIR = [default]
    LCCDIR           = [default]
    
    C:\Program Files\catalina>cd catalyst
    
    C:\Program Files\catalina\catalyst>unset CATALINA_DEFINE
    
    
    C:\Program Files\catalina\catalyst>build_all DRACBLADE
    
     ================================
     Building all Catalyst components
     ================================
    
            1 file(s) copied.
    
       =============
       Building Core
       =============
    
    Homespun Spin Compiler 0.27
    parsing Catalyst.spin
    parsing C:\Program Files\Catalina\target\Catalina_Common.spin
    parsing C:\Program Files\Catalina\target\Catalyst_XMM_SD_Loader.spin
    parsing C:\Program Files\Catalina\target\Catalina_Cogstore.spin
    parsing C:\Program Files\Catalina\target\Catalyst_HMI.spin
    parsing C:\Program Files\Catalina\target\Catalina_HMI_Plugin_HiRes_Vga_No_Mouse.spin
    parsing C:\Program Files\Catalina\target\Catalina_comboKeyboard.spin
    parsing C:\Program Files\Catalina\target\Catalina_VGA_HiRes_Text.spin
    parsing C:\Program Files\Catalina\target\Catalina_FATEngine.spin
    parsing C:\Program Files\Catalina\target\Catalina_SD_Plugin.spin
    parsing C:\Program Files\Catalina\target\Catalina_SIO_Plugin.spin
    compiling Catalyst.spin
    compiling Catalyst_XMM_SD_Loader.spin
    compiling Catalina_Cogstore.spin
    compiling Catalyst_HMI.spin
    compiling Catalina_HMI_Plugin_HiRes_Vga_No_Mouse.spin
    compiling Catalina_comboKeyboard.spin
    compiling Catalina_VGA_HiRes_Text.spin
    compiling Catalina_FATEngine.spin
    compiling Catalina_SD_Plugin.spin
    compiling Catalina_SIO_Plugin.spin
    compiling Catalina_Common.spin
    writing Catalyst.binary
    Homespun Spin Compiler 0.27
    parsing mkdir.spin
    parsing C:\Program Files\Catalina\target\Catalina_Common.spin
    parsing C:\Program Files\Catalina\target\Catalina_FATEngine.spin
    parsing C:\Program Files\Catalina\target\Catalina_stringEngine.spin
    parsing C:\Program Files\Catalina\target\Catalyst_Arguments.spin
    parsing C:\Program Files\Catalina\target\Catalyst_HMI.spin
    parsing C:\Program Files\Catalina\target\Catalina_HMI_Plugin_HiRes_Vga_No_Mouse.spin
    parsing C:\Program Files\Catalina\target\Catalina_comboKeyboard.spin
    parsing C:\Program Files\Catalina\target\Catalina_VGA_HiRes_Text.spin
    compiling mkdir.spin
    compiling Catalina_FATEngine.spin
    compiling Catalina_stringEngine.spin
    compiling Catalyst_Arguments.spin
    compiling Catalyst_HMI.spin
    compiling Catalina_HMI_Plugin_HiRes_Vga_No_Mouse.spin
    compiling Catalina_comboKeyboard.spin
    compiling Catalina_VGA_HiRes_Text.spin
    compiling Catalina_Common.spin
    writing mkdir.binary
    Homespun Spin Compiler 0.27
    parsing rmdir.spin
    parsing C:\Program Files\Catalina\target\Catalina_Common.spin
    parsing C:\Program Files\Catalina\target\Catalina_FATEngine.spin
    parsing C:\Program Files\Catalina\target\Catalina_stringEngine.spin
    parsing C:\Program Files\Catalina\target\Catalyst_Arguments.spin
    parsing C:\Program Files\Catalina\target\Catalyst_HMI.spin
    parsing C:\Program Files\Catalina\target\Catalina_HMI_Plugin_HiRes_Vga_No_Mouse.spin
    parsing C:\Program Files\Catalina\target\Catalina_comboKeyboard.spin
    parsing C:\Program Files\Catalina\target\Catalina_VGA_HiRes_Text.spin
    compiling rmdir.spin
    compiling Catalina_FATEngine.spin
    compiling Catalina_stringEngine.spin
    compiling Catalyst_Arguments.spin
    compiling Catalyst_HMI.spin
    compiling Catalina_HMI_Plugin_HiRes_Vga_No_Mouse.spin
    compiling Catalina_comboKeyboard.spin
    compiling Catalina_VGA_HiRes_Text.spin
    compiling Catalina_Common.spin
    writing rmdir.binary
    Homespun Spin Compiler 0.27
    parsing ls.spin
    parsing C:\Program Files\Catalina\target\Catalina_Common.spin
    parsing C:\Program Files\Catalina\target\Catalina_FATEngine.spin
    parsing C:\Program Files\Catalina\target\Catalina_stringEngine.spin
    parsing C:\Program Files\Catalina\target\Catalyst_Arguments.spin
    parsing C:\Program Files\Catalina\target\Catalyst_HMI.spin
    parsing C:\Program Files\Catalina\target\Catalina_HMI_Plugin_HiRes_Vga_No_Mouse.spin
    parsing C:\Program Files\Catalina\target\Catalina_comboKeyboard.spin
    parsing C:\Program Files\Catalina\target\Catalina_VGA_HiRes_Text.spin
    compiling ls.spin
    compiling Catalina_FATEngine.spin
    compiling Catalina_stringEngine.spin
    compiling Catalyst_Arguments.spin
    compiling Catalyst_HMI.spin
    compiling Catalina_HMI_Plugin_HiRes_Vga_No_Mouse.spin
    compiling Catalina_comboKeyboard.spin
    compiling Catalina_VGA_HiRes_Text.spin
    compiling Catalina_Common.spin
    writing ls.binary
    Homespun Spin Compiler 0.27
    parsing rm.spin
    parsing C:\Program Files\Catalina\target\Catalina_Common.spin
    parsing C:\Program Files\Catalina\target\Catalina_FATEngine.spin
    parsing C:\Program Files\Catalina\target\Catalina_stringEngine.spin
    parsing C:\Program Files\Catalina\target\Catalyst_Arguments.spin
    parsing C:\Program Files\Catalina\target\Catalyst_HMI.spin
    parsing C:\Program Files\Catalina\target\Catalina_HMI_Plugin_HiRes_Vga_No_Mouse.spin
    parsing C:\Program Files\Catalina\target\Catalina_comboKeyboard.spin
    parsing C:\Program Files\Catalina\target\Catalina_VGA_HiRes_Text.spin
    compiling rm.spin
    compiling Catalina_FATEngine.spin
    compiling Catalina_stringEngine.spin
    compiling Catalyst_Arguments.spin
    compiling Catalyst_HMI.spin
    compiling Catalina_HMI_Plugin_HiRes_Vga_No_Mouse.spin
    compiling Catalina_comboKeyboard.spin
    compiling Catalina_VGA_HiRes_Text.spin
    compiling Catalina_Common.spin
    writing rm.binary
    Homespun Spin Compiler 0.27
    parsing cp.spin
    parsing C:\Program Files\Catalina\target\Catalina_Common.spin
    parsing C:\Program Files\Catalina\target\Catalina_FATEngine.spin
    parsing C:\Program Files\Catalina\target\Catalina_stringEngine.spin
    parsing C:\Program Files\Catalina\target\Catalyst_Arguments.spin
    parsing C:\Program Files\Catalina\target\Catalyst_HMI.spin
    parsing C:\Program Files\Catalina\target\Catalina_HMI_Plugin_HiRes_Vga_No_Mouse.spin
    parsing C:\Program Files\Catalina\target\Catalina_comboKeyboard.spin
    parsing C:\Program Files\Catalina\target\Catalina_VGA_HiRes_Text.spin
    compiling cp.spin
    compiling Catalina_FATEngine.spin
    compiling Catalina_stringEngine.spin
    compiling Catalyst_Arguments.spin
    compiling Catalyst_HMI.spin
    compiling Catalina_HMI_Plugin_HiRes_Vga_No_Mouse.spin
    compiling Catalina_comboKeyboard.spin
    compiling Catalina_VGA_HiRes_Text.spin
    compiling Catalina_Common.spin
    writing cp.binary
    Homespun Spin Compiler 0.27
    parsing mv.spin
    parsing C:\Program Files\Catalina\target\Catalina_Common.spin
    parsing C:\Program Files\Catalina\target\Catalina_FATEngine.spin
    parsing C:\Program Files\Catalina\target\Catalina_stringEngine.spin
    parsing C:\Program Files\Catalina\target\Catalyst_Arguments.spin
    parsing C:\Program Files\Catalina\target\Catalyst_HMI.spin
    parsing C:\Program Files\Catalina\target\Catalina_HMI_Plugin_HiRes_Vga_No_Mouse.spin
    parsing C:\Program Files\Catalina\target\Catalina_comboKeyboard.spin
    parsing C:\Program Files\Catalina\target\Catalina_VGA_HiRes_Text.spin
    compiling mv.spin
    compiling Catalina_FATEngine.spin
    compiling Catalina_stringEngine.spin
    compiling Catalyst_Arguments.spin
    compiling Catalyst_HMI.spin
    compiling Catalina_HMI_Plugin_HiRes_Vga_No_Mouse.spin
    compiling Catalina_comboKeyboard.spin
    compiling Catalina_VGA_HiRes_Text.spin
    compiling Catalina_Common.spin
    writing mv.binary
    
    
    C:\Program Files\catalina\catalyst\core>copy Catalyst.binary "C:\Program Files\Catalina"\catalyst\bin\catalyst.bin
            1 file(s) copied.
    
    C:\Program Files\catalina\catalyst\core>copy mv.binary "C:\Program Files\Catalina"\catalyst\bin\mv.bin
            1 file(s) copied.
    
    C:\Program Files\catalina\catalyst\core>copy cp.binary "C:\Program Files\Catalina"\catalyst\bin\cp.bin
            1 file(s) copied.
    
    C:\Program Files\catalina\catalyst\core>copy ls.binary "C:\Program Files\Catalina"\catalyst\bin\ls.bin
            1 file(s) copied.
    
    C:\Program Files\catalina\catalyst\core>copy rm.binary "C:\Program Files\Catalina"\catalyst\bin\rm.bin
            1 file(s) copied.
    
    C:\Program Files\catalina\catalyst\core>copy rmdir.binary "C:\Program Files\Catalina"\catalyst\bin\rmdir.bin
            1 file(s) copied.
    
    C:\Program Files\catalina\catalyst\core>copy mkdir.binary "C:\Program Files\Catalina"\catalyst\bin\mkdir.bin
            1 file(s) copied.
    
    C:\Program Files\catalina\catalyst\core>cd ..
    
    C:\Program Files\catalina\catalyst>cd xvi-2.47
    
    C:\Program Files\catalina\catalyst\xvi-2.47>call build_all DRACBLADE
    
       ============
       Building xvi
       ============
    
    'make' is not recognized as an internal or external command,
    operable program or batch file.
    'make' is not recognized as an internal or external command,
    operable program or batch file.
    
    
    C:\Program Files\catalina\catalyst\xvi-2.47>copy src\help.xvi "C:\Program Files\Catalina"\catalyst\bin\
            1 file(s) copied.
    
    C:\Program Files\catalina\catalyst\xvi-2.47>copy src\xvi.binary "C:\Program Files\Catalina"\catalyst\bin\vi.bin
    The system cannot find the file specified.
    
       ==================
       Building Pascal P5
       ==================
    
    Catalina Compiler 2.6
    catalina_pcom.c:
    ..\ptoc\paslib.c:
    ..\ptoc\set.c:
    ..\ptoc\io.c:
    Homespun Spin Compiler 0.27
    parsing C:\Program Files\Catalina\target\xmm_default.spin
    parsing C:\Program Files\Catalina\target\Catalina_HUB_XMM_Loader.spin
    parsing C:\Program Files\Catalina\target\Catalina_Common.spin
    parsing C:\Program Files\Catalina\target\Catalina_XMM.spin
    parsing C:\Program Files\Catalina\target\Catalina_Cogstore.spin
    parsing C:\Program Files\Catalina\target\Catalina_HMI_Plugin_HiRes_Vga_No_Mouse.spin
    parsing C:\Program Files\Catalina\target\Catalina_comboKeyboard.spin
    parsing C:\Program Files\Catalina\target\Catalina_VGA_HiRes_Text.spin
    parsing C:\Program Files\Catalina\target\Catalina_Float32_A_Plugin.spin
    parsing C:\Program Files\Catalina\target\Catalina_SD_Plugin.spin
    compiling xmm_default.spin
    compiling Catalina_HUB_XMM_Loader.spin
    compiling Catalina_XMM.spin
    compiling Catalina_Cogstore.spin
    compiling Catalina_HMI_Plugin_HiRes_Vga_No_Mouse.spin
    compiling Catalina_comboKeyboard.spin
    compiling Catalina_VGA_HiRes_Text.spin
    compiling Catalina_Float32_A_Plugin.spin
    compiling Catalina_SD_Plugin.spin
    compiling Catalina_Common.spin
    writing C:\Program Files\Catalina\target\xmm_default.eeprom
    Homespun Spin Compiler 0.27
    parsing C:\Program Files\Catalina\target\Catalina.spin
    compiling Catalina.spin
    writing pcom.binary
    renaming output file from pcom.binary to pcom_temp.binary
    combining target and program to pcom.binary
    Catalina Compiler 2.6
    catalina_pint.c:
    ..\ptoc\paslib.c:
    ..\ptoc\set.c:
    ..\ptoc\io.c:
    Homespun Spin Compiler 0.27
    parsing C:\Program Files\Catalina\target\xmm_default.spin
    parsing C:\Program Files\Catalina\target\Catalina_HUB_XMM_Loader.spin
    parsing C:\Program Files\Catalina\target\Catalina_Common.spin
    parsing C:\Program Files\Catalina\target\Catalina_XMM.spin
    parsing C:\Program Files\Catalina\target\Catalina_Cogstore.spin
    parsing C:\Program Files\Catalina\target\Catalina_HMI_Plugin_HiRes_Vga_No_Mouse.spin
    parsing C:\Program Files\Catalina\target\Catalina_comboKeyboard.spin
    parsing C:\Program Files\Catalina\target\Catalina_VGA_HiRes_Text.spin
    parsing C:\Program Files\Catalina\target\Catalina_Float32_A_Plugin.spin
    parsing C:\Program Files\Catalina\target\Catalina_SD_Plugin.spin
    compiling xmm_default.spin
    compiling Catalina_HUB_XMM_Loader.spin
    compiling Catalina_XMM.spin
    compiling Catalina_Cogstore.spin
    compiling Catalina_HMI_Plugin_HiRes_Vga_No_Mouse.spin
    compiling Catalina_comboKeyboard.spin
    compiling Catalina_VGA_HiRes_Text.spin
    compiling Catalina_Float32_A_Plugin.spin
    compiling Catalina_SD_Plugin.spin
    compiling Catalina_Common.spin
    writing C:\Program Files\Catalina\target\xmm_default.eeprom
    Homespun Spin Compiler 0.27
    parsing C:\Program Files\Catalina\target\Catalina.spin
    compiling Catalina.spin
    writing pint.binary
    renaming output file from pint.binary to pint_temp.binary
    combining target and program to pint.binary
    
    
    C:\Program Files\catalina\catalyst\pascal\p5_c>copy pcom.binary "C:\Program Files\Catalina"\catalyst\bin\pcom.bin
            1 file(s) copied.
    
    C:\Program Files\catalina\catalyst\pascal\p5_c>copy pint.binary "C:\Program Files\Catalina"\catalyst\bin\pint.bin
            1 file(s) copied.
    
    C:\Program Files\catalina\catalyst\pascal\p5_c>copy *.pas "C:\Program Files\Catalina"\catalyst\bin\
    basics.pas
    hello.pas
    match.pas
    roman.pas
    startrek.pas
            5 file(s) copied.
    
    C:\Program Files\catalina\catalyst\pascal\p5_c>copy *.p5 "C:\Program Files\Catalina"\catalyst\bin\
    basics.p5
    startrek.p5
            2 file(s) copied.
    
       =============
       Building jzip
       =============
    
    'make' is not recognized as an internal or external command,
    operable program or batch file.
    'make' is not recognized as an internal or external command,
    operable program or batch file.
    
    
    C:\Program Files\catalina\catalyst\jzip>copy jzip.binary "C:\Program Files\Catalina"\catalyst\bin\jzip.bin
    The system cannot find the file specified.
    
    C:\Program Files\catalina\catalyst\jzip>copy zork1.dat "C:\Program Files\Catalina"\catalyst\bin\
            1 file(s) copied.
    
    C:\Program Files\catalina\catalyst\jzip>copy zork2.dat "C:\Program Files\Catalina"\catalyst\bin\
            1 file(s) copied.
    
    C:\Program Files\catalina\catalyst\jzip>copy zork3.dat "C:\Program Files\Catalina"\catalyst\bin\
            1 file(s) copied.
    
       ====================
       Building Dumbo Basic
       ====================
    
    Catalina Compiler 2.6
    dumbo_basic.c:
    tokenizer.c:
    basic.c:
    Homespun Spin Compiler 0.27
    parsing C:\Program Files\Catalina\target\xmm_default.spin
    parsing C:\Program Files\Catalina\target\Catalina_HUB_XMM_Loader.spin
    parsing C:\Program Files\Catalina\target\Catalina_Common.spin
    parsing C:\Program Files\Catalina\target\Catalina_XMM.spin
    parsing C:\Program Files\Catalina\target\Catalina_Cogstore.spin
    parsing C:\Program Files\Catalina\target\Catalina_HMI_Plugin_HiRes_Vga_No_Mouse.spin
    parsing C:\Program Files\Catalina\target\Catalina_comboKeyboard.spin
    parsing C:\Program Files\Catalina\target\Catalina_VGA_HiRes_Text.spin
    parsing C:\Program Files\Catalina\target\Catalina_Float32_A_Plugin.spin
    parsing C:\Program Files\Catalina\target\Catalina_RTC_Plugin.spin
    parsing C:\Program Files\Catalina\target\Catalina_SD_Plugin.spin
    compiling xmm_default.spin
    compiling Catalina_HUB_XMM_Loader.spin
    compiling Catalina_XMM.spin
    compiling Catalina_Cogstore.spin
    compiling Catalina_HMI_Plugin_HiRes_Vga_No_Mouse.spin
    compiling Catalina_comboKeyboard.spin
    compiling Catalina_VGA_HiRes_Text.spin
    compiling Catalina_Float32_A_Plugin.spin
    compiling Catalina_RTC_Plugin.spin
    compiling Catalina_SD_Plugin.spin
    compiling Catalina_Common.spin
    writing C:\Program Files\Catalina\target\xmm_default.eeprom
    Homespun Spin Compiler 0.27
    parsing C:\Program Files\Catalina\target\Catalina.spin
    compiling Catalina.spin
    writing dbasic.binary
    renaming output file from dbasic.binary to dbasic_temp.binary
    combining target and program to dbasic.binary
    
    
    C:\Program Files\catalina\catalyst\dumbo_basic>copy dbasic.binary "C:\Program Files\Catalina"\catalyst\bin\dbasic.bin
            1 file(s) copied.
    
    C:\Program Files\catalina\catalyst\dumbo_basic>copy startrek.bas "C:\Program Files\Catalina"\catalyst\bin\
            1 file(s) copied.
    
    C:\Program Files\catalina\catalyst\dumbo_basic>copy UT-trek.bas "C:\Program Files\Catalina"\catalyst\bin\
            1 file(s) copied.
    
    C:\Program Files\catalina\catalyst\dumbo_basic>copy trek15.bas "C:\Program Files\Catalina"\catalyst\bin\
            1 file(s) copied.
    
    C:\Program Files\catalina\catalyst\dumbo_basic>copy eliza.bas "C:\Program Files\Catalina"\catalyst\bin\
            1 file(s) copied.
    
       =========================
       Building Super Start Trek
       =========================
    
    Catalina Compiler 2.6
    sst.c:
    ai.c:
    battle.c:
    catalina.c:
    events.c:
    finish.c:
    moving.c:
    planets.c:
    reports.c:
    setup.c:
    Homespun Spin Compiler 0.27
    parsing C:\Program Files\Catalina\target\xmm_default.spin
    parsing C:\Program Files\Catalina\target\Catalina_HUB_XMM_Loader.spin
    parsing C:\Program Files\Catalina\target\Catalina_Common.spin
    parsing C:\Program Files\Catalina\target\Catalina_XMM.spin
    parsing C:\Program Files\Catalina\target\Catalina_Cogstore.spin
    parsing C:\Program Files\Catalina\target\Catalina_HMI_Plugin_HiRes_Vga_No_Mouse.spin
    parsing C:\Program Files\Catalina\target\Catalina_comboKeyboard.spin
    parsing C:\Program Files\Catalina\target\Catalina_VGA_HiRes_Text.spin
    parsing C:\Program Files\Catalina\target\Catalina_Float32_A_Plugin.spin
    parsing C:\Program Files\Catalina\target\Catalina_RTC_Plugin.spin
    parsing C:\Program Files\Catalina\target\Catalina_SD_Plugin.spin
    compiling xmm_default.spin
    compiling Catalina_HUB_XMM_Loader.spin
    compiling Catalina_XMM.spin
    compiling Catalina_Cogstore.spin
    compiling Catalina_HMI_Plugin_HiRes_Vga_No_Mouse.spin
    compiling Catalina_comboKeyboard.spin
    compiling Catalina_VGA_HiRes_Text.spin
    compiling Catalina_Float32_A_Plugin.spin
    compiling Catalina_RTC_Plugin.spin
    compiling Catalina_SD_Plugin.spin
    compiling Catalina_Common.spin
    writing C:\Program Files\Catalina\target\xmm_default.eeprom
    Homespun Spin Compiler 0.27
    parsing C:\Program Files\Catalina\target\Catalina.spin
    compiling Catalina.spin
    writing sst.binary
    renaming output file from sst.binary to sst_temp.binary
    combining target and program to sst.binary
    
    
    C:\Program Files\catalina\catalyst\sst>copy sst.binary "C:\Program Files\Catalina"\catalyst\bin\sst.bin
            1 file(s) copied.
    
    C:\Program Files\catalina\catalyst\sst>copy sst.doc "C:\Program Files\Catalina"\catalyst\bin\
            1 file(s) copied.
    
       ============
       Building Lua
       ============
    
    'make' is not recognized as an internal or external command,
    operable program or batch file.
    'make' is not recognized as an internal or external command,
    operable program or batch file.
    
    
    C:\Program Files\catalina\catalyst\lua-5.1.4>copy src\lua.binary "C:\Program Files\Catalina"\catalyst\bin\lua.bin
    The system cannot find the file specified.
    
    C:\Program Files\catalina\catalyst\lua-5.1.4>copy src\luac.binary "C:\Program Files\Catalina"\catalyst\bin\luac.bin
    The system cannot find the file specified.
    
    C:\Program Files\catalina\catalyst\lua-5.1.4>copy test\hello.lua "C:\Program Files\Catalina"\catalyst\bin\hello.lua
            1 file(s) copied.
    
    C:\Program Files\catalina\catalyst\lua-5.1.4>copy test\factorial.lua "C:\Program Files\Catalina"\catalyst\bin\fact.lua
            1 file(s) copied.
    
    C:\Program Files\catalina\catalyst\lua-5.1.4>copy test\sort.lua "C:\Program Files\Catalina"\catalyst\bin\sort.lua
            1 file(s) copied.
    
    C:\Program Files\catalina\catalyst\lua-5.1.4>copy test\fib.lua "C:\Program Files\Catalina"\catalyst\bin\fib.lua
            1 file(s) copied.
    
     ====
     Done
     ====
    
    
    C:\Program Files\catalina\catalyst>
    
  • RossHRossH Posts: 5,573
    edited 2010-11-05 23:38
    Dr_Acula,

    Not everything worked - it appears you don't have 'make' installed. You don't need this for Catalyst itself (or to run your "hello world" program) but you will need it if you want to run some of the cool Catalyst demo programs. Most of them are downloaded straight from the net, and nearly all such programs use 'make' as their build tool.

    The best way to get 'make' is to install the MinGW and MSYS tools (make is included). Details are in "Building Catalina" section of the Catalina reference manual (you're not building Catalina, but you are building Catalyst) -basically you need to download and install them from http://www.mingw.org/

    Ross.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2010-11-05 23:42
    Ok, I'll do that in a moment.

    Right now, I want to see 'hello world' on the screen running in XMM, as this has been a great day's work and it is almost there!!

    I got catalyst running, it is light green text on a darker green background, correct?

    I can do a DIR and other commands. However, when I try running the HELLO_WORLD created earlier, the screen just goes blank. Any suggestions?
  • RossHRossH Posts: 5,573
    edited 2010-11-05 23:50
    Hi Dr_Acula,

    Yes, light green on dark green is the default colors.

    Nothing springs to mind immediately as to why it didn't work. Can you post the actual command you used to compile "hello_world"? Also, post the actual binary. I'll try duplicating it here.

    Ross.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2010-11-05 23:55
    Attached binary file.

    New problem now - catalyst won't run files. I renamed the binary HELLOD.BIN and when I type HELLOD, it says "cannot open file HELLOD.BIN"

    Yet the binary file is on the sd card, and it reads off the sd card into a hex editor, and also, running CAT on the binary file on catalyst prints out characters that look vaguely similar to the hex editor.


    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    
    C:\Documents and Settings\Administrator>cd c:\program files\catalina
    
    C:\Program Files\catalina>use_catalina
    
       ===================
       SETTING UP CATALINA
       ===================
    
    
    CATALINA_DEFINE  = [default]
    CATALINA_INCLUDE = [default]
    CATALINA_LIBRARY = [default]
    CATALINA_TARGET  = [default]
    CATALINA_LCCOPT  = [default]
    CATALINA_TEMPDIR = [default]
    LCCDIR           = [default]
    
    C:\Program Files\catalina>cd demos
    
    C:\Program Files\catalina\demos>catalina -lcx -x5 -M 128k -D DRACBLADE -D VGA hello_world.c
    Catalina Compiler 2.6
    Homespun Spin Compiler 0.27
    parsing C:\Program Files\Catalina\target\xmm_default.spin
    parsing C:\Program Files\Catalina\target\Catalina_HUB_XMM_Loader.spin
    parsing C:\Program Files\Catalina\target\Catalina_Common.spin
    parsing C:\Program Files\Catalina\target\Catalina_XMM.spin
    parsing C:\Program Files\Catalina\target\Catalina_Cogstore.spin
    parsing C:\Program Files\Catalina\target\Catalina_HMI_Plugin_LoRes_Vga_No_Mouse.spin
    parsing C:\Program Files\Catalina\target\Catalina_comboKeyboard.spin
    parsing C:\Program Files\Catalina\target\Catalina_VGA_Text.spin
    parsing C:\Program Files\Catalina\target\vga.spin
    parsing C:\Program Files\Catalina\target\Catalina_Float32_A_Plugin.spin
    parsing C:\Program Files\Catalina\target\Catalina_SD_Plugin.spin
    compiling xmm_default.spin
    compiling Catalina_HUB_XMM_Loader.spin
    compiling Catalina_XMM.spin
    compiling Catalina_Cogstore.spin
    compiling Catalina_HMI_Plugin_LoRes_Vga_No_Mouse.spin
    compiling Catalina_comboKeyboard.spin
    compiling Catalina_VGA_Text.spin
    compiling vga.spin
    compiling Catalina_Float32_A_Plugin.spin
    compiling Catalina_SD_Plugin.spin
    compiling Catalina_Common.spin
    writing C:\Program Files\Catalina\target\xmm_default.eeprom
    Homespun Spin Compiler 0.27
    parsing C:\Program Files\Catalina\target\Catalina.spin
    compiling Catalina.spin
    writing hello_world.binary
    renaming output file from hello_world.binary to hello_world_temp.binary
    combining target and program to hello_world.binary
    
    C:\Program Files\catalina\demos>
    

    Reminder to myself: To download catalyst, go to c:\program files\catalina\catalyst\bin, double click on catalyst.binary
  • RossHRossH Posts: 5,573
    edited 2010-11-06 00:01
    Hi Dr_Acula,

    I just compiled "hello world" again using this command:
    catalina -lcx -x5 -M 128k -D DRACBLADE -D VGA hello_world.c
    
    It loaded and ran first time.

    One thing - the VGA resolution this program uses is different to the Catalyst default. If you don't have a multisync monitor, then you may want to instead try the command:
    catalina -lcx -x5 -M 128k -D DRACBLADE -D HIRES_VGA hello_world.c
    
    This should use the same resolution as Catalyst uses.
Sign In or Register to comment.