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

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 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 
Offline

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 22 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: