Author Topic: arnold wip  (Read 27683 times)

0 Members and 1 Guest are viewing this topic.

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 663
  • Country: fr
    • urban exploration
  • Liked: 923
  • Likes Given: 587
Re: arnold wip
« Reply #125 on: 17:23, 02 August 17 »
l think you need to install many librairies before compiling Arnold
use RASM, the best assembler ever made :p

I will survive

Offline Hwikaa

  • CPC464
  • **
  • Posts: 27
  • Country: es
  • Liked: 20
  • Likes Given: 80
Re: arnold wip
« Reply #126 on: 17:25, 02 August 17 »
Well I installed all of them. That is, those that are listed in the instructions provided.

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 663
  • Country: fr
    • urban exploration
  • Liked: 923
  • Likes Given: 587
Re: arnold wip
« Reply #127 on: 17:31, 02 August 17 »
Did you install the dev version ? ;D
use RASM, the best assembler ever made :p

I will survive

Offline Hwikaa

  • CPC464
  • **
  • Posts: 27
  • Country: es
  • Liked: 20
  • Likes Given: 80
Re: arnold wip
« Reply #128 on: 17:45, 02 August 17 »
Nah. The 'release' one.  ;D

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 663
  • Country: fr
    • urban exploration
  • Liked: 923
  • Likes Given: 587
Re: arnold wip
« Reply #129 on: 18:13, 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
use RASM, the best assembler ever made :p

I will survive

Offline Hwikaa

  • CPC464
  • **
  • Posts: 27
  • Country: es
  • Liked: 20
  • Likes Given: 80
Re: arnold wip
« Reply #130 on: 18:23, 02 August 17 »
Well, I get the exact same error with the debug version...  :(

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 663
  • Country: fr
    • urban exploration
  • Liked: 923
  • Likes Given: 587
Re: arnold wip
« Reply #131 on: 18:28, 02 August 17 »
Is there any SDL.h file on your HDD ? If not, this is not the DEV version.
use RASM, the best assembler ever made :p

I will survive

Offline Hwikaa

  • CPC464
  • **
  • Posts: 27
  • Country: es
  • Liked: 20
  • Likes Given: 80
Re: arnold wip
« Reply #132 on: 18:33, 02 August 17 »
Yes, I have it. In /Library/Frameworks/SDL2.framework/Versions/A/Headers/

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.332
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2251
  • Likes Given: 3477
Re: arnold wip
« Reply #133 on: 21:35, 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

Offline Hwikaa

  • CPC464
  • **
  • Posts: 27
  • Country: es
  • Liked: 20
  • Likes Given: 80
Re: arnold wip
« Reply #134 on: 22:40, 02 August 17 »
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.

Offline Hwikaa

  • CPC464
  • **
  • Posts: 27
  • Country: es
  • Liked: 20
  • Likes Given: 80
Re: arnold wip
« Reply #135 on: 10:59, 03 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:
Code: [Select]
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'...  :(

Offline reno

  • CPC464
  • **
  • Posts: 18
  • Country: gb
  • Liked: 2
  • Likes Given: 2
Re: arnold wip
« Reply #136 on: 17:56, 11 August 17 »
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 !
« Last Edit: 17:58, 11 August 17 by reno »

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.332
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2251
  • Likes Given: 3477
Re: arnold wip
« Reply #137 on: 21:25, 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

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.332
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2251
  • Likes Given: 3477
Re: arnold wip
« Reply #138 on: 13:05, 20 August 17 »
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


« Last Edit: 16:31, 20 August 17 by arnoldemu »
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline robcfg

  • Supporter
  • 6128 Plus
  • *
  • Posts: 2.169
  • Country: se
  • 8-Bit Technomancer
    • index.php?action=treasury
  • Liked: 964
  • Likes Given: 2153
Re: arnold wip
« Reply #139 on: 20:08, 20 August 17 »
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!

Offline dirtybb

  • CPC664
  • ***
  • Posts: 68
  • Country: fr
  • Liked: 28
  • Likes Given: 95
Re: arnold wip
« Reply #140 on: 00:37, 21 August 17 »
I hope this DMG for mac works:

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

Works like a charm, tyvm :)

Offline blackdalek

  • Supporter
  • CPC6128
  • *
  • Posts: 225
  • Country: au
  • Fraser
  • Liked: 96
  • Likes Given: 289
Re: arnold wip
« Reply #141 on: 16:12, 22 August 17 »
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.

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.332
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2251
  • Likes Given: 3477
Re: arnold wip
« Reply #142 on: 16:19, 26 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

Offline robcfg

  • Supporter
  • 6128 Plus
  • *
  • Posts: 2.169
  • Country: se
  • 8-Bit Technomancer
    • index.php?action=treasury
  • Liked: 964
  • Likes Given: 2153
Re: arnold wip
« Reply #143 on: 18:05, 26 August 17 »
Cool! What was the problem?


Sent from my iPhone using Tapatalk

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.332
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2251
  • Likes Given: 3477
Re: arnold wip
« Reply #144 on: 11:27, 27 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

Offline cpcitor

  • The user previously known as FindYWay
  • CPC6128
  • ****
  • Posts: 244
  • Country: fr
  • My heart still runs on traditional CPC.
    • My code for the CPC.
  • Liked: 113
  • Likes Given: 257
Re: arnold wip
« Reply #145 on: 10:38, 29 October 17 »
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:

Code: [Select]
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:

Code: [Select]
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 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.

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.332
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2251
  • Likes Given: 3477
Re: arnold wip
« Reply #146 on: 12:57, 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.

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

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.332
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2251
  • Likes Given: 3477
Re: arnold wip
« Reply #147 on: 13:03, 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

Offline cpcitor

  • The user previously known as FindYWay
  • CPC6128
  • ****
  • Posts: 244
  • Country: fr
  • My heart still runs on traditional CPC.
    • My code for the CPC.
  • Liked: 113
  • Likes Given: 257
Re: arnold wip
« Reply #148 on: 20:04, 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 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.

Offline cpcitor

  • The user previously known as FindYWay
  • CPC6128
  • ****
  • Posts: 244
  • Country: fr
  • My heart still runs on traditional CPC.
    • My code for the CPC.
  • Liked: 113
  • Likes Given: 257
Audio bugs
« Reply #149 on: 22:32, 01 November 17 »
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. [ Invalid Attachment ]

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  [ Invalid Attachment ]

Thank you for your attention.

« Last Edit: 22:34, 01 November 17 by cpcitor »
Had a CPC since 1985, currently software dev professional, including embedded systems.

I made 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.