Dinaao, A new Apple1 emulator.

13 replies [Last post]
Offline
Joined: Jan 14 2008
Posts: 16

Good new everybody!

Today I'm releasing a new Apple1 emulator, Dinaao, which stands for "Dinaao is not an Apple One".
It works on console under MacOSX, Linux and Solaris. Cut and Paste works flawlessly both ways.
It already runs most Apple1 software and will only get better as more people play with it.

I've got it to the point where it's more fun playing with it than coding on it, so it must be ready.

I'll post the code on applefritter as soon as I get a message as to how. It seems the file area is locked down.

Send me a message if you are interested. Thanks!

JGilbert.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Offline
Joined: Jan 14 2008
Posts: 16
New update, Version 1.01

I spent a few hours last night adding new opcodes and fixing a few bugs. The initial version had an "Indirect, Y" bug that I had fixed but somehow didn't get folded in. There's only
seven 65C02 only opcodes left to add to have the entire set.
Anyway, the new version is dead on with the real thing now in all but one program that I know of, I should have that fixed in the next few days.

Let me know if you want a copy. Hopefully it will be available in the files section soon.

Offline
Joined: Jan 14 2008
Posts: 16
And it's now on sourceforge.

It seems to be the only Apple1 emulator on sourceforge. 8^)
http://sourceforge.net/project/showfiles.php?group_id=215607

Let me know if you get it running.
Thanks.

B.T.W. I just ordered the CFFA1, I'll post an update notice when I get this emulated.
Next, I think I'll make dinaao.sf.net work.
jgilbert

Offline
Joined: Sep 8 2006
Posts: 5
I've been Playing with this f

I've been Playing with this for a few days now. It compiles and runs just fine under OS X. The only problem I have is the function keys - Expose gets in the way. But that hasn't been to big of a problem.

Thanks for the great piece of software!

- Derrik

__________________

Derrik Walker v2.0, RHCE
http://www.doomd.net

Offline
Joined: Jan 14 2008
Posts: 16
Function keys

Yeah, I've disabled the expose function keys on my machine to make this work. I started development on a Linux box but shifted over to a Mac (my first) when my laptop broke.
If you look at the dinaao.c code, it's very easy to move these functions around to other keys. If you look at the input.c code, this is where I catch and parse ESC and function keys. I've never seen any other program try to do this, so it's probably pretty stupid, but it seems to work on Mac, Linux, and Solaris.

B.T.W. Mac's have a nifty bug where if you use tcsetattr to put stdin into blocked mode, it won't actually do that until you hit a key. If you don't game it yourself, you can end up in a really nasty spinwait. I've seen other programs ported to Mac go nuts because of this. Look at my nb_getchar for a stupid workaround.

I think it's a bug that you can't set expose hotkeys to any key you want, like shift-fn-F8. Stupid menu list. Also, if you play with my input program, you'll see that I never even see shift-F# and the like.

Anyway, hope it's useful for you, or at least fun!
- jgilbert

Offline
Joined: Jan 14 2008
Posts: 16
Function keys part 2

If you open the Expose' & Spaces preferences page, holding the ctrl key down, you can
select ctrl-F9 through ctrl-F12 for Expose'.
If you open System Preferences -> Keyboard and Mouse, there's a checkbox for
"Use all F1, F2, etc. keys as standard function keys"

Then FN-F# works for changing screen brightness, CTRL-F# works for Expose', and naked function keys do what they are supposed to.

On a somewhat related note. I was messing around with "MESS apple1" (slightly modified to run the Replica1 BIOS and dump CPU state), and couldn't get out of full screen mode. I couldn't get it to quit, so I was just trying various keys to try to get my computer back. After a few seconds my computer started talking! It took me ten minutes and a reboot to figure out how to get it to shut up.
It turns out you can hit Apple-F5 and it will toggle the "Voice Over" speech synthesizer. It was very amusing.

- jgilbert

Offline
Joined: Apr 17 2007
Posts: 20
Dinaao on MacOSX ..can't open file replica13.bin

