Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old May 5th, 2006, 11:48 AM   #11
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Doesn't matter if they're ALL coded in C++. The emitted code is particular to the machine (or its compatible brothers). That's why you can't use an x86 compiler on a non-x86 system. One can sometimes get a cross-compiler that runs on one type of system and emits code for another, but the output is machine-specific and bears no resemblance to 'cout << "Hello, world!"'.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old May 5th, 2006, 11:57 AM   #12
demon101
Hobbyist Programmer
 
demon101's Avatar
 
Join Date: Mar 2006
Location: westboro, ohio
Posts: 160
Rep Power: 0 demon101 is an unknown quantity at this point
Send a message via Yahoo to demon101
ok that is what i wanted to know. i am going to start to try to make a game that will be simple. like a scroll game or a word game. if i feel smart i might make a flash game.
__________________
Demon101 Production's

Code Forums
demon101 is offline   Reply With Quote
Old May 5th, 2006, 1:32 PM   #13
Booooze
Expert Programmer
 
Booooze's Avatar
 
Join Date: Mar 2006
Location: Igloo
Posts: 710
Rep Power: 3 Booooze is on a distinguished road
Send a message via MSN to Booooze
Surprisingly, Math is not always easy for me. People expect me to be good at it, but im not :p
Booooze is offline   Reply With Quote
Old May 5th, 2006, 7:18 PM   #14
magus57
Newbie
 
