Package Details: x16-emulator r48-1

Git Clone URL: https://aur.archlinux.org/x16-emulator.git (read-only, click to copy)
Package Base: x16-emulator
Description: An emulator for The 8-Bit Guy's Commander X16
Upstream URL: http://commanderx16.com/
Licenses: BSD-2-Clause
Groups: commander-x16
Submitter: Juju
Maintainer: Auerhuhn
Last Packager: Auerhuhn
Votes: 4
Popularity: 0.038600
First Submitted: 2019-09-19 05:47 (UTC)
Last Updated: 2024-09-08 09:46 (UTC)

Pinned Comments

Juju commented on 2020-02-09 04:46 (UTC)

Good news everyone: the X16 team upstream just announced they have a preliminary agreement with Cloanto, which means they don't have to rewrite the KERNAL (aka x16-rom) from scratch, and the repos are officially back online! So I'm going to revert the PKGBUILDs as they were before real soon.

Give a huge thanks to Perifractic who made this possible (you can find him on YouTube), and vote for the packages if you like them :)

Latest Comments

1 2 Next › Last »

FredBezies commented on 2024-07-08 15:42 (UTC)

You can fix desktop file by adding --custom "StartupWMClass=x16emu" at the end of the gendesk line.

Here is a fixed PKGBUILD to use if you want to:

# Maintainer: Claudia Pellegrino <aur ät cpellegrino.de>
# Contributor: Julien Savard <juju@juju2143.ca>
pkgname=x16-emulator
pkgver=r47
pkgrel=2
pkgdesc="An emulator for The 8-Bit Guy's Commander X16"
arch=('x86_64')
url="http://commanderx16.com/"
license=('BSD-2-Clause')
groups=('commander-x16')
depends=('sdl2' "x16-rom=${pkgver}")
makedepends=('clang' 'gendesk' 'pandoc')

source=(
    "$pkgname-$pkgver.tar.gz::https://github.com/X16Community/$pkgname/archive/$pkgver.tar.gz"
    "fix-git-rev.patch"
    "modify-base-path.patch"
)

sha256sums=('8ff048f413c9d74842576fd0a2789961063d1451d8d7584615c6c8adde1bce75'
            'cf233d6fd3cd16f440f1443695d261fb7fc80b4d954ded9ee225f8ec572edef0'
            'e9ef39655bbfa6d67e8b0a83a46ce1b9d02be0b4fd91af045a3d8cb41fb56a80')

prepare() {
    cd "$pkgname-$pkgver"
    patch -uN -p1 < ../fix-git-rev.patch
    patch -uN -p1 < ../modify-base-path.patch
    sed -i -e 's/^\(LDFLAGS=.*\)/\1 '"${LDFLAGS}/" Makefile
    gendesk -f -n --pkgname "$pkgname" --pkgdesc "$pkgdesc" --name "X16 Emulator" --icon "$pkgname" --exec "x16emu" --categories "Game;Emulator" --custom "StartupWMClass=x16emu"
}

build() {
    cd "$pkgname-$pkgver"
    # https://aur.archlinux.org/packages/x16-emulator#comment-827725
    export CC="clang ${CFLAGS} -Wno-macro-redefined"
    export CXX="clang++ ${CXXFLAGS}"
    make
    pandoc --from gfm --to html -c github-pandoc.css --standalone --metadata pagetitle="X16 Emulator" README.md --output README.html
}

package() {
    cd "$pkgname-$pkgver"
    install -Dm755 x16emu "$pkgdir/usr/bin/x16emu"
    install -Dm755 makecart "$pkgdir/usr/bin/makecart"
    install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
    install -Dm644 github-pandoc.css "$pkgdir/usr/share/doc/$pkgname/github-pandoc.css"
    install -Dm644 README.html "$pkgdir/usr/share/doc/$pkgname/README.html"
    install -Dm644 RELEASES.md "$pkgdir/usr/share/doc/$pkgname/RELEASES.md"
    install -Dm644 quickstart-linux.md "$pkgdir/usr/share/doc/$pkgname/quickstart-linux.md"
    install -Dm644 .gh/logo.png "$pkgdir/usr/share/pixmaps/$pkgname.png"
    install -Dm644 "$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"
}

