Hello,
Some of you may know that benryves once wrote an emulator known as Stetson. He eventually dropped this project, but I came to the point where I needed a TI-83+ emulator written in C# for tiDE. Lucky for me, there was already a working one ready by benryves! I've picked up this project from him, and have begun my own work on Stetson. First of all, this is where I picked it up from:

It had a screen, with keyboard mapped buttons (missing two buttons as well). There was no debugger and only limited port implementation. Flash control was working, but it was unprotected and flash was perpetually unlocked. It had support for the LCD delay (which makes grayscale work), as well as full implementation of the z80 processor, and basic linking.
Since I got a hold of it, I have changed the GUI to this:

The virtual keypad is fully functional, and the memory viewer as well (though I have not yet completed the ability to modify its contents). Here's what I've added:
-Linux compatability
-Protected port control
-Protected ports
-Fixed screen off state
-Virtual keyboard
-Memory viewer
-Pause/resume emulation
-Fixed broken keyboard mappings
-Added ROM selection dialog

Here are things I have planned to add:
-Finish memory viewer
-Register/status viewer/editor
-Disassembler
-Remaining ports
-15 MHz support
-Source level debugging integration with tiDE
-Sound
-Specialised debugging for KnightOS and GlassOS (the latter requiring more effort)
-GIF recording
-Improved file sending

Any feedback or feature requests?
Nice work! It's nice to see another emulator wandering around. Another quick word about SDCC and debugging: You already know about the .cdb generated that gives in extreme detail everything that the z80 will do. However, you make your life easier, you might be able to get away with the .asm output. SDCC litters the asm files with their C counter-parts, such as:

Code:
;all.c:3964: void USB_PeripheralInitialize()
;   ---------------------------------
; Function USB_PeripheralInitialize
; ---------------------------------
_USB_PeripheralInitialize_start::
_USB_PeripheralInitialize:
   push   ix
   ld   ix,#0
   add   ix,sp
   push   af
   dec   sp
;all.c:3966: volatile unsigned char val = 0;
   ld   -1 (ix),#0x00
;all.c:3969: Port_USB_Int_Mask = (unsigned char)0x80;
   ld   a,#0x80
   out   (_Port_USB_Int_Mask),a
;all.c:3971: Port_USB_4C = (unsigned char)0x00;
   ld   a,#0x00
   out   (_Port_USB_4C),a
;all.c:3972: Port_USB_Int_Enable = (unsigned char)0x01;
   ld   a,#0x01
   out   (_Port_USB_Int_Enable),a
;all.c:3973: val = Port_USB_4C; //dummy read
   in   a,(_Port_USB_4C)
   ld   -1 (ix),a
;all.c:3974: Port_USB_Base_Power = (unsigned char)0x02;
   ld   a,#0x02
   out   (_Port_USB_Base_Power),a
;all.c:3975: Port_USB_4A = (unsigned char)0x20;
   ld   a,#0x20
   out   (_Port_USB_4A),a
;all.c:3978: Port_USB_4B = (unsigned char)0x00;
   ld   a,#0x00
   out   (_Port_USB_4B),a
;all.c:3979: if ((unsigned char)Port_USB_3A & 0x08)
   in   a,(_Port_USB_3A)
   and   a,#0x08
   jr   Z,00102$
;all.c:3980: Port_USB_4B = (unsigned char)0x20;
   ld   a,#0x20
   out   (_Port_USB_4B),a
00102$:
;all.c:3982: Port_USB_Base_Power = (unsigned char)0x00;
   ld   a,#0x00
   out   (_Port_USB_Base_Power),a
;all.c:3985: i = 0;
   ld   -3 (ix),#0x00
   ld   -2 (ix),#0x00
;all.c:3986: while (i++ < 0xff);
00103$:
   ld   c,-3 (ix)
   ld   b,-2 (ix)
   inc   -3 (ix)
   jr   NZ,00153$
   inc   -2 (ix)
00153$:
   ld   a,c
   sub   a,#0xFF
   ld   a,b
   sbc   a,#0x00
   jr   C,00103$
;all.c:3988: if ((unsigned char)Port_USB_3A & 0x08)
   in   a,(_Port_USB_3A)
   and   a,#0x08
   jr   Z,00107$