Join Date: May 2006
Posts: 6
Rep Power: 0 magus57 is on a distinguished road
I pay attention in math class, but only because I have to (I already understand just about everything my teacher has to teach, but I can't play calculator games because I'm always in direct view of the teacher, who doesn't like it when I or anybody else uses a calculator during notes). Basically, I play during my free periods. I was actually planning to write it in ASM (because then I could archive it because the file would probably be big), but because I don't know how to write in ASM or decrypt the ROM file of the game (just to get a start/idea), I can't write the program. For example, I wouldn't know how to put an experience gaining system or health system (both for 4 characters seperately) in the game for the calc. Could I decrypt the ROM file with C++?

I know that emulators decrpyt ROM files, but how could I put those possibilities into a calculator? And how could I add sound (yes, TI calculators have sound, kind of like piezzo buzzer, and I only know of two games for TI calculators that have sound)?
magus57 is offline   Reply With Quote
Old May 5th, 2006, 7:20 PM   #15
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Only if you knew a whole lot about what you were doing, then you wouldn't need C++. I don't think you're absorbing what you've been told in the thread. Of course, there's some distracting BS in the thread, I know.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old May 5th, 2006, 7:23 PM   #16
magus57
Newbie
 
Join Date: May 2006
Posts: 6
Rep Power: 0 magus57 is on a distinguished road
From what I've read, people say that it's hard to do, but not impossible, and I'm one of those people that keep on going until somebody says (most of the time with proof) it is impossible. So IS there a program with the same capabilities of a emulator, except to show the code rather than execute it?
magus57 is offline   Reply With Quote
Old May 5th, 2006, 7:41 PM   #17
lectricpharaoh
Caffeinated Neural Net
 
lectricpharaoh's Avatar
 
Join Date: Jun 2005
Location: Wet west coast of Canada
Posts: 1,107
Rep Power: 5 lectricpharaoh will become famous soon enough
Quote:
Originally Posted by magus57
From what I've read, people say that it's hard to do, but not impossible, and I'm one of those people that keep on going until somebody says (most of the time with proof) it is impossible. So IS there a program with the same capabilities of a emulator, except to show the code rather than execute it?
What you need is a disassembler. Disassemblers convert machine code to assembly code, but be warned, it will probably be very hard to read. For example, memory references will be by address or some pergenerated label, rather than intelligible symbolic names, and comments will (obviously) not be reconstructed. Also, some programmers used tricks (such as self-modifying code) to fool disassemblers, and get them to show erroneous code.

Assuming you can find a disassembler for the CPU in question, and are fluent in assembly language for said CPU, you will still need to learn enough about the non-CPU architecture of the original system to understand the code. As an example, on most 80x86-based PCs, the programmable interrupt controller (well, controllers; there's usually two), programmable interval timer, and other such things are located at standard port addresses, but this is a function of the PC architecture, not the 80x86 architecture.

In short, it would probably be easier to clone the game through external observation than to try to directly translate the code. You can try ripping the data (sprites, sounds, etc) from the ROM image, provided you can get the tools to do so (I'm sure they exist somewhere).
__________________
And once again, Probability proves itself willing to sneak into a back alley and service Drama as would a copper-piece harlot.
- Vaarsuvius, Order of the Stick
lectricpharaoh is offline   Reply With Quote
Old May 5th, 2006, 8:14 PM   #18
magus57
Newbie
 
Join Date: May 2006
Posts: 6
Rep Power: 0 magus57 is on a distinguished road
I just have one last question:

Is there any way to boot an .exe on a TI-84 calculator (that is not on the calculator)? I heard about this one guy who played a movie through a USB drive on his TI-84 calculator (and I downloaded the program, but I'm still waiting for the cable), and he also made another program to look (and I think maybe execute) programs off a USB drive.
magus57 is offline   Reply With Quote
Old May 5th, 2006, 10:09 PM   #19
magus57
Newbie
 
Join Date: May 2006
Posts: 6
Rep Power: 0 magus57 is on a distinguished road
Well, I found an emulator with debugging capabilities, and I dumped the RAM, VRAM, Sprites, Palette, CPURegs, and VRegs in ASCII mode, but it doesn't look like something I could program on a calculator when I opened the files in Microsoft Word (it looked like a chart, and there were numbers and letters in each row, and each file had 30-60 rows). But when I dumped the files in Raw, all I got were these strange squares throughout the whole document. How do I open Raw files? And would Raw files be more appropriate for programming than ASCII files?
magus57 is offline   Reply With Quote
Old May 5th, 2006, 11:06 PM   #20
lectricpharaoh
Caffeinated Neural Net
 
lectricpharaoh's Avatar
 
Join Date: Jun 2005
Location: Wet west coast of Canada
Posts: 1,107
Rep Power: 5 lectricpharaoh will become famous soon enough
Quote:
Originally Posted by magus57
Well, I found an emulator with debugging capabilities, and I dumped the RAM, VRAM, Sprites, Palette, CPURegs, and VRegs in ASCII mode, but it doesn't look like something I could program on a calculator when I opened the files in Microsoft Word (it looked like a chart, and there were numbers and letters in each row, and each file had 30-60 rows). But when I dumped the files in Raw, all I got were these strange squares throughout the whole document. How do I open Raw files? And would Raw files be more appropriate for programming than ASCII files?
Hehehe. Sorry, but if you're asking this, you've got a lot to learn before you'll be ready to try tackling this issue.

This emulator you mentioned (from which you got an ASCII dump) seems to have given you an assembly output of the RAM (in other words, it disassembled it), but bear in mind for areas of memory that are data (as opposed to code), viewing it as a series of instructions makes no sense. For the program code itself, it's probably just fine, though if you don't understand it, you need to learn assembly for the CPU in question (and info on assembly-language programming tends to be much sparser than info for more mainstream programming languages, not to mention the CPU you mentioned isn't exactly mainstream either).

As for the 'raw' format, that will just be plain binary. For some stuff, that's how you want your data (and some assemblers and compilers will let you insert binary data directly into the object output, like NASM doeswith its INCBIN directive). For code, you will want a disassembled version of the memory. If working with raw data, you will often not change it, and if you do, you will want to use a hex editor, not a word processor or text editor. For the disassembled version, which is ASCII, you will want to use a text editor, or an IDE, and not a word processor. While it's possible to use a word processor, they generally insert special formatting codes and other extraneous stuff besides the actual text, which messes things up. If you make sure to save as plain ASCII, it's doable, but really, why not use tools approriate for the job?

I'm not saying what you want to do is impossible. It's certainly possible. However, it seems to be far beyond your current skill set (I know it's beyond mine), so you might want to look into alternate approaches.
__________________
And once again, Probability proves itself willing to sneak into a back alley and service Drama as would a copper-piece harlot.
- Vaarsuvius, Order of the Stick
lectricpharaoh is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 6:43 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC