Add "Vice" commodore emulator

  • Done
  • quality assurance status badge
Details
3 participants
  • Christopher Lemmer Webber
  • Ludovic Courtès
  • zimoun
Owner
unassigned
Submitted by
Christopher Lemmer Webber
Severity
normal
C
C
Christopher Lemmer Webber wrote on 12 Mar 2020 03:18
(address . guix-patches@gnu.org)
87ftees4d6.fsf@dustycloud.org
Here's a patch to add the "vice" commodore emulator. It builds and
works, but has some vices of its own (har har).

- It ships with the original Kernal/Basic from the c64 (and other
systems), including the payload for the original Microsoft Basic.
That's... probably not ok for Guix.

- One solution is coming out of the Mega65 project (a damn cool project
in general):
(Just look how cool the Mega65 hardware is, btw!)

- It really stutters a lot for me. I don't know why. I tried turning
off all the graphical extras and turning on the fastsid audio system
in the config system and it's still slow. I can't even run
robotfindskitten at full speed:
(good FOSS test program, btw.)

Oh well. What should be done now? Not sure, and thoughts welcome.

- Chris

PS: learning 6502 assembly is really fun! Here's a good resource:
C
C
Christopher Lemmer Webber wrote on 12 Mar 2020 03:20
Vice emulator, now with patch
(address . 40033@debbugs.gnu.org)
87eetys4a1.fsf@dustycloud.org
Oops, patch below:
From 3377e3b59203502c065d7c86cbb5e0f5e246862f Mon Sep 17 00:00:00 2001
From: Christopher Lemmer Webber <cwebber@dustycloud.org>
Date: Wed, 11 Mar 2020 22:04:53 -0400
Subject: [PATCH] gnu: Add vice.

* gnu/packages/emulators.scm (vice): New variable.
---
gnu/packages/emulators.scm | 58 ++++++++++++++++++++++++++++++++++++++
1 file changed, 58 insertions(+)