Auerhuhn commented on 2023-10-17 09:39 (UTC)

Update: compile-time issue fixed, see commit message for details.

Version bumped to r45.

Auerhuhn commented on 2023-10-17 06:51 (UTC) (edited on 2023-10-17 07:08 (UTC) by Auerhuhn)

While trying to build the latest upstream version (r45), I get this error message:

g++ -o x16emu build/x16emu/cpu/fake6502.o build/x16emu/memory.o build/x16emu/disasm.o build/x16emu/video.o build/x16emu/i2c.o build/x16e
mu/smc.o build/x16emu/rtc.o build/x16emu/via.o build/x16emu/serial.o build/x16emu/ieee.o build/x16emu/vera_spi.o build/x16emu/audio.o bu
ild/x16emu/vera_pcm.o build/x16emu/vera_psg.o build/x16emu/sdcard.o build/x16emu/main.o build/x16emu/debugger.o build/x16emu/javascript_
interface.o build/x16emu/joystick.o build/x16emu/rendertext.o build/x16emu/keyboard.o build/x16emu/icon.o build/x16emu/timing.o build/x1
6emu/wav_recorder.o build/x16emu/testbench.o build/x16emu/files.o build/x16emu/cartridge.o build/x16emu/iso_8859_15.o build/x16emu/ymglu
e.o build/x16emu/extern/ymfm/src/ymfm_opm.o -L/usr/lib -lSDL2 -lm -lz -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now
build/x16emu/cpu/fake6502.o: file not recognized: file format not recognized
collect2: error: ld returned 1 exit status
make: *** [Makefile:81: x16emu] Error 1

My PKGBUILD modifications to actually get through to this error: x16-rom.patch, x16-emulator.patch

/cc @FredBezies any ideas?

Auerhuhn commented on 2023-03-15 14:46 (UTC)

@jsand Thanks for the heads up!

I’ve been able to reproduce the error message.
Turns out that the upstream developers fixed that issue in the latest stable release, r42.

jsand commented on 2023-03-15 13:53 (UTC)

Not working under C23:

==> Starting build()...
clang -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wno-macro-redefined -std=c99 -O3 -Wall -Werror -g -I/usr/include/SDL2 -D_REENTRANT -Isrc/extern/include -Isrc/extern/src -c src/video.c -o build/video.o
src/video.c:1114:19: error: passing arguments to 'machine_paste' without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
                                        machine_paste(SDL_GetClipboardText());

FredBezies commented on 2021-09-21 20:01 (UTC)

Cannot be build anymore with gcc 11.1.x

debugger.c: In function 'DEBUGRenderDisplay':
debugger.c:520:48: error: '%d' directive writing between 2 and 10 bytes into a region of size 5 [-Werror=format-overflow=]
  520 |                                 sprintf(lbl, "x%d", reg);
      |                                                ^~
debugger.c:520:46: note: directive argument in the range [16, 2147483647]
  520 |                                 sprintf(lbl, "x%d", reg);
      |                                              ^~~~~
debugger.c:520:33: note: 'sprintf' output between 4 and 12 bytes into a destination of size 6
  520 |                                 sprintf(lbl, "x%d", reg);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [Makefile:57: debugger.o] Error 1

You have to use llvm and clang instead. Fixed PKGBUILD:

# Maintainer: Julien Savard <juju@juju2143.ca>
pkgname=x16-emulator
pkgver=r38
pkgrel=1
pkgdesc="An emulator for The 8-Bit Guy's Commander X16"
arch=('x86_64')
url="http://commanderx16.com/"
license=('BSD')
groups=('commander-x16')
depends=('sdl2')
makedepends=('pandoc' 'gendesk' 'llvm' 'clang')
optdepends=('x16-rom: ROMs for the emulator')
provides=()
conflicts=()
replaces=()
options=()
install=
changelog=
source=("$pkgname-$pkgver.tar.gz::https://github.com/commanderx16/$pkgname/archive/$pkgver.tar.gz"
    "modify-base-path.patch")
md5sums=('06a9be7149764860344771d866b1a196'
         '5cd0550d2af1b4267c9b9f30eed9691e')

prepare() {
    cd "$pkgname-$pkgver"
    patch -uN main.c ../modify-base-path.patch
    gendesk -f -n --pkgname "$pkgname" --pkgdesc "$pkgdesc" --name "X16 Emulator" --icon "$pkgname" --exec "x16emu" --categories "Game;Emulator"
}

build() {
    cd "$pkgname-$pkgver"
    # Working aroung bug: https://github.com/commanderx16/x16-emulator/issues/361
        export CC=clang
    export CXX=clang++
        export AR=llvm-ar
        export NM=llvm-nm
        export RANLIB=llvm-ranlib
    make
    pandoc --from gfm --to html -c github-pandoc.css --standalone --metadata pagetitle="X16 Emulator" README.md --output README.html
}

package() {
    cd "$pkgname-$pkgver"
    install -Dm755 x16emu "$pkgdir/usr/bin/x16emu"
    install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
    install -Dm644 github-pandoc.css "$pkgdir/usr/share/doc/$pkgname/github-pandoc.css"
    install -Dm644 README.html "$pkgdir/usr/share/doc/$pkgname/README.html"
    install -Dm644 .gh/logo.png "$pkgdir/usr/share/pixmaps/$pkgname.png"
    install -Dm644 "$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"
}

Juju commented on 2020-02-09 04:46 (UTC)

Good news everyone: the X16 team upstream just announced they have a preliminary agreement with Cloanto, which means they don't have to rewrite the KERNAL (aka x16-rom) from scratch, and the repos are officially back online! So I'm going to revert the PKGBUILDs as they were before real soon.

Give a huge thanks to Perifractic who made this possible (you can find him on YouTube), and vote for the packages if you like them :)

Juju commented on 2020-02-05 20:07 (UTC)

Yeah, if you want money, either you license it for a good price or you sue. It's possible they thought the project is never going to get off the ground so they didn't bother with that, after all Cloanto is known for keeping their stuff for themselves. In recent days you had The C64 Mini and I think that's pretty much it. But The 8-Bit Guy has 1 million subs on YouTube, the Facebook group for this project has 16K members as I write this, and they already have a working prototype, I'm pretty sure it's going to sell well.

Anyway, I just wish the X16 team the best.

arch_jeff commented on 2020-02-05 19:36 (UTC)

Yes, The 8-Bit Guy announced on the Facebook group he unfortunately removed the repositories for the emulator and the ROM until he rewrote the ROM.

This explains a lot. Thank you for clearing that up.

The "radio silence" of Cloanto regarding licensing requests for the C64 ROM has been nothing but strange. You'd think Cloanto would want to make money from licensing fees. I just don't understand it.

Juju commented on 2020-02-05 18:57 (UTC) (edited on 2020-02-05 19:25 (UTC) by Juju)

Yes, The 8-Bit Guy announced on the Facebook group he unfortunately removed the repositories for the emulator and the ROM until he rewrote the ROM. I posted on the forums about it, this is out of copyright concerns, it contained modified code from the original Commodore 64 and he was unable to contact Cloanto (the current copyright holder) about licensing it.

However, it does look like Michael Steil (whom I know is the main developer) has reposted the repositories on his personal account, so I guess I'm going to update the PKGBUILDs to those easily. Thanks for the tip!

EDIT: Done :) However, the tags are gone and he still haven't retagged r36 on the x16-rom repo. I changed it, but it's not gonna work until he has done so and I'm going to check this with him.