Hello,

I downloaded dinaao and tried to start it in the console.
It failed at the "make command".
Ok my fault: I had to install Xcode before, now this worked.

But when I started dinaao using the open command I get the message:
" Loading replica13.bin... -> 0xE000 - 0xFFFF
" Can't open file replica13.bin"
"logout"
"Prozess beendet"

What I am doing wrong? Can you help me

I am so curious about your emulation.

minimani

Offline
Joined: Jun 23 2005
Posts: 48
Is the replica13.bin file in

Is the replica13.bin file in the same directory as the executable?

Offline
Joined: Apr 17 2007
Posts: 20
Hello Kallikak, ...yes t

Hello Kallikak,

...yes the replica13a.bin file is in the same directory as the executable

Offline
Joined: Jun 23 2005
Posts: 48
The code I downloaded looks f

The code I downloaded looks for "replica13a.bin", and if it is absent reports it missing. But the message you posted mentions "replica13.bin"? (that is without the 'a') Have a look at the dinaao.c source code file for the method doInit() and see exactly what file name it is looking for, and make sure you have the appropriate file in the directory.

Ken

Offline
Joined: Jan 14 2008
Posts: 16
missing rom

Hello minimani,

A couple of things that might help you get this working. Dinaao 1.01 looks in the current directory of wherever it's run (this is most likely why it's not seeing the file on your system), so it's kind of brain dead in that respect. I might fix this in a later version if someone suggests a common area to tuck these kind of files.

If you re-unpack the tar.bz2 you will find I've included a couple of other roms that will also work with dinaao. If you're comfortable editing dinaao.c around lines 185, you can point it to whichever rom or roms you want. If not, it's not doing any checking (besides size), so you could just rename or move one.
replica13a.bin is the 6502 rom (13b is the 65C02) version 1.3 of Krusader created by Ken Wessen, a slightly modified version of the WozMonitor, and the stock BASIC. If you run a program under Krusader and it hits a BRK instruction, this version will then let you step through the rest of the program. I think this is the most useful for debugging and comparing my emulator against the real thing, so I've flashed my real Replica1 with this version as well.

The replica11.bin is a dump of what was actually shipped in my Replica1 SE, which is the original WozMonitor, the original BASIC, and Krusader 1.1. The replica1.bin came on the Replica1 CD, which I'm guessing would have been shipped on the first versions of the Replica1. This also happened to be the first rom I developed my emulator around not knowing the difference.

I've also included the sub-roms (micro-roms?) from the cassette adapter and the CFFA1 (which now that I have a real CFFA1, I just need some more spare time to emulate). By default they are commented out.

That's probably enough rom information to put anyone to sleep or worse.
Good luck, and let me know how it goes.

- jgilbert

Offline
Joined: Apr 17 2007
Posts: 20
dinaao works on iMacG5 10.4.11!

Hello again,

I am very happy - it works.
Ken Wessen was right: But I did not get it in my first attempt. I had to put out the replica13a.bin file from the directory to the working directory then it worked.
The missing "a" was just a spelling mistake and was not the reason.

I also looked into the c-source file and saw were to switch between the rom sources, its easy to understand. So I can try out the other roms
I have built a A-ONE from Franz Achatz which also has BASIC and Kens Assembler on its ROM. So I have some experience with a hardware solution...
Of course my next wish would be to have a Replica1 too - it would be great to have both.

Many thanks for doing this software, now I have an alternative to POM and my A-ONE.
I will start now playing around - lets say land on the moon...

Best regards
minimani

Offline
Joined: Jan 14 2008
Posts: 16
New version just released!

More good news everyone!

Dinaao Version 1.1 has just been released!

A few things fixed...
Pause mode no longer takes up 100% CPU cycles. I don't know what I was thinking when
I put in that spinwait. Well it worked, it was just really stupid.
All 65C02 Opcodes (except WAI and STP) should work now.
It should also be a bit faster, but then it's already way faster than the real thing.

Anyone have an Apple1 Benchmark program?

- JGilbert