Jump to content
IGNORED

COM Automation in Classic99


Willsy

Recommended Posts

I thought this important enough to warrant it's own thread, not least to give Tursi a chance to see it.

 

So, here goes:

 

You know what would be nice?

 

COM automation in Classic99. (Probably not suitable for MESS, since MESS has to run in Linux too)

 

Classic99 could expose classes, methods, and properties allowing an external Windows program access into the TI's CPU memory, VDP memory, and GROM memory.

 

Thus, a program like grapefruit could *directly* drop an assembly language program into TI memory hosted by Classic99, and run it!

 

Something like (Visual Basic code):

Set TI=New Classic99.TI  ' get reference to TI top class
Set TMS9900=TI.Processor ' get reference to the Processor
Set CPUMem=TI.CPUMem     ' get reference to the CPU memory space
TMS9900.Halt             ' halt the processor
CPUMem.Dump(AddressOf MyProgramArray, A000h) ' drop executable code into the TI memory space
TMS9900.SetPC &A000h     ' point the program counter at our code
TMS9900.SetWP &8300h     ' set our workspace
TMS9900.Resume           ' classic99 is now running *our* code :-)

'release resources
Set CPUMem=Nothing
Set TMS9900=Nothing
Set TI=Nothing

 

How cool would THAT be? This would allow seamless interaction between an external Windows application, and Classic99 - and hence the "TI". For example, it would be possible to write an Assembler in Windows, and have it dump the assembled code into memory and run it in one click.

 

Nice. :cool:

 

I *think* COM is considered deprecated/legacy these days, but, there's so much COM out there that that shouldn't worry anyone. And the alternatives are ridiculous: SOAP/XML... Pah... If your transmitting data via the web, then ok. But internally, on the same box, COM is ok.

Link to comment
Share on other sites

Have you seen the openmsx emulator for MSX ?

 

From their specification list:

# Command interface via pipes or a (UNIX domain) socket: control openMSX with any external application

# Unique! TCL scripting: enhance openMSX with powerful scripts

# Unique! System ROMs are specified and found with their SHA1 sums or file names as a fall

 

They have some youtube videos up where they do crazy stuff with TCL scripts (add immortality, blend-in graphics, etc).

Something like that would be cool for the TI as well ;)

Link to comment
Share on other sites

That's a neat idea. I haven't played with COM for about 8 years, setting it up really did kind of suck. ;)

 

I wonder if things like messaging, named pipes, something like that might not be a better interface. Sure, it's not object oriented, but... (well, actually, that's all of it.) Also, the Bug99 interface is nearly done (Thierry and I hashed out some of the problems with the first release, I just need to finish implementing and testing the new one and let him know it's good to go).

  • Like 1
Link to comment
Share on other sites

That's a neat idea. I haven't played with COM for about 8 years, setting it up really did kind of suck. ;)

 

I wonder if things like messaging, named pipes, something like that might not be a better interface. Sure, it's not object oriented, but... (well, actually, that's all of it.) Also, the Bug99 interface is nearly done (Thierry and I hashed out some of the problems with the first release, I just need to finish implementing and testing the new one and let him know it's good to go).

 

The only issue with pipes is that they are not readily usable from languages that use COM (Visual Basic, .Net (through COM interop), Excel, Access, Even word!)

 

My preferences, if it were ever on the table would be:

1) COM

2) Sockets

3) Pipes

 

And yeah, I believe COM is a bitch to code for in C++, both on the client and server ends. Its a breeze in VB et al though, really nice.

 

Some system dependancies wuld be introduced: The com components (DLLs) would have to be registered in the reistry as ActiveX components, but there would be ni requirement for an installer: A simple batch file (calling RegSvr32.exe would do the job just fine).

 

Mark

Link to comment
Share on other sites

That's a neat idea. I haven't played with COM for about 8 years, setting it up really did kind of suck. ;)

 

I wonder if things like messaging, named pipes, something like that might not be a better interface. Sure, it's not object oriented, but... (well, actually, that's all of it.) Also, the Bug99 interface is nearly done (Thierry and I hashed out some of the problems with the first release, I just need to finish implementing and testing the new one and let him know it's good to go).

Erm, whats the Bug99 interface? :roll:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...