... snip ...

;all.c:4026: for ( i = 0; i < 0xFFFE; i++)
   inc   -3 (ix)
   jr   NZ,00122$
   inc   -2 (ix)
   jr   00122$
00125$:
;all.c:4030: if (i >= 0xFFFE)
   ld   a,-3 (ix)
   sub   a,#0xFE
   ld   a,-2 (ix)
   sbc   a,#0xFF
   jr   C,00130$
;all.c:4032: USB_PeripheralKill();
   call   _USB_PeripheralKill
   jr   00130$
00129$:
;all.c:4038: USB_PeripheralKill();
   call   _USB_PeripheralKill
00130$:
;all.c:4041: i = 0;
   ld   -3 (ix),#0x00
   ld   -2 (ix),#0x00
;all.c:4042: while (i++ < 0xff);
00131$:
   ld   c,-3 (ix)
   ld   b,-2 (ix)
   inc   -3 (ix)
   jr   NZ,00162$
   inc   -2 (ix)
00162$:
   ld   a,c
   sub   a,#0xFF
   ld   a,b
   sbc   a,#0x00
   jr   C,00131$
   ld   sp,ix
   pop   ix
   ret
_USB_PeripheralInitialize_end::


<edit> Oh, and you can get the start address of a function with the .map files

Just parsing the line numbers and what the line is would be easiest. (With this, you can also do source-level stepping)

Also, for the memory viewer, does it let you change the pages swapped in so you can see what's there/manually change the PC? (Including RAM) Can you set watch points for reads/writes?

Just naming the things that I use non-stop and would be nice to have in another emulator Wink
I think the most important thing to ask is what this offers that WabbitEmu doesn't, and why it's worthwhile to work on a different emulator project in addition to your dozens of other unfinished projects instead of upstreaming patches to the WabbitEmu repository. Smile
It WabbitEmu in .NET? If not, I'd say that's an advantage.
Wabbitemu doesn't work on Linux and this seems to. I'd like a Linux screenie please (no Wine, right?).
ScoutDavid wrote:
Wabbitemu doesn't work on Linux and this seems to. I'd like a Linux screenie please (no Wine, right?).
WxWabbitEmu is sort of working, and that's only with alberthro's work, who is a beginner programmer. If some more experienced Linux coders got on board, I'm sure WxWabbit for Linux could be even better.
ScoutDavid wrote:
Wabbitemu doesn't work on Linux and this seems to. I'd like a Linux screenie please (no Wine, right?).

WabbitEmu is buggy on Wine, and wxwabbitemu is lacking in features. But to it's credit, Stetson only runs in Mono on Linux.
KermMartian, this isn't quite adding to my projects, because it is part of tiDE. In addition, it is kinda fun just to challenge myself by writing an emulator.
AHelper, the .cdb file looks pretty weird and I'm not sure how it works, so this alternative sounds great! And the memory viewer won't handle swapping in different pages, but this would be handled by the status viewer (which will also let you change PC). There will also be a disassembler you can change PC from, and watch points will be added eventually.
KermMartian, what this would offer that wabbitemu doesn't is C debugging, for one. There are several other features I plan to implement, don't worry.
Quote:
But to it's credit, Stetson only runs in Mono on Linux.


Yeah I thought Mono, does that needs us to have Mono installed or is it like a .out file?
ScoutDavid wrote:
Yeah I thought Mono, does that needs us to have Mono installed or is it like a .out file?

You should have Mono installed, but I might be able to get around that. We'll see when it's ready for release.
It's worth having it installed, though.
Yeah I do, but I'm thinking about the non-programmers.
ScoutDavid wrote:
Yeah I do, but I'm thinking about the non-programmers.

There are redistributable versions of Mono that aren't for development. It isn't like you have to have the whole MonoDevelop suite installed. Stetson runs on the version of Mono that comes default with Ubuntu, for instance.
KermMartian wrote:
ScoutDavid wrote:
Wabbitemu doesn't work on Linux and this seems to. I'd like a Linux screenie please (no Wine, right?).
WxWabbitEmu is sort of working, and that's only with alberthro's work, who is a beginner programmer. If some more experienced Linux coders got on board, I'm sure WxWabbit for Linux could be even better.

