6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 24, 2024 8:21 pm

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Sat Feb 12, 2011 4:52 pm 
Offline

Joined: Fri Aug 30, 2002 2:05 pm
Posts: 347
Location: UK
Anyone got any ideas as to how to compile the Microsoft VisualC 6.0 code that Michal Kowalski's simulator is written in under g++?

Lee.


Top
 Profile  
Reply with quote  
PostPosted: Sun Feb 13, 2011 1:45 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8514
Location: Midwestern USA
leeeeee wrote:
Anyone got any ideas as to how to compile the Microsoft VisualC 6.0 code that Michal Kowalski's simulator is written in under g++?

Lee.

Several years ago, I fooled around with trying to compile it with GCC and miserably failed. It seems to be locked into Micro$oft Visual C.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Feb 13, 2011 9:35 am 
Offline
User avatar

Joined: Tue Mar 02, 2004 8:55 am
Posts: 996
Location: Berkshire, UK
Its based on Microsoft's MFC wrappers and support classes for the windows API. It will be a huge effort to port it to another compiler.

The free version of Visual C++ 2008 Express doesn't seem to support MFC applications. You'll need a 'pro' version to stand a chance of recompiling this.

_________________
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs


Top
 Profile  
Reply with quote  
PostPosted: Sun Feb 13, 2011 9:44 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8514
Location: Midwestern USA
BitWise wrote:
The free version of Visual C++ 2008 Express doesn't seem to support MFC applications. You'll need a 'pro' version to stand a chance of recompiling this.

Of course. God forbid Micro$oft doesn't make every last nickel they can. How else can the Gates foundation afford to give away billions to the poor and downtrodden of the world. :)

Rant aside, I don't do Microsoft development of any kind (nor do I want to), so I'm not about to spend any of my company's money on an overpriced compiler produced by a convicted monopolist.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Feb 14, 2011 4:44 am 
Offline

Joined: Fri Aug 30, 2002 2:05 pm
Posts: 347
Location: UK
Quote:
It will be a huge effort to port it to another compiler.

I've been doing a bit more research and this is beginning to look like a bit of an understatement.

I'm new to using C/C++ so was looking for a project to get started with but this looks a bit too far from portable C/C++ code to be much use.

I have however managed to get a suggestion for lib6502 accepted that fixes a portability problem when compilling run6502.c with GCC under Win32, which was encouraging.

Right now though I'm wishing people would comment their code.

Lee.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Feb 14, 2011 9:33 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
Hi Lee
thanks for the heads-up about the updated lib6502.

I had some ideas about projects...

A relatively simple project would be to fit Samuel's lib65816 into the same kind of wrapper as run6502 - I've done that, some time ago, but in a very rough and ready way, and I haven't published it. You could if you wished take my code as a starting point, but it might be better not to!

As it happens, there's a bug lurking in lib65816 (or possibly my run65816) which would be good to find and fix:
Code:
$ ./run65816 -B -l 0 bbc.img
loading ROM file bbc.img
WARP FACTOR 5

BBC Computer 16K

BASIC

>p

Mistake
>p

Mistake

Bad program
>

whereas lib6502 behaves itself:
Code:
$ ./run6502 -B -l 0 bbc.img

BBC Computer 32K

BASIC

>p

Mistake
>p

Mistake
>


A more advanced project would be to take lib6502 and put a GUI around it using a cross-platform toolkit like wxwidgets - that would give us a high performance cross-platform GUI for 6502 emulation. (It wouldn't match Michal Kowalski's program until it could be given an assembler, which would be another project.)

Cheers
Ed

Note that I have a patch for run6502 which is needed for BBC emulation of BASIC errors:

Code:
***************
*** 124,131 ****
        break;
 
      case 0x7E: /* acknowledge detection of escape condition */
!       return 0;  /* 2008-05-02  ed s this must trivially pass, for BASIC errrors */
!       return 1;  /* buggedly wrong in lib6502 1.0 and 1.1
        break;
 
      case 0x82: /* read machine higher order address */
--- 124,130 ----
        break;
 
      case 0x7E: /* acknowledge detection of escape condition */
!       return 1;
        break;
 
      case 0x82: /* read machine higher order address */
***************
*** 505,511 ****
       0x8000 + mpu->memory,
       0x4000);
       n= 1;
-             n= 0; // was buggedly 1 in run6502 version 1.0 and 1.1
     }
   argc -= n;
   argv += n;
--- 504,509 ----


Edit: added link target to new location of Kowalski's simulator


Last edited by BigEd on Mon Nov 07, 2011 2:43 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Mar 07, 2011 8:40 pm 
Online

Joined: Thu Mar 03, 2011 5:56 pm
Posts: 284
BigEd wrote:
Hi Lee
thanks for the heads-up about the updated lib6502.

I had some ideas about projects...


A more advanced project would be to take lib6502 and put a GUI around it using a cross-platform toolkit like wxwidgets - that would give us a high performance cross-platform GUI for 6502 emulation. (It wouldn't match Michal Kowalski's program until it could be given an assembler, which would be another project.)



There are a few alternatives to wxwidgets, that may be easier to use:

Qt
Gtk+
Cocoa/Cocotron

--- but the easiest solution might be to embed a simple web server in the simulator, and use a web browser to provide the GUI. (Ok, this solution might be "easiest" only for people who know HTTP/HTML/Javascript better than they known any of those GUI libraries :-)

It might be possible to use a65 (the assembler from cc65) instead of writing yet another 6502 assembler; it might even be possible to incorporate cc65 itself with the simulator.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 14 guests


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: