Atomulator on OSX

discussion of games, software, hardware & emulators relating to the Acorn Atom and Acorn System machines.
harrowm
Posts: 121
Joined: Sun Nov 30, 2014 11:07 pm
Location: Singapore
Contact:

Re: Atomulator on OSX

Post by harrowm » Thu Jan 22, 2015 3:03 pm

oops :oops: :oops: Try this one :D

Sorry I'm travelling and now developing on my slow laptop .. first time someone has tried a release from this machine.
Screen Shot 2015-01-22 at 11.21.16 pm.png
Regards
Malcolm
Atomulator OSX 0.1g.app.zip
(543.57 KiB) Downloaded 52 times

User avatar
roland
Posts: 3386
Joined: Thu Aug 29, 2013 8:29 pm
Location: Born (NL)
Contact:

Re: Atomulator on OSX

Post by roland » Thu Jan 22, 2015 3:56 pm

Hi Malcolm,

Again nice progress =D>
Colours really look great. However, in CLEAR 0 and text mode they are not correct:
Schermafbeelding 2015-01-22 om 16.42.32.png
The blue colour should be yellow and the white part should be red but I guess that's just a small change.

The SID works but it's not perfect. If it helps you I can make a video recording of playing a track so you can compare your Atomulator with a GODIL SID.

Also when playing a sound with normal Atom sound, like Snapper or PRINT $7 the Atomulator waits a short while and then produces the sound.

But however, your progress is great! I'm already very glad with the result so far.

BTW ... making a screenshot makes Atomulator crash :mrgreen:

Cheers,
Roland
256K + 6502 Inside
MAN WOMAN :shock:

harrowm
Posts: 121
Joined: Sun Nov 30, 2014 11:07 pm
Location: Singapore
Contact:

Re: Atomulator on OSX

Post by harrowm » Thu Jan 22, 2015 10:10 pm

Thanks for testing. I fixed the colour issue and the screensaver crash:
Screen Shot 2015-01-23 at 6.01.25 am.png
The SID works but it's not perfect. If it helps you I can make a video recording of playing a track so you can compare your Atomulator with a GODIL SID.

Also when playing a sound with normal Atom sound, like Snapper or PRINT $7 the Atomulator waits a short while and then produces the sound.
A short video would be great to compare. Something isn't right, if you choose resampling method then the CPU usage goes to 100%. I also hear no difference between the different SID types .. is this subtle or is there usually a big difference ?

Normal sound lagging .. mmm .. could I ask you to start the SID video with some PRINT $7s ? I'll take a look at that too !

Many thanks for spending the time to test .. appreciate the feedback
Regards
Malcolm
Attachments
Atomulator OSX 0.1h.app.zip
(544.79 KiB) Downloaded 45 times

User avatar
hoglet
Posts: 8544
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: Atomulator on OSX

Post by hoglet » Thu Jan 22, 2015 10:21 pm

harrowm wrote:Normal sound lagging .. mmm .. could I ask you to start the SID video with some PRINT $7s ? I'll take a look at that too !
I had this problem with Optima as well.

The sound buffer was 3120*4 samples, giving a latency of 400ms.

I reduced this to 1024*4 samples, giving a latency of 125ms.

The sample rate is ~32KHz.

At least, that's what this commit says:
https://github.com/hoglet67/Optima/comm ... ece91a6f63

Dave

harrowm
Posts: 121
Joined: Sun Nov 30, 2014 11:07 pm
Location: Singapore
Contact:

Re: Atomulator on OSX

Post by harrowm » Thu Jan 22, 2015 10:44 pm

Ah, that probably partly explains the SID issue too. Songs are recognizable but the timing is off.

Does the Linux version have the same issue ?

Regards
Malcolm

harrowm
Posts: 121
Joined: Sun Nov 30, 2014 11:07 pm
Location: Singapore
Contact:

Re: Atomulator on OSX

Post by harrowm » Sat Jan 24, 2015 12:34 am

It was quicker to implement fastsid than change the buffer size .. and I think this was enough, certainly on my faster Mac. CPU usage for sid_fillbuf() fell from about 11% to 0.8%.

Also added the icon to the app .. which actually took longer than the fastsid changes :shock:

Regards
Malcolm
Atomulator OSX 0.1i.app.zip
(477.42 KiB) Downloaded 48 times

User avatar
roland
Posts: 3386
Joined: Thu Aug 29, 2013 8:29 pm
Location: Born (NL)
Contact:

Re: Atomulator on OSX

Post by roland » Sat Jan 24, 2015 7:41 pm

Hi Malcolm,

This is really great =D> You're doing a great job.

It runs fine and fast enough on my 3GHz dual core 8GB iMac. Imagine, so much power needed for playing Repton :lol:
Schermafbeelding 2015-01-24 om 20.35.52.png
Thanks for your efforts so far,
Greetings,
Roland
256K + 6502 Inside
MAN WOMAN :shock:

User avatar
oss003
Posts: 3098
Joined: Tue Jul 14, 2009 11:57 am
Location: Netherlands
Contact:

Re: Atomulator on OSX

Post by oss003 » Sat Jan 24, 2015 9:31 pm

Great job Malcolm =D> =D> =D>

You almost want me to buy an Apple ....... :^o

Greetings
Kees

harrowm
Posts: 121
Joined: Sun Nov 30, 2014 11:07 pm
Location: Singapore
Contact:

Re: Atomulator on OSX

Post by harrowm » Sun Jan 25, 2015 4:35 am

Thanks .. I'm standing on the shoulders of giants. I've assembled all my "spare parts" plus a "cheap" Pentium G3258 into a Linux box so I can do some comparisons .. but I must admit I'm loving the developer toolset on OS X .. its easy to look across functions, threads and CPU Core usage and spot issues. Something simple like selecting code blocks and commenting out, indenting left/right are so simple .. I guess something like Eclipse must be similar, but quite a difference from what I was used to.

Here's the latest version .. I pulled the drawing of the screen into its own timing loop and put in menu options for mono, colour 50Hz and colour 60Hz .. so the display updates should be time locked.

I rewrote the switch statements in readmeml() .. its about 3x quicker .. unusual, I think the compiler wasn't optimizing the switch efficiently.

Latest code at https://github.com/harrowm/Atomulator

Malcolm
Atomulator OSX 0.1k.app.zip
(481.89 KiB) Downloaded 43 times

User avatar
roland
Posts: 3386
Joined: Thu Aug 29, 2013 8:29 pm
Location: Born (NL)
Contact:

Re: Atomulator on OSX

Post by roland » Sun Jan 25, 2015 10:16 am

Hi Malcolm,

Is it just my imagination or is the Atom-sound latency smaller when running at 60Hz? I tried this little program and it seems that the time between printing the message and hearing the sound is smaller at 60Hz then 50Hz.
Schermafbeelding 2015-01-25 om 11.00.01.png
You also notice this latency when playing Snapper. But to be honest, I didn't try this on the Windows or Linux version of Atomulator.

It's an amazing job you have done, even if you say that you've only put the parts together. After all, you made it happen on OS X =D>

In the past I also had the intention to port Atomulator to Mac OS X. But I haven't any experience with developing for OS X so I wouldn't got so far in so less time.

Cheers,
Roland
256K + 6502 Inside
MAN WOMAN :shock:

User avatar
oss003
Posts: 3098
Joined: Tue Jul 14, 2009 11:57 am
Location: Netherlands
Contact:

Re: Atomulator on OSX

Post by oss003 » Sun Jan 25, 2015 10:56 am

Hi guys,

the Windows version also has latency on playing sound.

Greetings
Kees

User avatar
hoglet
Posts: 8544
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: Atomulator on OSX

Post by hoglet » Sun Jan 25, 2015 11:04 am

oss003 wrote: the Windows version also has latency on playing sound.
IIRC, the sound buffer works out at ~400ms latency if it is full.