Toggle diff (88 lines)
diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index 7e4c98fbc7..40f81d1cc7 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -12,6 +12,7 @@
;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
;;; Copyright © 2019 David Wilson <david@daviwil.com>
;;; Copyright © 2020 Jakub K?dzio?ka <kuba@kadziolka.net>
+;;; Copyright © 2020 Christopher Lemmer Webber <cwebber@dustycloud.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -41,12 +42,14 @@
#:use-module (gnu packages audio)
#:use-module (gnu packages autotools)
#:use-module (gnu packages base)
+ #:use-module (gnu packages bison)
#:use-module (gnu packages boost)
#:use-module (gnu packages backup)
#:use-module (gnu packages cdrom)
#:use-module (gnu packages compression)
#:use-module (gnu packages curl)
#:use-module (gnu packages elf)
+ #:use-module (gnu packages flex)
#:use-module (gnu packages fonts)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages freedesktop)
@@ -1628,3 +1631,58 @@ derived from Gens. Project goals include clean source code, combined features
from various forks of Gens, and improved platform portability.")
(supported-systems '("i686-linux" "x86_64-linux"))
(license license:gpl2+)))
+
+(define-public vice
+ (package
+ (name "vice")
+ (version "3.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://sourceforge.net/projects"
+ "/vice-emu/files/releases/vice-"
+ version ".tar.gz/download"))
+ (sha256
+ (base32
+ "1svsw3z18nsj3vmpxdp456y79xsj9f1k405r07zd336kccf0rl2b"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'fix-sh
+ (lambda _
+ (substitute* (find-files "." "configure")
+ (("-/bin/sh") (string-append "-" (which "sh")))
+ (("= /bin/sh") (string-append "= " (which "sh"))))))
+ (replace 'configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ ;; The 'configure' script is a wrapper for Waf and
+ ;; doesn't recognize things like '--enable-fast-install'.
+ (invoke "./configure"
+ (string-append "--prefix=" out))))))))
+ (native-inputs
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("bison" ,bison)
+ ("texinfo" ,texinfo)))
+ (inputs
+ `(("flex" ,flex)
+ ("xa" ,xa)
+ ("sdl2" ,sdl2)
+ ("libpng" ,libpng)
+ ("libjpeg" ,libjpeg-turbo)
+ ("ffmpeg" ,ffmpeg)
+ ("giflib" ,giflib)
+ ("zlib" ,zlib)
+ ("alsa-lib" ,alsa-lib)
+ ("pulseaudio" ,pulseaudio)
+ ("portaudio" ,portaudio)
+ ("mesa" ,mesa)
+ ("glu" ,glu)))
+ (home-page "http://vice-emu.sourceforge.net/")
+ (synopsis "Versatile Commodore emulator")
+ (description
+ "VICE emulates the C64, the C64DTV, the C128, the VIC20, practically
+all PET models, the PLUS4 and the CBM-II (aka C610/C510). An extra
+emulator is provided for C64 expanded with the CMD SuperCPU.")
+ (license license:gpl2+)))
--
2.25.1
L
L
Ludovic Courtès wrote on 16 Mar 2020 22:55
Re: [bug#40033] Add "Vice" commodore emulator
(name . Christopher Lemmer Webber)(address . cwebber@dustycloud.org)(address . 40033@debbugs.gnu.org)
87h7yodkwy.fsf@gnu.org
Hi Chris!

Christopher Lemmer Webber <cwebber@dustycloud.org> skribis:

Toggle quote (7 lines)
> Here's a patch to add the "vice" commodore emulator. It builds and
> works, but has some vices of its own (har har).
>
> - It ships with the original Kernal/Basic from the c64 (and other
> systems), including the payload for the original Microsoft Basic.
> That's... probably not ok for Guix.

You mean it ships the ROM as a pre-built proprietary binary?
That wouldn’t be OK. :-/

Toggle quote (4 lines)
> - One solution is coming out of the Mega65 project (a damn cool project
> in general):
> https://github.com/MEGA65/open-roms

Do you know if that could actually work? That would be perfect.

Toggle quote (3 lines)
> (Just look how cool the Mega65 hardware is, btw!)
> https://www.youtube.com/watch?v=aEhZfkQ3bAk

Woow, fun! :-)

Thanks!
Ludo’.
C
C
Christopher Lemmer Webber wrote on 17 Mar 2020 22:17
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 40033@debbugs.gnu.org)
87zhcer89e.fsf@dustycloud.org
Ludovic Courtès writes:

Toggle quote (14 lines)
> Hi Chris!
>
> Christopher Lemmer Webber <cwebber@dustycloud.org> skribis:
>
>> Here's a patch to add the "vice" commodore emulator. It builds and
>> works, but has some vices of its own (har har).
>>
>> - It ships with the original Kernal/Basic from the c64 (and other
>> systems), including the payload for the original Microsoft Basic.
>> That's... probably not ok for Guix.
>
> You mean it ships the ROM as a pre-built proprietary binary?
> That wouldn’t be OK. :-/

Yes, they are the original binary ROMs shipped on the C64.

The funny thing is it's in the data/ directory. Lispers love to say
that "code and data and data is code"; in this case, at least data/ has
object code. ;)

I agree that it isn't acceptable for Guix.

Toggle quote (6 lines)
>> - One solution is coming out of the Mega65 project (a damn cool project
>> in general):
>> https://github.com/MEGA65/open-roms
>
> Do you know if that could actually work? That would be perfect.

I think they don't work perfectly, but can work for some things. It
would be nice to support it.

I don't have time, but I invite someone else to give a try at building
the mega65 open-roms package and linking it in. So I may have to leave
this at a "passing this along to a future community member" stage of
packaging.

If someone else can try packaging the mega65 ROMs (honestly don't know
how hard it is to do), I can at least help playtest. It would be really
good for computing history purposes to free one of the blobs holding us
back from exploring past computing systems!

Toggle quote (7 lines)
>> (Just look how cool the Mega65 hardware is, btw!)
>> https://www.youtube.com/watch?v=aEhZfkQ3bAk
>
> Woow, fun! :-)
>
> Thanks!
> Ludo’.
Z
Z
zimoun wrote on 7 Apr 2022 15:30
Re: bug#40033: Add "Vice" commodore emulator
(name . Christopher Lemmer Webber)(address . cwebber@dustycloud.org)
86czht10np.fsf_-_@gmail.com
Hi,

On Tue, 17 Mar 2020 at 17:17, Christopher Lemmer Webber <cwebber@dustycloud.org> wrote:
Toggle quote (13 lines)
> Ludovic Courtès writes:

>> You mean it ships the ROM as a pre-built proprietary binary?
>> That wouldn’t be OK. :-/
>
> Yes, they are the original binary ROMs shipped on the C64.
>
> The funny thing is it's in the data/ directory. Lispers love to say
> that "code and data and data is code"; in this case, at least data/ has
> object code. ;)
>
> I agree that it isn't acceptable for Guix.

Therefore, it is tempting to close it. :-)


Toggle quote (19 lines)
>>> - One solution is coming out of the Mega65 project (a damn cool project
>>> in general):
>>> https://github.com/MEGA65/open-roms
>>
>> Do you know if that could actually work? That would be perfect.
>
> I think they don't work perfectly, but can work for some things. It
> would be nice to support it.
>
> I don't have time, but I invite someone else to give a try at building
> the mega65 open-roms package and linking it in. So I may have to leave
> this at a "passing this along to a future community member" stage of
> packaging.
>
> If someone else can try packaging the mega65 ROMs (honestly don't know
> how hard it is to do), I can at least help playtest. It would be really
> good for computing history purposes to free one of the blobs holding us
> back from exploring past computing systems!

Well, after more than 2 years without any interaction, I am not
convinced it is worth to keep this open. Therefore, I am closing.

If I miss a point and you think it is worth to keep it open for
«"passing this along to a future community member" stage of packaging»,
feel free to reopen.


Cheers,
simon
Closed
C
C
Christine Lemmer-Webber wrote on 7 Apr 2022 19:44
(name . zimoun)(address . zimon.toutoune@gmail.com)
87sfqo94ac.fsf@dustycloud.org
zimoun <zimon.toutoune@gmail.com> writes:

Toggle quote (30 lines)
>>>> - One solution is coming out of the Mega65 project (a damn cool project
>>>> in general):
>>>> https://github.com/MEGA65/open-roms
>>>
>>> Do you know if that could actually work? That would be perfect.
>>
>> I think they don't work perfectly, but can work for some things. It
>> would be nice to support it.
>>
>> I don't have time, but I invite someone else to give a try at building
>> the mega65 open-roms package and linking it in. So I may have to leave
>> this at a "passing this along to a future community member" stage of
>> packaging.
>>
>> If someone else can try packaging the mega65 ROMs (honestly don't know
>> how hard it is to do), I can at least help playtest. It would be really
>> good for computing history purposes to free one of the blobs holding us
>> back from exploring past computing systems!
>
> Well, after more than 2 years without any interaction, I am not
> convinced it is worth to keep this open. Therefore, I am closing.
>
> If I miss a point and you think it is worth to keep it open for
> «"passing this along to a future community member" stage of packaging»,
> feel free to reopen.
>
>
> Cheers,
> simon

I think that's fair to close it. But fwiw, if any community member does
want to pick this up, they have my blessing.
Closed
?