Jump to content
toarnold

Let me introduce jaguarvbcc - docker

Recommended Posts

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

Share this post


Link to post
Share on other sites

Nice post. I think Docker containers will make life easier for cross OS development, since the toolchain is apart from the host OS (among other reasons).

 

FYI - as a new docker user - I believe you can remove the Prerequisite: "Win 10 Pro/Enterprise 64 bit" because any OS that can run Docker, will do the job.

 

 

For other folks: Linux is the most common host OS for Docker, and Summer 2016 releases brought first-class support for Windows and OSX.

  • Like 1

Share this post


Link to post
Share on other sites

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

 

Thank you for this.

 

Would you consider posting the Dockerfile?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

 

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

 

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?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

You ever think of dockerizing vasm and vlink? Then we could work of of the same versions, knowing that yours works.

Hi rocky1138,

 

vasm and vlink are dockerized in the above docker image!

  • Like 1

Share this post


Link to post
Share on other sites

I'd like to do some Jaguar programming. I'm trying to use this to compile a little hello world application. It works just fine compiling a jaglib program (jaglib is really neat by the way) but chokes for me trying to link it with a GPU program. I have my 68K C source and a little do-nothing GPU snippet:

    .include "jaguar.inc"
    
BMP_WIDTH    .equ    320
BMP_HEIGHT    .equ    200

    .globl    _jag_vidmem
    
    .gpu
VIDMEM        .equr    r16

    .org    G_RAM
_blank_screen::

    nop
    nop
    nop
    nop
    nop
    
    .68000
_blank_screen_end::

This assembles in vasmjagrisc_madmac but the linker complains?

docker run --rm -v C:/jaguar:/usr/src/compile --workdir /usr/src/compile toarnold/jaguarvbcc:0.9f vc -vv +jaguar -o hello.jag obj/hello.o obj/screen.o
vc frontend for vbcc (c) in 1995-2016 by Volker Barthelmann

Loading files:

/opt/jagdev/targets/m68k-jaguar/lib/startup.o (vobj-be object)
obj/hello.o (vobj-be object)
obj/screen.o (vobj-be object)
/opt/jagdev/targets/m68k-jaguar/lib/libjag.a (vobj-be library)
/opt/jagdev/targets/m68k-jaguar/lib/libvc.a (vobj-be library)

Digesting symbol information:

Joining selected sections:
Warning 64: Section screen.o(segf03000) was not recognized by target linker script.
Edited by Luigi301

Share this post


Link to post
Share on other sites

I guess you should remove the .68000 section, 'cause vasm doesn't support it. It will be handled as an unkown section, but vlink has no definition vor that section.

 

Greetings

-toarnold

Share this post


Link to post
Share on other sites

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

I compiled VBCC/VASM/VLINK for Windows and it works perfectly.

I prefer VBCC instead of gcc because you can compile with very few and lightweight executables, also the assembly call syntax is very easy to write with functions parameters as registers.

I used VBCC + RMAC + RLN for all my jaguar games starting from Elansar.

If you want a VBCC windows precompiled executable (maybe not the latest version of vbcc, but well ..) you can find one on my website in the tool section

http://onorisoft.free.fr/atari/falcon.htm

Edited by Orion_
  • Like 1

Share this post


Link to post
Share on other sites

Vasm_Jrisc supports .68000 in this context

 

http://atariage.com/forums/topic/235242-volker-barthelmannsfrank-willes-vasm-assembler-for-the-jrisc/page-3

 

Usually ORG starts a separate section with a fixed base address

defined by ORG. But in the Jaguar/Madmac case it is more like a RORG,

relocating the labels inside a still active text section.

 

And .68000 seems to work like ending such a RORG-block.

 

.68000 also switches back from absolute assembling (to the

fixed address $f03000) to the .text section. This makes the label

_test_end being placed in .text again.

This seems related. The actual example is 3 posts or so down in the linked thread. Seems to be no way to link to specific posts in Mobile. Sorry. Edited by JagChris

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

 

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

it seems like people forgot how to do it the old and simple way ...

for VBCC on Jaguar I have no dependency, just the few VBCC executable files, rmac, rln, and thats it.

 

here is my compilation script:

 

set path="E:\Programmation\Jag\bin";"E:\Programmation\Falcon\VBCC\bin"

vc +vc.ini -c -O2 game.o game.c

rmac -fb -u main.s

rln -v -n -rq -a 802000 x 4000 -o test.rom main.o game.o

  • Like 1

Share this post


Link to post
Share on other sites

This isn't the right place to discuss the pros and cons of docker. Use it or not. I never fogot the "old" ways, but for me docker is an additional benefit.

  • Like 2

Share this post


Link to post
Share on other sites

WTF!?! I need some help.

 

Yesterday I've installed Docker, downloaded the vbcc jaguar docker image and the jag2048 sample, and it works.

 

But today it says that vc: Command not found.

 

I've downloaded the docker image again but I've the same error.

 

Also I've tried to install vbcc in my computer (osx) from dhs.nu and vbcc web, when I compile the jag2048 I got an error: no config file!

 

This is my /etc/vc.config

-cc=vbcc -quiet %s -o= %s %s -O=%ld -I/opt/local/bin/vbcc/targets/m68k-jaguar/include
-ccv=vbcc %s -o= %s %s -O=%ld -I/opt/local/bin/vbcc/targets/m68k-jaguar/include
-as=vasm -quiet -Faout -phxass -opt-pea -opt-clr -opt-fconst %s -o %s
-asv=vasm -Faout -phxass -opt-pea -opt-clr -opt-fconst %s -o %s
-rm=rm -f %s
-rmv=rm %s
-ld=vlink -bataritos -tos-flags 7 -x -Bstatic -Cvbcc -P__stksize -nostdlib -L/opt/local/bin/vbcc/targets/m68k-jaguar/lib /opt/local/bin/vbcc/targets/m68k-jaguar/lib/startup.o %s %s -lvc -ljag -lm -o %s
-l2=vlink -bataritos -tos-flags 7 -x -Bstatic -Cvbcc -P__stksize -nostdlib -L/opt/local/bin/vbcc/targets/m68k-jaguar/lib %s %s -o %s
-ldv=vlink -bataritos -tos-flags 7 -t -x -Bstatic -Cvbcc -P__stksize -nostdlib -L/opt/local/bin/vbcc/targets/m68k-jaguar/lib /opt/local/bin/vbcc/targets/m68k-jaguar/lib/startup.o %s %s -lvc -ljag -lm -o %s
-l2v=vlink -bataritos -tos-flags 7 -t -x -Bstatic -Cvbcc -P__stksize -nostdlib -L/opt/local/bin/vbcc/targets/m68k-jaguar/lib %s %s -o %s
-ldnodb=-s
-ul=-l%s
-cf=-F%s
-ml=10000

Edited by swapd0

Share this post


Link to post
Share on other sites

It's been literally years since I was exposed to the toxic environment of vbcc but I do recall that in order to build anything I placed the config file in the root of the build folder. Also at least in Windows it's called "vc.cfg" - maybe you just need to rename it?

Share this post


Link to post
Share on other sites

Another thing I remembered (and confirmed from the manual):

 

`+file'

Use `file' as config-file.

 

So I suppose try +vc.cfg/config?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...