In Optima I reduced this to 125ms without any apparent ill effects.

If it's too small, I would expect occasional clicking to occur.

Dave

harrowm
Posts: 121
Joined: Sun Nov 30, 2014 11:07 pm
Location: Singapore
Contact:

Re: Atomulator on OSX

Post by harrowm » Sun Jan 25, 2015 11:41 am

I tried to change this before .. let me have another attempt. I'm not sure if I had a coding or a physics failure but it would always click. Definitely an issue between the chair and the keyboard :)

So if the frequency is 31250Hz .. and your cycle time is 125ms .. I have to give OpenAl 31250*100/125 = 4018.75 byte of data .. and you gave it 1024*4 bytes .. is that the principle ?

Malcolm

User avatar
hoglet
Posts: 8544
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: Atomulator on OSX

Post by hoglet » Sun Jan 25, 2015 11:57 am

So if the frequency is 31250Hz .. and your cycle time is 125ms .. I have to give OpenAl 31250*100/125 = 4018.75 byte of data .. and you gave it 1024*4 bytes .. is that the principle ?
[/quote]
I'm not sure what you mean by cycle time?

As far as I understand, the depth of the sound buffer is somewhat arbitrary. So you should be able to increase or decrease it without changing anything else in Atomulator.

But then again, maybe I've not understood things properly in the case!

Dave

harrowm
Posts: 121
Joined: Sun Nov 30, 2014 11:07 pm
Location: Singapore
Contact:

Re: Atomulator on OSX

Post by harrowm » Sun Feb 01, 2015 3:00 am

Roland, in the code, I pulled the screen redraws into a separate thread, but didn't change the main emulator loop. The sound samples are recorded by the function pollsound() which is called 15600 times a second in 50Hz mode and 15720 times in 60Hz mode. The sound samples are collected in a buffer and when the buffer is full its pushed to the OpenAL library to play. The size of the buffer is too big, which is why there is a lag. However, as Dave pointed out if the buffer is too small and the emulator too slow we may get issues.

This was quite frustrating to fix. Every time I changed the buffer size I would get annoying clicks. Also the original programmer had defined the buffer in 8255.c like this:

Code: Select all

int16_t sndbuffer[312 * 2 * 5];
Which implied some magic to the buffer size.

After hearing a *lot* of clicks, I spotted the issue. When the buffer is passed to the OpenAL library its converted to a different format and another buffer is used. This is defined in soundopenal.c as:

Code: Select all

#define BUFLEN ((312 * 2 * 5) * 4)
#-o #-o #-o
So, Dave is correct the buffer size doesn't matter .. but these two have to be consistent otherwise clicks occur.

I changed both to 312*2*2 and it seems much better .. however, if I run Atomulator below 100% I get annoying clicks. I did have some fun running old and new Atomulator side by side :D :D. On my faster Mac both Atomulators run at full speed :D
Screen Shot 2015-02-01 at 10.21.18 am.png
Here's a new build.
Atomulator OSX 0.1l.app.zip
(482.03 KiB) Downloaded 47 times
Code is in github.

Malcolm

User avatar
roland
Posts: 3386
Joined: Thu Aug 29, 2013 8:29 pm
Location: Born (NL)
Contact:

Re: Atomulator on OSX

Post by roland » Sun Feb 01, 2015 11:22 am

Hi Malcolm,

I have tested this version and it it the best Atomulator I have ever run =D> =D> =D>

The audio lag has gone on my iMac. I really don't bother the ticks at lower speeds, I don't run an Atom at that speed anyway. In higher speeds I don't notice any ticks.

Greetings,
Roland
256K + 6502 Inside
MAN WOMAN :shock:

harrowm
Posts: 121
Joined: Sun Nov 30, 2014 11:07 pm
Location: Singapore
Contact:

Re: Atomulator on OSX

Post by harrowm » Sun Feb 01, 2015 2:37 pm

:D

There are still some things to do. Disk noise for example. I want to try to use allegro sound mixers for this .. But I'm struggling. More clicks and beeps :(

harrowm
Posts: 121
Joined: Sun Nov 30, 2014 11:07 pm
Location: Singapore
Contact:

Re: Atomulator on OSX

Post by harrowm » Sun Jun 28, 2015 8:17 am

Latest version .. sources via

Code: Select all

git clone https://github.com/harrowm/Atomulator
No functional changes, was playing around with trying to move to dynamic libraries or frameworks (OS X dynamic libraries) .. but have now reverted back to static libraries. The executable is small enough.

Malcolm
Attachments
Atomulator OSX 0.1r.app.zip
(821.45 KiB) Downloaded 39 times

Prime
Posts: 2786
Joined: Sun May 31, 2009 11:52 pm
Contact:

Re: Atomulator on OSX

Post by Prime » Wed Dec 09, 2015 3:01 pm

Can you tell me what tools I'll need to build Atomulator on the Apple, I'll see if I can merge my latest changes into the MacOS version.

Going forward once the Apple version is working correctly with Allegro 5, should we perhaps considder back porting the changes to the regular Atomulator as Allegro 4 is now legacy.

Cheers.

Phill.

User avatar
danielj
Posts: 7504
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester
Contact:

Re: Atomulator on OSX

Post by danielj » Wed Dec 09, 2015 5:30 pm

Just xcode AFAIK.

d.

Prime
Posts: 2786
Joined: Sun May 31, 2009 11:52 pm
Contact:

Re: Atomulator on OSX

Post by Prime » Wed Dec 09, 2015 6:53 pm

danielj wrote:Just xcode AFAIK.
Well presumably I'd have to build / download Allegro 5 or is that included in xcode these days?

Cheers.

Phill.

User avatar
danielj
Posts: 7504
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester
Contact:

Re: Atomulator on OSX

Post by danielj » Wed Dec 09, 2015 7:05 pm

Ah, sorry - yes (I think so!). I thought that was a given though :D For allegro, you could try installing homebrew and using that to install it?

d.

harrowm
Posts: 121
Joined: Sun Nov 30, 2014 11:07 pm
Location: Singapore
Contact:

Re: Atomulator on OSX

Post by harrowm » Tue Dec 15, 2015 3:27 pm

Yes, correct. Instructions in my original posts.

I have a version based on 1.24 / Allegro 5 which compiles and runs on Debian and Windows .. But not on OS X haha. I don't think I have the time to keep up with you all. Let me package and share. It also has the debugger part implemented. I'll try to post this weekend.

Malcolm

Prime
Posts: 2786
Joined: Sun May 31, 2009 11:52 pm
Contact:

Re: Atomulator on OSX

Post by Prime » Tue Dec 15, 2015 11:25 pm

harrowm wrote:Yes, correct. Instructions in my original posts.

I have a version based on 1.24 / Allegro 5 which compiles and runs on Debian and Windows .. But not on OS X haha. I don't think I have the time to keep up with you all. Let me package and share. It also has the debugger part implemented. I'll try to post this weekend.
Well if we could get all the ports using Allegro 5 it would certainly help as I guess most of the rest of it could be handled by #ifdefs and / or different Makefiles.

Cheers.

Phill.

harrowm
Posts: 121
Joined: Sun Nov 30, 2014 11:07 pm
Location: Singapore
Contact:

Re: Atomulator on OSX

Post by harrowm » Wed Dec 23, 2015 2:12 pm

File created with:

Code: Select all

tar cvzf atomulator.tar.gz Atomulator-1/
Please feel free to make any use you wish of this code. I drifted away from it over the last few months, but the aim was to get a version of Atomulator working with allegro5 and a common code base between Windows and Linux. I would then report to OSX (which by then should be trivial).

This is work in progress .. the executable in the zip was compiled on Debian 64bit and should work (you need to put the right files in the mmc directory, I deleted these for space in the zip file).

Things that need fixing:
- disk drive noise (need to convert allegro 5 calls to perform noise mixing)
- add in debugger and SID menu items
- debugger .. I think this can be done in native allegro 5 calls .. with one compromise .. a separate input and output window. If you uncomment the lines in main.c you can force the dubugger to run at startup. The memory viewer works (although the colours change differently from the windows version). The output window works. The input window accepts input but some echoing and scrolling of historical commands would be pleasant. The real missing piece is using user events to tell the Atomulator window to execute commands. There are some excamples in the allegro 5 source code that use inter window/process communication to achive switching of processing between windows, so I think this should be possible.

The windows makefile is tricky. The order of the libraries is important.

I really home someone takes this forward and improves upon it !

Malcolm
Attachments
atomulator.tar.gz
(4.52 MiB) Downloaded 40 times

harrowm
Posts: 121
Joined: Sun Nov 30, 2014 11:07 pm
Location: Singapore
Contact:

Re: Atomulator on OSX

Post by harrowm » Sun Dec 27, 2015 6:58 am

Edited 9th August 2016 to include updates relating to VirtualBox 5.1.2

I wanted to check that this would compile ok on a new build .. and as I know a few people use Ubuntu rather than Debian, I thought I would try that instead. Apart from a segmentation fault when you quit Atomulator it seems ok :shock: Oh and starting the debugger seems to kill performance so it looks like its crashed #-o #-o However is does play Chuckie Egg :lol: :lol:

I've been using VirtualBox to host my development. I really like it, if I mess up then its easy to start again without messing up my main machine. As my main machine is running OSX, its also means I can code in Linux or Windows if I want to.

Download and install VirtualBox
https://www.virtualbox.org/wiki/Downloads
Download both the platform package and the VirtualBox Extension Pack. At the time of writing the latest version is 5.1.2.

Download Ubuntu 64 bit ISO
I found that torrenting the network install ISO was the fastest was to install. This post used Ubuntu 16.4.1.
http://www.ubuntu.com/download/alternative-downloads

Build the basic Virtual Machine (VM)
Start VirtualBox. First install the extension pack by click on the downloaded file.

Once that has completed, create a new Virtual Machine by clicking on the New icon. We want a VM with 16Gb storage, so click expert mode then create a VM with the name Ubuntu64base, 4Gb memory (or 2Gb), 20Gb virtual disk.

You have now created a VM, start the VM by pressing Start in the button bar

On first power up, you are asked for a virtual disk image, choose the Ubuntu image you downloaded above and install Ubuntu. You are installing this on your 20Gb virtual drive, so you can “erase disk and install Ubuntu” safely.

When the install has completed, it will reboot and you can login.

To start a UNIX shell, on the Ubuntu symbol and then type “terminal” in the search box. Click on the Terminal icon to start a shell. You will use the Terminal application a lot. To make it easy to find, scroll the icon bar down until you can see the Terminal icon. Click and hold the icon and then drag it to the top of the icon bar.

Installing VirtualBox Guest Additions
These download a series of drivers to improve performance. The video driver is critical for Atomulator performance.
Insert the Guest additions CD .. Choose “Insert Guest Additions CD Image ..” from the Devices menu of the VirtualBox window and confirm you wish to run the software when Ubuntu prompts.

With the powered off VM highlighted, lets change the configuration of the VM:

Click on the word “Display” above the line “Video Memory: 16MB”.
Change the Video Memory to 128MB and Click on enable 3D Acceleration.
Save the changes.

Switch on the clipboard between the host and VM. Click on the title “General”, choose the Advanced tab and set Clipboard to bi-directional. Save the changes.

Start the VM.

From a terminal window, type:

Code: Select all

/usr/lib/nux/unity_support_test -p
This should give all “yes” answers.

This is the end of the VirtualBox setup .. you may want to clone the machine in VirtualBox to save the machine image.

Installing allegro 5
Derived from the instructions at:
https://wiki.allegro.cc/index.php?title ... nux/Debian

In the VM and open a UNIX terminal. Type:

Code: Select all

sudo apt-get install build-essential git cmake cmake-curses-gui xorg-dev libgl1-mesa-dev libglu-dev

sudo apt-get install libpng-dev libcurl4-openssl-dev libfreetype6-dev libjpeg-dev libvorbis-dev libopenal-dev libphysfs-dev libgtk2.0-dev libasound-dev libpulse-dev libflac-dev libdumb1-dev

Code: Select all

cd
(or change directory to where you wish to download the allegro code)

Code: Select all

git clone https://github.com/liballeg/allegro5.git
cd allegro5
mkdir build
cd build

Code: Select all

ccmake -DCMAKE_INSTALL_PREFIX=/usr ..
Type c to configure
If you get an error about video support, press e to exit
Change SHARED to OFF on the screen so that we build static libraries.
Change WANT_MONOLITHIC to ON so that we get one allegro static library.
Press c again to configure.
Press g to generate
Build allegro with:

Code: Select all

make
sudo make install
Try an example program:

Code: Select all

cd examples
./ex_draw
Screen Shot 2015-12-27 at 2.49.41 PM.png
Compiling Atomulator
Download the AtomulatorOSX code

Code: Select all

git clone https://github.com/harrowm/AtomulatorOSX
Download the software archive (use Firefox in the VM):
http://www.stardot.org.uk/forums/viewto ... &start=900

Code: Select all

mkdir AtomulatorOSX/mmc
unzip ../Downloads/AtomSoftwareArchive_20151119_V9.zip -d AtomulatorOSX/mmc
Compile Atomulator

Code: Select all

cd AtomulatorOSX
cd src
make clean
make
Enjoy !

Code: Select all

cd ..
./Atomulator-Linux-x86_64
Screen Shot 2015-12-27 at 2.38.19 PM.png
Last edited by harrowm on Tue Aug 09, 2016 2:50 am, edited 1 time in total.

harrowm
Posts: 121
Joined: Sun Nov 30, 2014 11:07 pm
Location: Singapore
Contact:

Re: Atomulator on OSX

Post by harrowm » Sat Jan 02, 2016 3:41 pm

Compiling on Windows
I wanted to use Visual Studio rather than MinGW32 or similar. After some messing about, I’ve now compiled this under MS Visual Studio 2015 on Windows 10 64 bit and run it on that machine and a Windows 7 64 bit machine.

Both were run on virtual machines on VirtualBox, some pointers:
* The VMs need 4Gb memory, 32Gb hard disk and >1 CPU to run efficiently. VirtualBox seems to report I have 16 CPUs .. I have 4 Cores + Hyperthreading, so I expected 8. Anyway, I gave the VM 4 of these “CPUs”.
* Windows 10 is easy to install because you can declare “I don’t have a product key” and it continues with the install.
* You must install the VirtualBox Guest Editions CD while running in Windows “safe” mode (press F8 on startup). You need to be running the WDDM experimental 3D driver for Allegro to be able to create a bitmap display.

I used Visual Studio 2015 Community Edition (its free):
https://www.visualstudio.com/en-us/down ... io-vs.aspx

A default installation is fine. After first launch, download C/C++ support: Choose File, New, Project. Start a Visual C++ project for Universal Windows and download (again).

From now you can follow the instructions at:
https://wiki.allegro.cc/index.php?title ... _Allegro_5

Test that the test program works ok.

Setting up the Atomulator project in Visual Studio

Importing the code
File, New, Project from Existing Code ..
Choose Visual C++
Choose Next then for the project file location choose the root Atomulator directory. Make sure that the add subfolders check box is checked. Choose a project name. Click finish.

Add the Allegro NuGet package
If the window “Solution Explorer” isn’t visible, then open it: View, Solution Explorer.
Right click the project name (not the solution name) and choose Manage NuGet packages.
Click Browse, search for and install:
Allegro
The latest version is currently 5.1.12.2

