EASy68K  
It is currently Tue Nov 21, 2017 9:23 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Tue Oct 14, 2014 11:15 pm 
Offline

Joined: Tue Oct 14, 2014 10:56 pm
Posts: 2
https://github.com/paigeadele/EASy68K

And no theres no way it works, I wish it were that easy. My goal so far has just been to figure out what code is necesarry, and a lot of VCL code had to be commented out. Currently I'm also using a sort of portability runtime called "TurboC" (https://github.com/paigeadele/TurboC.git) which seems to account for quite a bit. Have a look at the code if you like, over time I hope I may actually succeed in porting this over and implementing some command line operating functionality (as well as possibly a daemon.) I know theres a lot of different ways I could do this including ncurses but I think my goal is to keep this as simple as possible.

Ultimately I'd like add some branches as well that will be focused on possibly supporting 68K variants particularly 68070, but I intend for the master branch to remain focused purely on the 68000. Changes to the master branch would be merged to other branches as needed.

I just managed to account for the last compile error, including undefined references, so I think I have all of the core code and if I don't I'm sure it will become obvious at some point. Feel free to take a look, any suggestions are welcome. Certainly I could have picked a different code base such as FAME.. but porting a borland application sounded more entertaining. I'm sure I made quite a few mistakes and left them behind in the process that will have to be fixed now, as well. The important thing at least is that it seems I have what I need and I can start piecing it together with trial and error.

If anybody is interested in hacking on this with me, feel free to get in touch.. I'll give you permissions to the repository.

erratic@yourstruly.sx


Top
 Profile  
 
PostPosted: Wed Oct 15, 2014 10:13 pm 
Offline

Joined: Tue Oct 14, 2014 10:56 pm
Posts: 2
Alright here's what I have so far:

- I just removed the TurboC library includes since I wasn't using it anyway, except maybe for strncpy except it wasn't being linked against turboc's library so it didn't really matter. Its gone, I took one function which was gettime from it and just added it to the code.

- restored the int64's where I had temporarily changed them to int in order to get on with getting the bulk of the code moved over. (inttypes.h)

- restored the gettime call I blundered in instr_exc.cc (or CODE9.cpp as it was)

- I've added quite a few externs (to replace the VCL code that I ripped out)
https://github.com/paigeadele/Hello68k/ ... ern.h#L164

and they're defined in the main code (top level directory) in io.cc, hw.cc, net.cc, utils.cc, and graphics.cc

Many of them will have to change in order for them to make any sense in this code base. I decided to go with this pattern intead of classes in favor of just getting something to work quickly, I figure it can be refactored later as objects if it really needs to be.. personally I don't see the point. I was also thinking may since all of the functions are prefixed with HW_ or SimIO_ that I could also add extern structs named HW and SimIO respectively if I need to export any variables into the main code.

There's also the AnsiString, ripped out. It wasn't ansi enough for me so I'm going to have to rewrite some stuff to use string.h functions wherever appropriate.

I suppose the next step I should look at are all the class properties that were used on the SimIO and Hardware classes and start refactoring them into structs. I don't think I'll be doing anything like this, at least I prefer not to: http://stackoverflow.com/questions/1350 ... a-c-struct


I think soon if not immediately I'll at least add a Makefile for compiling with emscripten and see how it goes. At some point I'm going to have to actually focus on just getting it to do something though. I think things are definitely at a point where I could use help, failing that anybody's interested I can't let myself get too consumed by this but it will be fun to play around with over time :)


Top
 Profile  
 
PostPosted: Mon Oct 20, 2014 7:44 pm 
Offline

Joined: Sat Oct 11, 2014 10:58 am
Posts: 8
Hello fellow coder.

I am working on a port also, from scratch.
Ported the Assembler so far, and broke it out of the Editor code.
I don't want it so tightly coupled.

I have never seen so much use of extern declared variables.
I will probably encapsulate them in a struct or class,
so it will be possible to instantiate it several times.
What bothers me is how tightly coupled the modules (assembler/editor/simulator) are.
Luckily very little code needed to be rewritten so far.

What did you mean say about the AnsiString?
I simply used std:string. It has almost all method calls that AnsiString seem to use.
I stubbed most of the GUI code, by replacing it with interfaces and a dummy implementation.
I also had to redirect some of the Borland specific function calls.

Mine compiles and runs so far on Mac (clang) and Win32 (vs2012). But I have only done the assembler so far. I will begin porting the simulator now. I will break up the coupling, and replace it with interfaces. Then I will create a new GUI and connect it to the interfaces. I believe that is the way to go.

I believe that we could cooperate on idea level, but I am not only interested in a port.
I also want to learn how it works under the hood. That is the reason I will go one step further in taking it apart. I accidentally introduced a bug in the S-Record generation, so I had to google how the format was built up, after that i found the bug. When porting I had to replace the code for converting it to hex, and I accidentally used the address twice instead of the value when defining a constant.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group