PDA

View Full Version : TI-74/CC-40 Emulator?



mutantcamel
July 11th, 2009, 04:10 AM
Right, I just a look on google now but to my surprise I didn't find details of any emulator for these 2 wonderful machines.

Is anyone out there working on such a project and if not why not?!

It would be cool not just to be able to use the original cartridge roms, but basic programs you could either type into a text editor and copy into the memory or emulate the cassette interface and load programs in .wav format or whatever.

am I the only one waiting for this to happen?!

Vint
August 15th, 2010, 06:26 AM
Bringing up this old thread -
No, you're not the only one waiting . . . .
Hopefully someone will soon implement a couple EMU's for us before the machines are forgotten altogether by the masses.
What I mean is, we need someone that can write emulators interested in doing this - and the field of those people interested in these two machines dwindles each month - so it becomes like trying to choose a good football team from a very small high school. (Less people, less good choices.)

I have both a 'real' TI CC-40 and a TI-74, but no emulators. I've found emulators for some pretty old machines, so I can't understand why these 2 haven't been 'chosen' yet. Just not popular enough?

If I were a lot younger - I'd try to learn to write emulators. (My refrigerator bulb is a bit dimmer than it used to be.) I think emulators are awesome, especially when they put 'extra features' in that weren't even in the originals. Don't get me wrong - hands on the real stuff is the 'best' way to go and I keep buying what I can afford in these old small machines - but it's not the only way to go. A good emulator can be a pleasure too.

I have found emulation for the machines that I really own. (Saves wear and tear on my vintage gear.) Radio Shack PC2, Casio FX602P, HP-12C, TI-59 (although I have a real TI-58, not a 59; they program the same, just a might less with the 58.)

I find lately that my vintage gear interests are slanting more and more toward specializing in Texas Instruments stuff. I already have more TI stuff than anything else. We all need a 'specialty' :)

curtis
August 17th, 2010, 05:47 AM
I think part of the problem is TI stuffed ROM routines all over the place! There's the primary ROM chip and then there's some ROM routines in the cpu chip itself!

A fellow over on the Yahoo TI group has tried to get a dump of all the ROM routines, but I think he actually gave up!

I correspond with a fellow who was on the CC-40 and 74 software development team about getting a copy of all of the ROM routines, but he said it's been stored in TI's software vaults and it isn't accessible. Kinda like getting into the Vatican archives, are his exact words if I remember correctly!

Would be nice if there was a way to develop an emulator for either of them, but like it was said before, emulator developers are few and far between and none of them seem too interested in the pair.

Oh well. Such is life.

JGardner
August 17th, 2010, 09:37 AM
I'm not aware of a CC40 emulator, but a careful reading
of the CC40 User's Guide, particularly the appendices, and
the capabilities of "DEBUG", will prove fruitful if you wish to
obtain the ROM.

The 74 is a bit more difficult, as "DEBUG" is not built-in, but
perusal of "The TI-74 Technical Data Manual", "The TMS7000
Family Data Manual", and consideration of publicly available
resources (PEEK, POKE, EXEC) will lead you in the right path.

Chapter 3 of the FDM describes the processor boot options, for
instance. & the TDM indicates what ooptions are used, IIRC.

It's not very difficult to write an asm routine loadable from
BASIC that reads ROM and writes to a PC file.

Both the pubs I mentioned are in the Public Domain, and
available, last time I looked. If you can't find them I'll send
them to you.

Jack

Vint
August 17th, 2010, 09:45 AM
Thanks Curtis for the enlightenment, although it does dash my hopes on the rocks of despair :(
Ok, 'nother way to skin a cat.'
How about, instead of an emulator, someone does a simulator?! Of course someone with a lot more in their head than sawdust, like I have.
Does that seem at all feasible? I don't really know what I'm talking about - I just know what I'd like :)
Is that selfish or lazy? I usually possess both of those traits to some extent. Never quite know whether to be proud of them or ashamed. Kind of like the funny line in the Rocky movie where Rocky is trying to find employment through interviews and the interviewer is asking him - "Do you have a criminal record?" and Rocky replies, "Well, nothing to brag about." Things can be misconstrued.

They have those nifty Imsai, Altair, and Edsac simulators, how about a CC40 and TI74?

JGardner
August 17th, 2010, 09:49 AM
> How about, instead of an emulator, someone does a simulator?!

What's the difference? Not familiar with them...

Jack

Vint
August 17th, 2010, 06:57 PM
An emulator, as I understand the term, means a program that will act exactly like it's real world counterpart, 'emulation'. A simulator, on the other hand only needs to give the impression that it operates the same as it's real world counterpart.
For example: If I use a calculator to solve the problem 12/2 = 6, an emulator will use the same emulated hardware to do the same, whereas I could be a simulator by writing down on a piece of paper 12/2 and using my brain to calculate 6. We both came up with the same answer, but I used a totally different method.
I don't know if that's a good analogy or not. My wife always tells me my analogies stink, so I hope I explained it right. If not, then I'm with you, Jack and somebody else needs to enlighten us. :)

JGardner
August 17th, 2010, 07:21 PM
Thanks - I've seen the terminology before, without thinking to inquire about specifics.

There's enough CC40 specifics out there to create an emulator, should someone wish
to do so.

For the TI-74, I suggest seeking information in the German TI community - The whole
enchilada seems to be available, if you find the right guy.

Jack

JGardner
August 18th, 2010, 03:45 PM
In the hardware business, an "emulator" is usually the target processor,
with additional I/O on the die that allow monitoring of internal registers,
processor states, and so on.

A "simulator", OTOH, is (usually) a cross-platform software package that
emulates the modelled device. Confusing, ain't it :)

Jack

acadiel
August 24th, 2010, 07:41 PM
I think part of the problem is TI stuffed ROM routines all over the place! There's the primary ROM chip and then there's some ROM routines in the cpu chip itself!

A fellow over on the Yahoo TI group has tried to get a dump of all the ROM routines, but I think he actually gave up!


That's right. There are three distinct parts of the CC-40 that need to be copied.

1) The HN61256 ROM. I still haven't been able to dump this. And, I can't dump it from within the computer, because it's bank switched. You bank switch it manually, you crash the CC-40 OS.
2) The logic glue chip (custom made) - controls the display, and all the I/O
3) The CPU ROM - should be potentially easy to dump if we identify where it is

I still have the unsoldered HN61256 sitting on my desk if anyone wants to try dumping it. I can't seem to get anything out of it.... it doesn't use a standard pinout, so I have to try to make a custom adapter to read it as a 27256, but still couldn't get it to read.

Jon

JGardner
August 27th, 2010, 07:47 PM
To inspect the contents of the HN61256 on the CC40:

1) Read the User Guide appendices.
2) Invoke DEBUG.
3) Execute the "R" command.
4) Press the Space bar. You should be looking at "SYSTEM PAGE=N",
"N" being the System ROM page.
5) Press "0", then "ENTER".
6) Press "D", then enter "D000", "ENTER"...

You are looking at the 1st 8 bytes of Page 0 of the HN61256 ROM, which consists
of 4 -8K pages - Pg. 0, Pg. 1, Pg. 2, & Pg. 3.

In Appendix J of the User Manual, you'll find that the "Page Control Register"
is identified as >119, aka P25, in the somewhat confusing nomenclature TI
chose to use. To deter us lower life forms, no doubt, but explained at length
in the TMS7000 Family Data Manual.

Want to dump that ROM? Check out Chapter 6 of said FDM, for what you need
to construct a small asm routine, run from BASIC, that captures the ROM, byte
by byte, and writes them to file on your PC, thanks to Curtis' Hexbus -> Docbus
-> PCIF widget. Don't forget there are 4 pages, 8K/page.

Since you've delved into the FDM, check out the 1st three chapters on how the
processor family organizes memory. You'll discover the rest of ROM...

Jack

acadiel
September 20th, 2010, 08:08 PM
I've tried the bank switching trick.. it always defaults back to the same bank.

