Marsdev for newbies.

Ask anything your want about the 32X Mushroom programming.

Moderator: BigEvilCorporation

Tomahomae
Very interested
Posts: 56
Joined: Sat Jan 27, 2018 2:50 am
Location: Russia

Marsdev for newbies.

Post by Tomahomae » Tue Aug 09, 2022 3:52 am

First of all, I'd like to ask - where font graphics file for the 32x-skeleton example stored are? I didn't found it in the example folder itself.

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Re: Marsdev for newbies.

Post by Chilly Willy » Tue Aug 09, 2022 9:43 pm

src/font.c

Tomahomae
Very interested
Posts: 56
Joined: Sat Jan 27, 2018 2:50 am
Location: Russia

Re: Marsdev for newbies.

Post by Tomahomae » Wed Aug 10, 2022 4:15 am

Chilly Willy wrote:
Tue Aug 09, 2022 9:43 pm
src/font.c
Thank you. I just thought at first, that const unsigned char msx is just a symbol table, not a GFX data by itself. Now I'd like to ask about the ways of graphic files import, to put a background image using a 32X video hardware as a first step.

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Re: Marsdev for newbies.

Post by Chilly Willy » Fri Aug 12, 2022 10:44 pm

You might want to look at Vic's "Yet Another Tilemap and Super Scaler Demo"

https://github.com/viciious/yatssd

Tomahomae
Very interested
Posts: 56
Joined: Sat Jan 27, 2018 2:50 am
Location: Russia

Re: Marsdev for newbies.

Post by Tomahomae » Sun Aug 14, 2022 3:53 am

Chilly Willy wrote:
Fri Aug 12, 2022 10:44 pm
You might want to look at Vic's "Yet Another Tilemap and Super Scaler Demo"

https://github.com/viciious/yatssd
There's an error during the test build without any source changes:
make[1]: /opt/toolchains/sega/m68k-elf/bin/m68k-elf-as: No such file or directory
make[1]: *** [Makefile:41: crt0.o] Error 127

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Re: Marsdev for newbies.

Post by Chilly Willy » Wed Aug 17, 2022 6:33 pm

You need my development toolchain. Either the predone archive in the tools section, or building it from source as described in a number of places.

The very latest archive of the source for my Sega MD/CD/32X toolchain can be found here: https://drive.google.com/file/d/1C-mTey ... sp=sharing

This is based around gcc 12.1.0, binutils 2.38, newlib 4.2.0, and zasm 4.4. You have to build it yourself using the makefile in the archive.

Vic
Interested
Posts: 27
Joined: Wed Nov 03, 2021 6:01 pm

Re: Marsdev for newbies.

Post by Vic » Wed Aug 17, 2022 9:00 pm

The YATSSD demo comes with remote dev container setup for VSCode. If you opt to use that, the compilation process boils down to running make in container terminal.
https://code.visualstudio.com/docs/remote/containers

Tomahomae
Very interested
Posts: 56
Joined: Sat Jan 27, 2018 2:50 am
Location: Russia

Re: Marsdev for newbies.

Post by Tomahomae » Thu Aug 18, 2022 9:04 am

Chilly Willy wrote:
Wed Aug 17, 2022 6:33 pm
You need my development toolchain. Either the predone archive in the tools section, or building it from source as described in a number of places.

The very latest archive of the source for my Sega MD/CD/32X toolchain can be found here: https://drive.google.com/file/d/1C-mTey ... sp=sharing

This is based around gcc 12.1.0, binutils 2.38, newlib 4.2.0, and zasm 4.4. You have to build it yourself using the makefile in the archive.
What directory should I put it in? And does build of this toolchain require a special soft like MinGW or VisualStudio, or standart Windows command prompt will be enough?

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Re: Marsdev for newbies.

Post by Chilly Willy » Thu Aug 18, 2022 12:04 pm