Configuration
Right click on the project name and choose properties. Under configurations, top left, choose “All configurations”.
* To remove some of the warning messages: under Configuration Properties, C/C++, Preprocessor edit the first item in the table “Preprocessor Definitions” and add:
_CRT_SECURE_NO_WARNINGS
* Under Configuration Properties, Allegro 5, Library Type - choose Static Monolith Release - Static runtime
* Under C/C++, Code Generation, Runtime Library Choose “Multi-threaded - /MT”.
Save the changes.

Edit the atom.cfg file and change the mmc_path directory.

Compile and run the code
Press the green arrow in the button bar.


If you just want to run this version of Atomulator, the .exe is in the attached zip file. Feedback welcome.

Quite a few things don’t work:
dd noise
keyboard redefine dialog
joystick support
debugger and menu items missing
menu items to configure SID missing
any changes made to Atomulator after 1.24
bug: “crackling noise” on audio .. very annoyingly this issue has re-occurred.
bug: On Ubuntu - core dumps on exit, doesn’t crash on Windows
bug: On Windows, *menu, b, k - the BEEB Sid screen seems to be missing a few horizontal lines - e.g. words Enola Gay. Not present on Ubuntu.

Code changes required to compile under Visual Studio
I had to make a number of changes for the code to compile. Most of these are trivial and reflect different warning levels of the compiler compared to GCC. For these, I just made the change and checked that the code still compiles and runs on Ubuntu.

Some changes are related to #defines already being used within Windows, e.g. ERROR_NO_DATA, in these cases I changed the #defines and their uses, e.g. in this case to MMC_ERROR_NO_DATA.

One major difference is the lack of POSIX file support in Windows when not using MinGW32 or similar. There are two new files - dirent.h and unistd.h - that are ported version of the POSIX header files. They seem to work with my (limited) testing.

Where code had to be different, the code is wrapped with:
#ifdef _MSC_VER
.. // only run if using Visual Studio
#endif
Screen Shot 2016-01-02 at 11.30.42 PM.png
Attachments
Atomulator1.24x.exe.zip
(783.79 KiB) Downloaded 27 times
Atomulator.zip
(4.24 MiB) Downloaded 23 times

harrowm
Posts: 121
Joined: Sun Nov 30, 2014 11:07 pm
Location: Singapore
Contact:

Re: Atomulator on OSX

Post by harrowm » Sun Jan 17, 2016 12:36 pm

Quite a few things don’t work:
dd noise
keyboard redefine dialog
joystick support
debugger and menu items missing
menu items to configure SID missing
any changes made to Atomulator after 1.24
bug: “crackling noise” on audio .. very annoyingly this issue has re-occurred.
bug: On Ubuntu - core dumps on exit, doesn’t crash on Windows
bug: On Windows, *menu, b, k - the BEEB Sid screen seems to be missing a few horizontal lines - e.g. words Enola Gay. Not present on Ubuntu
Code changed for the following:
ddnoise
menu items to configure SID
bug: crackling noise on audio
any changes made to Atomulator after 1.24

However, something is wrong. In BBC mode, I get ..
Capture1.PNG
In non-BBC mode I get ..
Capture3.PNG
Sometimes I get more or less of the startup message. In both cases the Atomulator thread for the atom seems to be in a loop. The allegro gui is responsive:
Capture2.PNG
My suspicion is that I've messed up the ROM loading somehow. Extensive use of "Beyond Compare" - a simply brilliant product btw - has yet to throw up the issue. The ROM images I'm using are as per the latest Atomulator source I know of: Atomulator-master-2015-12-09

Anyone any ideas ? What does the "@@@" screen mean ? Why on my normal startup am I not getting "+ ATOMMC2" in the message ?

Frustrating day :cry: :cry: :cry:

Malcolm
Attachments
bbc-rlog.txt
(1.99 KiB) Downloaded 31 times
atom-rlog.txt
(2.08 KiB) Downloaded 27 times

User avatar
oss003
Posts: 3098
Joined: Tue Jul 14, 2009 11:57 am
Location: Netherlands
Contact:

Re: Atomulator on OSX

Post by oss003 » Sun Jan 17, 2016 1:47 pm

Hi Malcolm,

are you sure that the ramrom.rom file is ok?

