News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

arnold wip

Started by arnoldemu, 20:52, 20 January 16

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

roudoudou

l think you need to install many librairies before compiling Arnold
My pronouns are RASM and ACE

Hwikaa

Well I installed all of them. That is, those that are listed in the instructions provided.

roudoudou

Did you install the dev version ? ;D
My pronouns are RASM and ACE

Hwikaa

Nah. The 'release' one.  ;D

roudoudou

Quote from: Hwikaa on 15:45, 02 August 17
Nah. The 'release' one.  ;D


The release version does not contain "include" files with prototypes Arnold needs to compile, this is only the library for executables
My pronouns are RASM and ACE

Hwikaa

Well, I get the exact same error with the debug version...  :(

roudoudou

Is there any SDL.h file on your HDD ? If not, this is not the DEV version.
My pronouns are RASM and ACE

Hwikaa

Yes, I have it. In /Library/Frameworks/SDL2.framework/Versions/A/Headers/

arnoldemu

Quote from: Hwikaa on 16:33, 02 August 17
Yes, I have it. In /Library/Frameworks/SDL2.framework/Versions/A/Headers/
Hi!

I am the author of arnold :)

The development and release download from www.libsdl.org are the same for Mac.

Both contain the runtime and the headers. So it doesn't matter which you downloaded.

When "./make_mac.sh" is run there is some logging from the build system.

Please would you confirm that it has found SDL2?

It will display:

"Will use SDL2
SDL2_LIBRARY /Library/Frameworks/SDL2.framework
-- Found SDL2 /Library/Frameworks/SDL2.framework
SDL2 found"

Also please confirm it has found EXPAT and wxWidgets because these are also needed.

You may see a "command failed: 'install_name_tool'...". I see this and it will not stop it building and allowing you to run it. This message means that it failed to add the frameworks to the app.

If all of these are found then the build should be successful but I am building on an older version of macOS so you may find it fails.






My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Hwikaa

Hi @arnoldemu ! Thank you so much for your reply. :-)


I'll check all of this tomorrow (I don't have access to this Mac right now), and l'll get back to you.

Hwikaa

Quote from: arnoldemu on 19:35, 02 August 17
Please would you confirm that it has found SDL2?

It will display:

"Will use SDL2
SDL2_LIBRARY /Library/Frameworks/SDL2.framework
-- Found SDL2 /Library/Frameworks/SDL2.framework
SDL2 found"

Also please confirm it has found EXPAT and wxWidgets because these are also needed.

OK, so I just checked and, yes, it found everything:
Will use SDL2
SDL2_LIBRARY /Library/Frameworks/SDL2.framework
-- Found SDL2: /Library/Frameworks/SDL2.framework 
SDL2 found

-- Found EXPAT: /usr/lib/libexpat.dylib (found version "2.0.1")
-- Found wxWidgets: -L/usr/local/lib;;;-framework IOKit;-framework Carbon;-framework Cocoa;-framework AudioToolbox;-framework System;-framework OpenGL;/usr/local/lib/libwx_osx_cocoau_xrc-3.0.a;/usr/local/lib/libwx_osx_cocoau_webview-3.0.a;/usr/local/lib/libwx_osx_cocoau_qa-3.0.a;/usr/local/lib/libwx_baseu_net-3.0.a;/usr/local/lib/libwx_osx_cocoau_html-3.0.a;/usr/local/lib/libwx_osx_cocoau_adv-3.0.a;/usr/local/lib/libwx_osx_cocoau_core-3.0.a;/usr/local/lib/libwx_baseu_xml-3.0.a;/usr/local/lib/libwx_baseu-3.0.a;-framework WebKit;-lexpat;-lwxregexu-3.0;-lwxtiff-3.0;-lwxjpeg-3.0;-lwxpng-3.0;-lz;-lpthread;-liconv;-llzma (found version "3.0.3")
Using STATIC version of wxWidgets
-- Found wxWidgets: -L/usr/local/lib;;;-framework IOKit;-framework Carbon;-framework Cocoa;-framework AudioToolbox;-framework System;-framework OpenGL;/usr/local/lib/libwx_osx_cocoau_xrc-3.0.a;/usr/local/lib/libwx_baseu_net-3.0.a;/usr/local/lib/libwx_osx_cocoau_html-3.0.a;/usr/local/lib/libwx_osx_cocoau_adv-3.0.a;/usr/local/lib/libwx_osx_cocoau_core-3.0.a;/usr/local/lib/libwx_baseu_xml-3.0.a;/usr/local/lib/libwx_baseu-3.0.a;-framework WebKit;-lexpat;-lwxregexu-3.0;-lwxtiff-3.0;-lwxjpeg-3.0;-lwxpng-3.0;-lz;-lpthread;-liconv;-llzma (found version "3.0.3")


However, I keep getting the same 'fatal error'...  :(

reno

#136
Hi everyone,

I'm new here (but not new to the CPC) and I'm trying to build the Arnold WIP archive on macOS 10.12 (latest) as I write this...

I've started reading Kevin's build notes, and I just wanted to let you know that you probably don't really have to install all of the dependencies manually on Mac : there's the great Homebrew (https://brew.sh/) package manager (a bit like "apt-get") that should be able to do 90% of the job, installing both runtime AND dev dependencies just with this single command line : "brew install cmake sdl2 wxwidgets"

For this to work I just had to patch "make_arnz80_sdl2_release.sh" to use the standard "cmake" (that Homebrew installs) when it detects "Darwin" (macOS), rather than the custom path in "/Applications/...." that a manual CMake install provides.

... ok, as I finish writing this, there's now a problem with SDL2. It may be because Homebrew installs the header files under /usr/local/include/SDL2/ (like with normal Unix systems), and it looks like the "FindSDL2.cmake" module in the Arnold source tries to autodetect if it's running on macOS based on the SDL directory name ending in ".framework", which is not the case with Homebrew !

I'll try to hack this some more and report progress here...

By the way, if you are reading this Kevin, I don't know if that has been discussed already here, but have you considered hosting the source on Github ? I would be happy to contribute any build tweaks I end up making !

arnoldemu

Quote from: reno on 15:56, 11 August 17
Hi everyone,
Welcome and thank you for trying to build it. I have sent you a pm :)
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

arnoldemu

#138
I hope this DMG for mac works:

http://www.cpctech.org.uk/arnold.dmg

I built it using CPack and CMake and for me the dependencies look like they work.

Debian Package:

I hope this works. It seems to be good for me.

http://www.cpctech.org.uk/arnold_1.0.0-1_amd64.deb

Fedora rpm:

http://www.cpctech.org.uk/arnold-1.0.0-1.x86_64.rpm


My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

robcfg

The DMG works beautifully, thanks!


Things I've noticed:


- I don't know which key acts as the COPY key
- The emulator is unable to work with weirds disks, like Orion Prime.
- The timing seems to go off from time to time. You notice that on the music which starts to sound too fast.


Keep up the good work!

dirtybb


blackdalek

I am also noticing speed issues. i.e. 100% is running too fast.
CPC6128 modded with ABBA switch. External 5.25" floppy drive with side switch and Multiface 2. Now also sporting a joystick splitter and M4 WiFi board.

arnoldemu

Quote from: blackdalek on 14:12, 22 August 17
I am also noticing speed issues. i.e. 100% is running too fast.
I found the problem  :picard2:

My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

robcfg

Cool! What was the problem?


Sent from my iPhone using Tapatalk

arnoldemu

Quote from: robcfg on 16:05, 26 August 17
Cool! What was the problem?


Sent from my iPhone using Tapatalk
The fps lock is simplistic and works like this:
- record a time (becomes "previous time")
- do some work (emulate z80, etc)
- record a new time
- calculate difference between new time and previous time (= time taken for the work)
The time taken may be more or less than the time we want (the "fps" time slice).
- work out the amount of time remaining in the "fps" time slice. now burn cycles or wait until the fps time slice is up
- record new time (becomes "previous time" in the next loop)

On mac/linux I was not doing the last step. =  :picard2:

So it was calculating wrong sleep values and running at the wrong speed.

When I analysed it and added more time recording information I could see why it was going wrong.

I will now take a bit of time to improve handling when it's running slower than requested and report to the user if it's struggling to achieve the requested rate, then I'll post an update for testing.

My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

cpcitor

Hello.

A feedback and one issue with autotype using the latest zip downloaded from http://www.cpctech.org.uk/arnsrc.zip (actually http://cpctech.cpc-live.com/arnsrc.zip )

Question: when using autotype from command line, simpler way to I insert a linefeed ?

Running Linux with bash shell (like pretty much all distributions since 20 years).
I figured out this:

arnold_debug -a cf.dsk  -at 'run"cf"'$(echo -ne '\015')


Is there a simpler / more portable solution?

Bug report: clicking on CPC window while autotype runs causes missing keys

How to reproduce:

Launch arnold from command line with some autotype string like this:

make && /org/gourichon/localdata/SG/projects/free_software_involvement/tools/cpc_emulators/arnold/arnold_debug -a cf.dsk  -at '01234567890abcdefghijklmnopqrstuvwxyz'

While autotype types, click on CPC window.

Expected behaviour

Clicking does not interfere with autotype.

Observed behaviour.

The char/key being typed at the moment of the click is lost.

For example, I just tested it and the 7 was just not typed.

If also happens with short strings, like run"cf, it's just that clicking has less probability of being at a wrong time.

[attachimg=1]

Version control

As a bonus, it would be very, arnoldemu if you could version control your emulator source code and put it on some sharing platform (e.g. github, which is easy to use). That way we could cleanly discuss each issue separately with the issue tracker. Also it could be more handy, for example when running any version we could tell precisely which one it is rather than "the one I downloaded on day X, or, I think so". This is sometimes important when testing progress in bug squashing, plus other benefits.  :)
Had a CPC since 1985, currently software dev professional, including embedded systems.

