• Ladder-like game

    From Nils M Holm@21:1/5 to All on Tue Feb 6 16:35:12 2024
    I recently wrote my own version of the Ladder game, mostly because
    the original game is too hard for me. :)

    Download: http://t3x.org/t3x/0/ladders.zip

    The zip file contains executables for CP/M and DOS as well as the
    source code in T3X.

    As a side-effect the T3X/0 compiler (http://t3x.org/t3x/0/) now has
    a console module that does things like clearing the screen, cursor
    addressing, etc. In the default configuration the game needs a
    VT-100 terminal, but support for the VT-52 is also in the code and
    just needs to be enabled.

    Enjoy!

    --
    Nils M Holm < n m h @ t 3 x . o r g > http://t3x.org

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bozo User@21:1/5 to Nils M Holm on Tue Apr 2 17:31:54 2024
    On 2024-02-06, Nils M Holm <nmh@sraddha.invalid> wrote:
    I recently wrote my own version of the Ladder game, mostly because
    the original game is too hard for me. :)

    Download: http://t3x.org/t3x/0/ladders.zip

    The zip file contains executables for CP/M and DOS as well as the
    source code in T3X.

    As a side-effect the T3X/0 compiler (http://t3x.org/t3x/0/) now has
    a console module that does things like clearing the screen, cursor addressing, etc. In the default configuration the game needs a
    VT-100 terminal, but support for the VT-52 is also in the code and
    just needs to be enabled.

    Enjoy!


    Interesting. But compiling and setting up t3x/0
    is not straightforward, at least under GNU/Linux i686.
    Here's the variables I changed in the makefile
    and the sh script at bin/ :

    T3XDIR= $HOME/t3x/lib
    BINDIR= $HOME/t3x/bin

    Then I ran

    make reset ; make all-native ; make install-native

    everything looked ok.
    But, on compiling ladders:

    .LANG=C make
    tx0 -t unix-386 -c ladders
    Text = 0x0001B415, Data = 0x00000C00, Symbols = 144, Nlist = 961, Labels = 1515 ladders.s: Assembler messages:
    ladders.s:6: Error: invalid character (0x80) in mnemonic
    ladders.s:7: Error: invalid character (0x80) in mnemonic
    ladders.s:8: Error: invalid character (0x80) in mnemonic
    ladders.s:9: Error: invalid character (0x80) in mnemonic
    ladders.s:10: Error: invalid character (0x80) in mnemonic
    ladders.s:11: Error: invalid character (0x80) in mnemonic
    ladders.s:12: Error: invalid character (0x80) in mnemonic
    ladders.s:13: Error: invalid character (0x80) in mnemonic
    ladders.s:14: Error: invalid character (0x80) in mnemonic
    ladders.s:15: Error: invalid character (0x80) in mnemonic
    ladders.s:16: Error: invalid character (0x80) in mnemonic
    ladders.s:18: Error: invalid character (0x80) in mnemonic
    ladders.s:19: Error: invalid character (0x80) in mnemonic
    ladders.s:20: Error: invalid character (0x80) in mnemonic
    ladders.s:21: Error: invalid character (0x80) in mnemonic
    ladders.s:22: Error: invalid character (0x80) in mnemonic
    ladders.s:23: Error: invalid character (0x80) in mnemonic
    ladders.s:37: Error: invalid character (0x80) in mnemonic
    ladders.s:38: Error: invalid character (0x80) in mnemonic
    ladders.s:39: Error: invalid character (0x80) in mnemonic

    Which could be the issue?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nils M Holm@21:1/5 to Bozo User on Wed Apr 3 09:11:07 2024
    Bozo User <anthk@disroot.org> wrote:
    Interesting. But compiling and setting up t3x/0
    is not straightforward, at least under GNU/Linux i686.
    Here's the variables I changed in the makefile
    and the sh script at bin/ :

    T3XDIR= $HOME/t3x/lib
    BINDIR= $HOME/t3x/bin
    [...]
    Which could be the issue?

    Ah, thank you so much for the feedback!

    Indeed there is something I forgot to mention in the README:

    If you change T3XDIR, you also have to change the "modpath"
    in your code generator accordingly. In your case, change

    "/usr/local/t3x/0/unx386/"

    in the function "modpath" in the file "targets/cgunx386.t" to

    "your-home/t3x/lib/unx386/"

    and, of course, change "your-home" to whatever the actual
    path is. $HOME will NOT work.

    Without this change, the compiler will fall back to the default
    core module and emit a mix of assembly language and bytecode,
    which will confuse the assembler.

    Let me know if this solves the problem!

    --
    Nils M Holm < n m h @ t 3 x . o r g > http://t3x.org

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nils M Holm@21:1/5 to Nils M Holm on Wed Apr 3 09:33:02 2024
    Nils M Holm <nmh@sraddha.invalid> wrote:
    If you change T3XDIR, you also have to change the "modpath"
    in your code generator accordingly. In your case, change

    "/usr/local/t3x/0/unx386/"

    in the function "modpath" in the file "targets/cgunx386.t" to

    "your-home/t3x/lib/unx386/"

    And also "/usr/local/t3x/0/" to "your-home/".

    It is documented in the README now.

    Next step: write a script that will do the changes for you.

    --
    Nils M Holm < n m h @ t 3 x . o r g > http://t3x.org

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nils M Holm@21:1/5 to Nils M Holm on Wed Apr 3 10:18:23 2024
    Nils M Holm <nmh@sraddha.invalid> wrote:
    Next step: write a script that will do the changes for you.

    Done and uploaded. Please use the new version:

    http://t3x.org/t3x/0/t3x0-20.zip

    --
    Nils M Holm < n m h @ t 3 x . o r g > http://t3x.org

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bozo User@21:1/5 to Nils M Holm on Fri Apr 5 13:11:17 2024
    On 2024-04-03, Nils M Holm <nmh@sraddha.invalid> wrote:
    Nils M Holm <nmh@sraddha.invalid> wrote:
    Next step: write a script that will do the changes for you.

    Done and uploaded. Please use the new version:

    http://t3x.org/t3x/0/t3x0-20.zip


    It works, but on the make install steps, it gave me an error,
    I had to run 'mkdir -p $HOME/t3x0/{bin,lib}' first.
    If not, the binaries get copied literally as $HOME/t3x0/bin
    being 'bin' a single file, not a directory.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nils M Holm@21:1/5 to Bozo User on Fri Apr 5 16:27:08 2024
    Bozo User <anthk@disroot.org> wrote:
    On 2024-04-03, Nils M Holm <nmh@sraddha.invalid> wrote:
    Nils M Holm <nmh@sraddha.invalid> wrote:
    Done and uploaded. Please use the new version:

    http://t3x.org/t3x/0/t3x0-20.zip


    It works, but on the make install steps, it gave me an error,
    I had to run 'mkdir -p $HOME/t3x0/{bin,lib}' first.
    If not, the binaries get copied literally as $HOME/t3x0/bin
    being 'bin' a single file, not a directory.

    Ah, I see. The lib directory should be created by install -d,
    because it also creates parent directories, at least on FreeBSD.

    $BINDIR is intended to point to a location where you keep *all*
    your binaries, not just T3X, e.g. /usr/local/bin or $HOME/bin.
    Therefore the Makefile assumes that it already exists.

    Will clarify this in the Makefile.

    Thanks for the input!

    --
    Nils M Holm < n m h @ t 3 x . o r g > http://t3x.org

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bozo User@21:1/5 to Nils M Holm on Fri Apr 5 22:00:02 2024
    On 2024-04-05, Nils M Holm <nmh@sraddha.invalid> wrote:
    Bozo User <anthk@disroot.org> wrote:
    On 2024-04-03, Nils M Holm <nmh@sraddha.invalid> wrote:
    Nils M Holm <nmh@sraddha.invalid> wrote:
    Done and uploaded. Please use the new version:

    http://t3x.org/t3x/0/t3x0-20.zip


    It works, but on the make install steps, it gave me an error,
    I had to run 'mkdir -p $HOME/t3x0/{bin,lib}' first.
    If not, the binaries get copied literally as $HOME/t3x0/bin
    being 'bin' a single file, not a directory.

    Ah, I see. The lib directory should be created by install -d,
    because it also creates parent directories, at least on FreeBSD.

    $BINDIR is intended to point to a location where you keep *all*
    your binaries, not just T3X, e.g. /usr/local/bin or $HOME/bin.
    Therefore the Makefile assumes that it already exists.

    Will clarify this in the Makefile.

    Thanks for the input!

    No problem!!

    I already compiled an interpreted version under a shared
    pubnix with OpenBSD/amd64, people liked having a 'native'
    Ladder a lot, at least they don't have to run an Altair
    simulaton under simh.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nils M Holm@21:1/5 to Bozo User on Sun Apr 7 13:01:09 2024
    Bozo User <anthk@disroot.org> wrote:
    I already compiled an interpreted version under a shared
    pubnix with OpenBSD/amd64, people liked having a 'native'
    Ladder a lot, at least they don't have to run an Altair
    simulaton under simh.

    Interpreted T3X is easily good enough for the ladders game.

    For running CP/M programs without having to start a full
    emulator I often use tnylpo (https://gitlab.com/gbrein/tnylpo).
    It runs CP/M programs on the Unix command line using the cwd
    as its file system.

    --
    Nils M Holm < n m h @ t 3 x . o r g > http://t3x.org

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)