Code: Select all

Memory map ramrom.rom file:
 // 0x00000 - Atom #A000 Bank 0           // 0x10000 - Atom Basic (DskRomEn=1)
 // 0x01000 - Atom #A000 Bank 1           // 0x11000 - Atom FP (DskRomEn=1)
 // 0x02000 - Atom #A000 Bank 2           // 0x12000 - Atom MMC (DskRomEn=1)
 // 0x03000 - Atom #A000 Bank 3           // 0x13000 - Atom Kernel (DskRomEn=1)
 // 0x04000 - Atom #A000 Bank 4           // 0x14000 - Atom Basic (DskRomEn=0)
 // 0x05000 - Atom #A000 Bank 5           // 0x15000 - Atom FP (DskRomEn=0)
 // 0x06000 - Atom #A000 Bank 6           // 0x16000 - unused
 // 0x07000 - Atom #A000 Bank 7           // 0x17000 - Atom Kernel (DskRomEn=0)
 // 0x08000 - BBC #6000 Bank 0 (ExtROM1)  // 0x18000 - unused
 // 0x09000 - BBC #6000 Bank 1 (ExtROM1)  // 0x19000 - BBC #7000 (ExtROM2)
 // 0x0A000 - BBC #6000 Bank 2 (ExtROM1)  // 0x1A000 - BBC Basic 1/4
 // 0x0B000 - BBC #6000 Bank 3 (ExtROM1)  // 0x1B000 - unused
 // 0x0C000 - BBC #6000 Bank 4 (ExtROM1)  // 0x1C000 - BBC Basic 2/4
 // 0x0D000 - BBC #6000 Bank 5 (ExtROM1)  // 0x1D000 - BBC Basic 3/4
 // 0x0E000 - BBC #6000 Bank 6 (ExtROM1)  // 0x1E000 - BBC Basic 4/4
 // 0x0F000 - BBC #6000 Bank 7 (ExtROM1)  // 0x1F000 - BBC MOS 3.0
The @@@@@ on the screen indicates that the Atom switched to graphicmode, cleared the screen with $00, and switched back to textmode.
So the @@@ you see are $00's.

Is the file atom_bbc_ext2.rom in the roms directory, this is the BBCMMC rom?

Greetings
Kees
Attachments
ramrom.zip
(57.84 KiB) Downloaded 25 times
atom_bbc_ext2.zip
(1.65 KiB) Downloaded 24 times

harrowm
Posts: 121
Joined: Sun Nov 30, 2014 11:07 pm
Location: Singapore
Contact:

Re: Atomulator on OSX

Post by harrowm » Sun Jan 17, 2016 2:17 pm

Many thanks for the reply =D> =D> =D>
These are the files I have in my roms directory:
Capture4.PNG
Mmm .. well your ramrom.rom is different from the one I was using:
Capture5.PNG
The red blocks on the left hand side of the screen show where the changes are. Anyway, it made no difference to Atomulator's ability to boot. What is the ramrom.rom file .. is it a collection of roms like MMC in one file ? So the file you sent me has some more modern rom images in it ? Would the other rom image be included in ramrom.rom ? This rom isn't loaded by the code, eg from the official 1.24 release:

Code: Select all

void loadroms()
{
	load_rom("roms/akernel.rom",		    ROM_SIZE_ATOM,          ROM_OFS_AKERNEL);
	load_rom("roms/dosrom.rom",             ROM_SIZE_ATOM,          ROM_OFS_DOSROM);
	load_rom("roms/afloat.rom",             ROM_SIZE_ATOM,          ROM_OFS_AFLOAT);
	load_rom("roms/abasic.rom",             ROM_SIZE_ATOM,          ROM_OFS_ABASIC);
	load_rom("roms/axr1.rom",               ROM_SIZE_ATOM,          ROM_OFS_UTILITY);
	load_rom("roms/ramrom.rom",             RAM_ROM_SIZE,           ROM_OFS_RAMROM);

}
Regards
Malcolm

Post Reply