I made in 2013 the first CPC cross-dev environment that auto-installs C compiler and tools: cpc-dev-tool-chain: a portable toolchain for C/ASM development targetting CPC, later forked into CPCTelera.

arnoldemu

Quote from: cpcitor on 09:38, 29 October 17
A feedback and one issue with autotype using the latest zip downloaded from http://www.cpctech.org.uk/arnsrc.zip (actually http://cpctech.cpc-live.com/arnsrc.zip )
Ok I will fix this.

Quote from: cpcitor on 09:38, 29 October 17
As a bonus, it would be very, arnoldemu if you could version control your emulator source code and put it on some sharing platform (e.g. github, which is easy to use). That way we could cleanly discuss each issue separately with the issue tracker. Also it could be more handy, for example when running any version we could tell precisely which one it is rather than "the one I downloaded on day X, or, I think so". This is sometimes important when testing progress in bug squashing, plus other benefits.  :)
I do use source control. It is accessible from the internet but it's not public because the bandwidth is limited.

I use 'fossil' (read about it here www.fossil-scm.org).

I will add the fossil 'artifact' to the about page (this is on my todo list) that will tell me the exact revision I took it from and others can reference that directly to report bugs.


My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

arnoldemu

Quote from: cpcitor on 09:38, 29 October 17
Question: when using autotype from command line, simpler way to I insert a linefeed ?
Use \n

arnold_debug -a cf.dsk -at 'run"cf"\n'
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

cpcitor

Quote from: arnoldemu on 12:03, 29 October 17
Use \n

arnold_debug -a cf.dsk -at 'run"cf"\n'

It's just plain impossible that I didn't try that. I positively did.

I think I guessed what happened: the time I checked, the bug I mentioned happened, and eat precisely the newline character.  :blank: So I thought it just could not work that way.  :)
Had a CPC since 1985, currently software dev professional, including embedded systems.

I made in 2013 the first CPC cross-dev environment that auto-installs C compiler and tools: cpc-dev-tool-chain: a portable toolchain for C/ASM development targetting CPC, later forked into CPCTelera.

cpcitor

#149
Hello. Bugs observed with recent version of arnoldemu.

Severity: current arnoldemu cannot be used for audio work here, or even games, as audio is too awful.

Summary

(1) Each time emu starts or stops, a loud "click" is heard. This is typical of an audio system where signal rest level is not zero.

(2) Audio isn't good. Typing "sound 1,284,32767" does not yield a continuous tone but an unpleasant jerky tone. Even CPC system beep is affected.

Reproducible

Always. Observed on Ubuntu 16.04 AMD64 with arnoldemu compiled from source.[attachurl=3]

Analysis of output generated by arnoldemu

Capturing arnoldemu output

I could record arnoldemu direct to audacity and indeed pulses have an irregular width, see attached picture. I also disabled pulseaudio and used alsa driver directly to rule out any bug on pulseaudio side, and this bug still remains.

Looking at arnoldemu output

Indeed, audacity shown that square waves are at the bottom of the possible values, and not near the center. This looks like a signed/unsigned mixup.

Furthermore, the square waves do not have the same width. This looks like buffer size mismatch or misuse of the audio API.

See below.

[attachimg=1]


As a result, current arnoldemu cannot be used for audio work here.


Attaching zipped wav file to let you hear and see what I hear and see [attachurl=3]

Thank you for your attention.

Had a CPC since 1985, currently software dev professional, including embedded systems.

I made in 2013 the first CPC cross-dev environment that auto-installs C compiler and tools: cpc-dev-tool-chain: a portable toolchain for C/ASM development targetting CPC, later forked into CPCTelera.

Powered by SMFPacks Menu Editor Mod