The source can be put anywhere. Most people I know have a Projects directory on their main drive where they keep everything they're working on, usually in subdirectories. For example, that archive on my drive is at (linux system) /home/jlfenton/Projects/toolchains/.

It installs to /opt/toolchains/sega. And yes, it needs a posix system to compile. In Windows, this is often MinGW or CygWin, but I've heard of people doing this with the new WSL. I don't use Windows, so I can't really advise you on that. You might take Vic's advice since he does. If I WERE giving advice, it would be to install Xubuntu, either in place of, or along side Windows. :lol: I know quite a few folks who use my toolchains with linux in a virtual environment running in Windows.

Vic
Interested
Posts: 27
Joined: Wed Nov 03, 2021 6:01 pm

Re: Marsdev for newbies.

Post by Vic » Sun Aug 21, 2022 5:32 pm

I actually use both VSCode's remote containers and a dedicated WSL Ubuntu image with Chilly's devkit installed. Way easier than cross-compiling the devkit. I also have a native Linux installation but don't use it quite often since emulation often sucks there.

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Re: Marsdev for newbies.

Post by Chilly Willy » Mon Aug 22, 2022 5:38 pm

For emulation, I generally use either Fusion 3.64 for Windows running in WINE, or picodrive compiled for linux. I like Fusion better, but it hasn't been updated in quite some time, so picodrive tends to have more features, like better support for the standard Sega mapper.

Tomahomae
Very interested
Posts: 56
Joined: Sat Jan 27, 2018 2:50 am
Location: Russia

Re: Marsdev for newbies.

Post by Tomahomae » Tue Aug 23, 2022 12:43 pm

Chilly Willy wrote:
Thu Aug 18, 2022 12:04 pm
If I WERE giving advice, it would be to install Xubuntu, either in place of, or along side Windows. :lol: I know quite a few folks who use my toolchains with linux in a virtual environment running in Windows.
Must is be a latest version of Xubuntu compulsory, or older versions can fit for this too?

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Re: Marsdev for newbies.

Post by Chilly Willy » Tue Aug 23, 2022 2:47 pm

Newer versions may be necessary depending on your system. Remember that linux tends to be a little iffy on the latest systems. If you've got an older system, you can probably get away with a much older version. I'd recommend at least 16.04LTS. I tend to update every four years or so. I used to run 16.04, now I run 20.04, and I'll probably update when 24.04 comes out. I have a laptop that REQUIRES 19.04 or better just to run, and works better in 20.04. My previous computer worked fine back to 10.04. My current computer worked in 16.04, but only with some changes made to the startup. It's much better in 20.04 than it was in 16.04. Virtual environments tend to be more like older systems, so they tend to work fine with older versions of linux. Personally, from my memories, I wouldn't use anything older than Ubuntu (or any of its derivatives) 12.04. A decade is a LONG time for an OS, but fortunately, linux tends to have better staying power.

Tomahomae
Very interested
Posts: 56
Joined: Sat Jan 27, 2018 2:50 am
Location: Russia

Re: Marsdev for newbies.

Post by Tomahomae » Sun Aug 28, 2022 4:16 am

What did I missed for this time?
Attachments
VirtualBox_Xubuntu_28_08_2022_07_12_51.png
VirtualBox_Xubuntu_28_08_2022_07_12_51.png (132.25 KiB) Viewed 8463 times

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Re: Marsdev for newbies.

Post by Chilly Willy » Sun Aug 28, 2022 2:32 pm

To build the toolchain, you need something to do the building. In linux, you install the build essentials, like this

sudo apt install build-essential

You're making a cross-compiler - you use the normal gcc AMD64 compiler installed on your system to compile a new compiler that runs on your system, but builds code for a different processor (M68K and SH2 in this instance). But that means you need to have a compiler for your system installed, which is what the line above does.

Sorry, us devs sometimes forget that beginners don't know some of the steps we think are obvious... because they are... to other devs. :lol:

Post Reply