I'd be willing to send you the ROM and/or a spare CC-40 to see if you can dump the ROM. Let me know.

geoffm3
September 21st, 2010, 12:45 PM
Is there a way to write a machine code program to run natively without using the OS to dump the contents of the ROM?

JGardner
September 21st, 2010, 07:27 PM
> Is there a way to write a machine code program to run natively without using the OS to dump the contents of the ROM?

Yes. You can hand assemble a program (or use ASM7), enter it into Ram with the debug "M" instruction, or from BASIC with data statements read into RAM with a CALL POKE loop (after reserving memory with GETMEM) and execute it with CALL EXEC. Read the manual. It tells you how to do it.

I posted a PC utility awhile back that will strip the opcodes out of a ASM7 .LST file and convert them to DATA statements for loading from a BASIC main pgm. It's attached.

> I've tried the bank switching trick.. it always defaults back to the same bank.

My mistake. This is all a long time ago for me. I'd forgotten DEBUG is jiggered to prevent reading ROM the way I described.

The system ROM page select bits are b0, b1 of register >119. The easiest way to do it is write an asm routine called from
BASIC which selects the ROM page by writing the appropriate value to >119, then reading the byte at D000 into a reserved
memory location in RAM, resetting the sytem ROM page to whatever it was before you changed it, returning to BASIC,
then reading the byte you saved with a PEEK. Next time through the loop read the byte at D001, and so on.

If you try to change the ROM page selects in BASIC results are "undefined", as
they say...

Read the TMS7000 FDM first, on how to manipulate peripheral file registers, and the instruction set. Read the TI-74 Technical Reference Manual, and the CC40 Editor-Assembler docs.

Most of this stuff, along with the ASM7 assembler, is on whtech's ftp site.

You really need PC-IF so you can write the data to file. Curtis describes what you need on his CC40/TI74 page.

Rename ASM2B74.txt to exe. It'll run under DOS or W3 - Not sure about others.

Jack

acadiel
April 21st, 2014, 10:22 AM
I've updated some of my fun dumping the cartridge ROM and CPU ROM (not the system ROM) here:
http://atariage.com/forums/topic/224561-need-a-shell-scriptperl-for-converting-ascii-value-to-binary/

Bottom line - I have all eight carts and the 2K MASK ROM (not the 32K one) dumped and available here:
https://dl.dropboxusercontent.com/u/19597743/ti-99-4a/CC-40%20DUMPS.zip

I'm sending my CC-40 unit (the one I got from Curtis) along with the desoldered ROM off to a professional dumper to get the 32K ROM dumped. If anyone has a half working CC-40, please let me know as I'd like to send him a second unit in case I FUBAR'd the ROM in the one I got from Curtis. I'm kind of on the fence about volunteering my CC-40+, though...

acadiel
May 13th, 2014, 12:49 PM
> Is there a way to write a machine code program to run natively without using the OS to dump the contents of the ROM?

Yes. You can hand assemble a program (or use ASM7), enter it into Ram with the debug "M" instruction, or from BASIC with data statements read into RAM with a CALL POKE loop (after reserving memory with GETMEM) and execute it with CALL EXEC. Read the manual. It tells you how to do it.

I posted a PC utility awhile back that will strip the opcodes out of a ASM7 .LST file and convert them to DATA statements for loading from a BASIC main pgm. It's attached.

> I've tried the bank switching trick.. it always defaults back to the same bank.

My mistake. This is all a long time ago for me. I'd forgotten DEBUG is jiggered to prevent reading ROM the way I described.

The system ROM page select bits are b0, b1 of register >119. The easiest way to do it is write an asm routine called from
BASIC which selects the ROM page by writing the appropriate value to >119, then reading the byte at D000 into a reserved
memory location in RAM, resetting the sytem ROM page to whatever it was before you changed it, returning to BASIC,
then reading the byte you saved with a PEEK. Next time through the loop read the byte at D001, and so on.

If you try to change the ROM page selects in BASIC results are "undefined", as
they say...

Read the TMS7000 FDM first, on how to manipulate peripheral file registers, and the instruction set. Read the TI-74 Technical Reference Manual, and the CC40 Editor-Assembler docs.

Most of this stuff, along with the ASM7 assembler, is on whtech's ftp site.

You really need PC-IF so you can write the data to file. Curtis describes what you need on his CC40/TI74 page.

Rename ASM2B74.txt to exe. It'll run under DOS or W3 - Not sure about others.

Jack

Hi, Jack -

I can do some of this stuff with guidance, but do not have the expertise to do it on my own.

I do have a 32k Constant memory cart that we can dump the 32K ROM in bit for bit. I just won't "CALL ADDMEM" it. I can then dump the whole thing into the RS232 to a PC, much like I did to dump the carts and the upper 2k cpu rom. Sounds like I just need to keypunch a manual assembly program in with CALL DEBUG to do that you state above:

"The easiest way to do it is write an asm routine called from BASIC which selects the ROM page by writing the appropriate value to >119, then reading the byte at D000 into a reserved
memory location in RAM [Note: The 32K constant memory cart], resetting the system ROM page to whatever it was before you changed it, returning to BASIC,
then reading the byte you saved with a PEEK. Next time through the loop read the byte at D001, and so on."

Another question that I do have, though:
Can we just have the assembly loop do this without branching back/forth to BASIC (a straight dump 8K at a time, flip the bank, repeat)?





Thanks :)

JGardner
May 13th, 2014, 01:25 PM
Hi Jon -

It's been awhile - We are talking about dumping the CC40 ROM to a 32K

RAM cartridge in the CC40? Is this cartridge a TI product, or a homebrew?

Reason I ask, the only 32K RAM cartridge I've ever seen (for CC40) is one

I built a long time ago.

If you know offhand what memory space your cartridge is banked to,

I wouldnt mind having a go at a ROM dump pgm. I presume it's organized

in 4 8K pages, like ROM? It should be able to dump ROM in one go - No

BASIC necessary.

I did the exact same thing for TI-74 ROM years ago - Dumped it to

a 32K RAM cartridge so I could step through it with a monitor pgm.

Jack

JGardner
May 14th, 2014, 08:44 AM
Hi Jon -

Had a chance last night to look at CC40 memory organization - Glad I

did; it's been a few years...

I take it you don't have a way to connect your CC40 to PC ?

No doubt you have some format for the data in mind - If you'll let me

know what that is I'll see what I can do - Unlikely I'll finish today, but

after today I have a few days off.

Also took a look at your CC40 pages last night - Verily, a 32K RAM cart -

& other cool stuff - Very nice.

At some point, I'll need your email address.

Jack

acadiel
June 2nd, 2014, 06:53 AM
Hi Jon -

Had a chance last night to look at CC40 memory organization - Glad I

did; it's been a few years...

I take it you don't have a way to connect your CC40 to PC ?

No doubt you have some format for the data in mind - If you'll let me

know what that is I'll see what I can do - Unlikely I'll finish today, but

after today I have a few days off.

Also took a look at your CC40 pages last night - Verily, a 32K RAM cart -

& other cool stuff - Very nice.

At some point, I'll need your email address.

Jack

Yes, it's really a 32K RAM cart... Michael Becker himself put the 32K SRAM in it. I can "CALL ADDMEM" it, or I can just CALL POKE to it all day long.

Here's what I did to dump the other cartridges:

1) Did a CALL PEEK in the entire 32K cart memory space
2) Printed this to the RS232 @ 2400 baud in the format "Memory_Loc,ASCII Value"
3) Ran a shell script on the computer to turn that back into a binary 32K File.

The nice thing is that I got someone else who actually had dumping hardware and verified my dumps.

Here is the process I used and shell script: http://atariage.com/forums/topic/224561-need-a-shell-scriptperl-for-converting-ascii-value-to-binary/?hl=+cc#820840=

So, the last part left is the 32K BIOS ROM that needs to be dumped; 8K at a time.

I figure we can do that in assembly rather easily. Bank to 32K BIOS BANK 0 at >D000->EFFF, read those, copy them to >5000->6FFF. Bank to 32K BIOS BANK 1, and copy them to >7000->8FFF. Bank 2 ->9000->AFFF. Bank 3, >B000->CFFF.

Drop back to BASIC. Run my program that spits out >7000->CFFF to the RS232, convert it, and BAM, instant BIOS ROM image. :)

My email is at the bottom of hexbus.com if you'd like to send me a note... :)

Thanks!

JGardner
June 6th, 2014, 11:48 AM
This works on a TI-74, with the appropriate addresses,

but I don't have a working CC40 32K cartridge to test it

with on a CC40. Let me know what happens... :)

Jack

52 03 88 CF FF 5B 88 EF FF 59 A3 FC 19 94 19

9A 59 9B 5B DB 59 DB 5B 7D FF 59 E6 F3 7D CF

58 E6 EE C2 5D FF E6 E0 F4

Load address: >2000; Execution Address: >2000

Result:

ROM Pg. 3 copied to >B000 - >CFFF
ROM Pg. 2 copied to >9000 - >AFFF
ROM Pg. 1 copied to >7000 - >8FFF
ROM Pg. 0 copied to >5000 - >6FFF

acadiel
June 8th, 2014, 02:35 PM
OK, I'm currently redumping to verify, but here's the first go around.

https://dl.dropboxusercontent.com/u/19597743/ti-99-4a/cc40_bios_files.zip

I noticed that some of the strings in the hex dump (cc40.bin) are backwards, and missing the last character... thusly, why I'm dumping it again to verify.

I'm also going to go through the 8K part that's currently banked into with DEBUG and verify this against this dump to see if it dumped properly.

acadiel
June 8th, 2014, 03:28 PM
OK, I'm currently redumping to verify, but here's the first go around.

https://dl.dropboxusercontent.com/u/19597743/ti-99-4a/cc40_bios_files.zip

I noticed that some of the strings in the hex dump (cc40.bin) are backwards, and missing the last character... thusly, why I'm dumping it again to verify.

I'm also going to go through the 8K part that's currently banked into with DEBUG and verify this against this dump to see if it dumped properly.

Previous dump verified.

Also, the >6000->7FFF in the dump is the currently banked >D000->EFFF (has the monitor and such). I spot checked >6000 in the rom image to >D000, and even spot checked >7F80 in the dump against >EF80 in the actual ROM... both match. I'm hoping the other three banks are OK as well.

With that... I present to the community, every existing CC-40 cartridge binary + the 32K BIOS + 2K on-CPU ROM.

https://dl.dropboxusercontent.com/u/19597743/ti-99-4a/CC-40%20DUMPS.zip

I've already forwarded this to someone working on the MESS emulator. (Hap)

JGardner
June 8th, 2014, 03:54 PM
...I noticed that some of the strings in the hex dump (cc40.bin) are backwards, and missing the last character...

Setting the high bit of the last byte of an embedded string is characteristic of some

CC40 (& TI74) apps.

So the last character is'nt missing; setting the high bit makes it a non-printing character,

as far as a viewing it with a normal text editor is concerned...

Jack

acadiel
June 8th, 2014, 04:03 PM
...I noticed that some of the strings in the hex dump (cc40.bin) are backwards, and missing the last character...

Possibly BASIC keywords, which typically have the high bit of the last char (or was

it the 1st... Been a while...) set - This is how the interpreter distinguishes keywords,

I think...)

The last character is'nt missing; setting the high bit makes it a non-printing character,

as far as a normal text editor is concerned...

Jack

Ah, thanks, Jack! I wanted to thank you for the assembly.. it was the last piece I needed to get the entire ROMset out there for the CC-40. You are truly a gentleman and a scholar :)

On another topic - I know the 95 has been dumped (see here: http://www.rskey.org/CMS/index.php/the-library/13)... has someone dumped all the 74 stuff yet?