Jump to content

toarnold

Members
  • Posts

    37
  • Joined

  • Last visited

Posts posted by toarnold

  1. @Luigi301

     

    In case of -bjagsrv vlink uses a default linker script if nothing else is provided it looks like:

    SECTIONS {
        . = 0x4000;
        .text: {
          *(.text CODE text)
        }
        . = ALIGN(32);
        .data: {
          VBCC_CONSTRUCTORS
          *(.data DATA data)
        }
        . = ALIGN(32);
        .bss: {
          *(.bss BSS bss)
          *(COMMON)
          _BSS_END = ALIGN(32);
        }
      };
    

    The _BSS_END symbol ist used by the vbcc vclib to determine free RAM for malloc/free operations.

     

    -toarnold

  2. I don't understand what is docker and why this is needed ?

     

    @Orion_

     

    This is the "modern" way of working. It has two advantages:

    1. You are not forced to mess up your pc with a bunch of development tools and the corresponding enviroment like ENV variables etc. All is ready configured in the docker.
    2. You can so easily use different versions side-by-side, 'cause everything is separated by docker.

     

    Vasm_Jrisc supports .68000 in this context

    @JagChris

     

    I overlooked this. But the standard linker script used by vbcc jaguar config and vlink doesn't support this section. It must be defined by your own script. So the easiest way will be to remove the .68000 section in the gpu code. I will talk to Frank, so we can correct this in the next release maybe.

     

    -toarnold

    • Like 1
  3. Hi rocky1138,

     

    it is diffcult without the whole source code ...

    But it seems you forgot a dependency

    obj/gpu.o: jaguar.inc
    	$(ASGPU) $(ASGPUFLAGS) gpu.s -o obj/gpu.o
    
    

    You should add gpu.s, otherwise you will link against an old gpu.o

    obj/gpu.o: gpu.s jaguar.inc
    	$(ASGPU) $(ASGPUFLAGS) gpu.s -o obj/gpu.o
    
    

    Seems to me, you have to do it with test.o, too.

     

    You can PM me the source code if you want.

     

    Appendix:

    I got it. 'Cause you are loading olp2set with the gpu it has to be long-word aligned. Take a look at your memory map (parameter -M for vlink). For me this variable was at a word-aligned adress.

    A .long and the canged link order will do the trick.

     

    post-20466-0-37125900-1503562710.png

     

    Greetings

    -toarnold

    post-20466-0-37125900-1503562710.png

  4. Hi rocky1138

     

     

    OK the reason I was asking is related to my other thread about vasm-m68k and vasm-jagrisc. Are you building those to use the madmac conventions? When you build your binary, do you use jagserv format?

     

    You can dig into the container by

    docker run --rm -it toarnold/jaguarvbcc:0.9f sh
    

    In the folder /opt/jagdev/bin are the tools located. The vasm is compiled to support m68k with madmac and motorola syntax. Jagrisc supports madmac only.

     

    And yes, I use jagserver format, too.

    • Like 1
  5. Hi rock1138,

     

    no problem, but there is nothing special, because I copy the whole toolchain folder from my PC ...

    FROM alpine:3.6
    ARG version
    RUN apk add --no-cache make libc6-compat nodejs nodejs-npm
    
    # copy files
    COPY version/ /opt/jagdev/
    
    # Apply path changes
    ENV PATH="/opt/jagdev/bin:${PATH}" VBCC="/opt/jagdev" JVBCCVERSION=$version HOME=/tmp
    #default command
    CMD echo $JVBCCVERSION
    
  6. Hi rocky1138,

     

    I love vasm and vlink, because you will get a great support from Frank Wille who maintains this tools.

     

    But let's get down to brass tacks:

     

    On the first glance everything seems to be ok, but I suggest to change the link order:

    OBJ = obj/gpu.o obj/startup.o obj/testrgb.o obj/test.o
    

    Links the gpu obj at $4000. But the jagsrv structure assumes your CPU initialisation code at this address.

     

    Change the linking order to:

    OBJ = obj/startup.o obj/gpu.o obj/testrgb.o obj/test.o
    

    Hopefully it helps

     

    -toarnold

    • Like 1
  7. Hi folks,

     

    Do you wish to start in jaguar coding?

    You don't like to configure a development chain?

    Here is a solution. Use Docker!

    Prerequsites: You need a Win 10 Pro/Enterprise 64 bit, a docker supported 64 bit linux (e.g. Ubuntu etc.) or a Mac. See here: https://www.docker.com/

     

    You can find the vbcc jaguar docker image here: https://hub.docker.com/r/toarnold/jaguarvbcc/

     

    A quick demo with three simple steps

    1. Clone the jag2048 (https://github.com/toarnold/jag2048.git) github repository (or download it as a zip file)
    2. Jump into the directory
    3. Execute the following command line

    Linux users type

    docker run --rm -v "$PWD":/usr/src/compile -w /usr/src/compile -u $(id -u $USER):$(id -g $USER) toarnold/jaguarvbcc:0.9f make
    

    Window users type

    docker run --rm -v "%cd%":/usr/src/compile -w /usr/src/compile toarnold/jaguarvbcc:0.9f make
    

    This will produce a jag2048.jag file in the current folder. Upload this with your skunkboard or start it in virtualjaguar!

     

    Greetings,

    toarnold

    • Like 6
  8. Well done!

    Please let me give you a small suggestion. You define a STADDR but this address is never used.

    This can be done with parameter -Ttext $(STADDR) but this will be ignored by the linker, because you are using the jagsrv format. In this case you have to define your own linker script, otherwise vlink uses an interal linker script which looks like

      SECTIONS {
        . = 0x4000;
        .text: {
          *(.text CODE text)
        }
        . = ALIGN(32);
        .data: {
          VBCC_CONSTRUCTORS
          *(.data DATA data)
        }
        . = ALIGN(32);
        .bss: {
          *(.bss BSS bss)
          *(COMMON)
          _BSS_END = ALIGN(32);
        }
      };
    
    

    In case your code should run in the rom area $80200 you can move the text segment. But be aware to move data and bss segment in the ram area $4000. Than pass this new linker script with parameter -T

     

    Greetings,

    toarnold

    • Like 1
  9. If you are starting in jaguar development first you have to choose the right tool chain. "Right" in terms of what is your preferred way of programming.

    Personally I choose the vbcc/vasm/vlink tool chain. You have to invest a little bit to get it running, but all is well documented in the vbcc documentation.

    Starting from the current version, vbcc targets the Jaguar with the standard C library, so you could run the standard "Hello , world!" sample (you will find a million times in the internet) without changes.

  10. It's supposed to timeout after 200,000 cycles and flag the console as down... but I haven't run this code in years. Look at the 'getBothBuffers' function, that's where you're hung up, most likely.

    I think I got it.

    There is a WORD/DWORD missmatch in the wait-loops:

    move.l #timeout,d0
    ...
    subq #1,d0
    tst.l d0
    bne .wait
    

    subq #1,d0 isn't qualified with a register size, so only WORD size is taken. Substitute with subq.l #1,d0 did the trick!

    I found this pattern four times.

    Here is my modified skunk.s. Hopefully you can approve my changes.

     

    Greetings,

    toarnold

    • Like 3
    • Thanks 1
  11. Hello friends,

     

    I have two questions:

    1. How I can test if a skunk board is present? Is there any "magic" word or version number in the skunk bios range ($800000 to $801FFF) I can check?
    2. How can I test if jcp is running in console mode? If I call skunkRESET this function seems never to return if I forget the jcp parameter -c. No timeout occurs.

    Thanks and greetings

    toarnold

    • Like 1
  12. This is my second jaguar game.

    It is an absolutely nerd game called 2048. Most of you will know as a mobile phone game. But it is ported from javascript - take a look here: https://gabrielecirulli.github.io/2048/

    Attached is a Visual Studio 2013 Solution. You will need vbcc/vasm68m/vasmjagrisc/vlink to compile.

    You can find a .bin, .coff and .rom executeable in the archive


    Have fun an merry Xmas

    - toarnold

    2048.zip

    post-20466-0-15168600-1450857587_thumb.jpg

    • Like 15
  13. There are 100 levels. 50 symetric (the easy part) and 50 asymetric. 25 years ago I can't solve all levels, but today you can feed a multi-core CPU with this problems :-)

    - toarnold

    • Like 5
  14. Today I'll provide my first ATARI Jaguar Game.

    It is a port of an ATARI XL game called "Gryzzles". It was released in the early 1988 in a german computer magazine called ComputerKontakt (CK 2/3 1988).

    I liked this game and I played it very often. After getting a skunkboard this game was my first project. So don't bother me ;-)

    It is written in plain C with a little help of M68k assembler, the Belboz HelloWorld sample and the Sinister Sound Module.

    Source code (Visual Studio 2013 Solution) is included. You will need vbcc/vasm/vlink and smac to compile.

    Load and run adress for gryzzles.bin is $4000

    The original german game discription is included (gryyzles.txt). (I am not able to translate it)

    But I think you don't need a description. Solve every level in one move!


    Keypad:


    Title-Screen

    B: Toggle between normal or random game

    C: Toggle between master loop (all levels) or lower (level 1-50) or upper areas (level 51-100)

    Option: switch sound on or off

    A: start game


    Gameplay

    Option: switch sound on or off

    *: Destroy pyramid (restart level)

    #: Give up



    Hopefully this game will run on NTSC Jags, 'cause I only own a PAL model.


    Enjoy,

    toarnold

    GryzzlesJaguar.zip

    post-20466-0-09293800-1450437751_thumb.jpg

    • Like 15
×
×
  • Create New...