Heh.... you should probably read the wxWabbitEmu site a bit more carefully, especially in the SVN source viewer section. Razz I'm edgy with C (beginner-intermediate), and I am lost with C++ (and hate it). Probably not smart enough to port Wabbitemu. Razz

http://code.google.com/p/wxwabbitemu/source/list
And that particular active dev is also busy on his main project.
There is another good Linux dev onboard as you can see, but he's also busy on other things too...

Moi? I handle build scripts, general maintenance, portions of GUI/core, and being a bossy pompom encourager! Razz

ScoutDavid wrote:
Quote:
But to it's credit, Stetson only runs in Mono on Linux.


Yeah I thought Mono, does that needs us to have Mono installed or is it like a .out file?

It's not self-sustaining. It's an .NET EXE that usually can be run with a freshly installed Ubuntu's Mono.

If you really wanted self-sustaining apps, there might be a way to package one.... but that will be saved until after SirCmpwn pushes out a stable release. Wink
alberthrocks wrote:
If you really wanted self-sustaining apps, there might be a way to package one.... but that will be saved until after SirCmpwn pushes out a stable release. Wink

Yeah, there's a method called the mkbundle that supposedly makes it run as a standalone app, but I think it still requires the mono libraries installed.
SirCmpwn wrote:
KermMartian, this isn't quite adding to my projects, because it is part of tiDE. In addition, it is kinda fun just to challenge myself by writing an emulator.
[...]
KermMartian, what this would offer that wabbitemu doesn't is C debugging, for one. There are several other features I plan to implement, don't worry.
Regarding the first point, I still feel that it's a lot more to put on your plate, and I'm concerned for your other projects that you've started many projects and have finished far fewer, meaning that over time your pending project backlog will grow indefinitely. I've made the same mistake many, many times before, although I'm trying to slowly learn to focus on already-started projects before I get too carried away with something new. Regarding your second point, that's true that WabbitEmu doesn't offer C debugging, but I don't really see how C debugging could be easily offered. I look forward to you showing how it can be done.
Quote:
KermMartian wrote:
KermMartian, what this would offer that wabbitemu doesn't is C debugging, for one. There are several other features I plan to implement, don't worry.
Regarding the first point, I still feel that it's a lot more to put on your plate, and I'm concerned for your other projects that you've started many projects and have finished far fewer, meaning that over time your pending project backlog will grow indefinitely. I've made the same mistake many, many times before, although I'm trying to slowly learn to focus on already-started projects before I get too carried away with something new. Regarding your second point, that's true that WabbitEmu doesn't offer C debugging, but I don't really see how C debugging could be easily offered. I look forward to you showing how it can be done.

I understand and agree that I have quite a lot on my plate, and finish projects less often than I start them. However, realize that this really takes away from my workload. I was already working on an emulator for tiDE, and benryves was nice enough to give me all this code, thus reducing my workload significantly.
As for C debugging, it would probably only work with SDCC and maybe even only for GlassOS, but I most definitely think it's possible. I also had some more ideas for features, including a scripting system, automated testing, and more. I'll also offer support for simulating newer calculators with less RAM and broken screen drivers.
And hey, you're even starting to use proper indeterminate future tenses for project features! Wink I suppose that makes sense about saving you work, thanks for pointing that out.
KermMartian wrote:
And hey, you're even starting to use proper indeterminate future tenses for project features! Wink

Razz I'm trying to do better. All of these features aren't really that difficult to implement, so they'll probably happen.
Just ask me for C debugging/mapping... I might manage that Wink
AHelper wrote:
Just ask me for C debugging/mapping... I might manage that Wink

If you have any resources you think would help, send them my way. I'll warn you, however, that using Stetson under Linux is a bit slower, and the screen is less accurately drawn (fading the pixels for grayscale is slower) due to some workarounds I had to do to get it to display on Linux.

I've also completed the memory viewer, so you can just double click a value to change it in-line. I've started the disassembler as well, it's almost done.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 2
» All times are UTC - 5 Hours
 
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 vote in polls in this forum

 

Advertisement