Author Topic: Running axe software on CSE (no gfx)  (Read 5721 times)

0 Members and 2 Guests are viewing this topic.

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Running axe software on CSE (no gfx)
« on: April 16, 2014, 08:44:44 am »
Is it possible to run software created with axe on the cse by just changing some stuff in the header of a program?

As a test I created the same program on my CSE and my regular 84+ using asmComp. Then I compared them using a hex editor.
0000 0000: 2A 2A 54 49 38 33 46 2A  1A 0A 00 50 72 6F 74 50  **TI83F* ...ProtP
0000 0010: 72 6F 67 72 61 6D 20 66  69 6C 65 20 30 34 2F 31  rogram f ile 04/1
0000 0020: 36 2F 31 34 2C 20 31 34  3A 33 31 00 00 00 00 00  6/14, 14 :31.....
0000 0030: 00 00 00 00 00 1A 00 0D  00 09 00 06 41 53 4D 54  ........ ....ASMT
0000 0040: 00 00 00 00 0A 00 09 00  07 00 EF 69 3E 03 D3 00  ........ ..´i>.Ë.
0000 0050: C9 A0 04                                          ╔á.
0000 0060:
0000 0070:
0000 0080:


Regular 84+
0000 0000: 2A 2A 54 49 38 33 46 2A  1A 0A 00 50 72 6F 74 50  **TI83F* ...ProtP
0000 0010: 72 6F 67 72 61 6D 20 66  69 6C 65 20 30 34 2F 31  rogram f ile 04/1
0000 0020: 36 2F 31 34 2C 20 31 34  3A 33 33 00 00 00 00 00  6/14, 14 :33.....
0000 0030: 00 00 00 00 00 1A 00 0D  00 09 00 06 41 53 4D 54  ........ ....ASMT
0000 0040: 00 00 00 00 01 00 09 00  07 00 BB 6D 3E 03 D3 00  ........ ..╗m>.Ë.
0000 0050: C9 67 04                                          ╔g.
0000 0060:
0000 0070:
0000 0080:


Mismatches are marked red. The machine code is marked green.


The first mismatch is because of the difference in time ofc. The second, third and fourth ones are more interesting. Those might be a version number/device identifier. The last mismatch is ofc the checksum of the file.

Let me hear what your thoughts are on this.
« Last Edit: April 16, 2014, 08:46:37 am by Keoni29 »
If you like my work: why not give me an internet?








Offline TheMachine02

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 452
  • Rating: +105/-0
  • me = EF99+F41A
    • View Profile
Re: Running axe software on CSE (no gfx)
« Reply #1 on: April 16, 2014, 10:16:53 am »
I guess that even if the program can actually be run on the CSE with those headers modification, screen updating and other drawing command will be totally messed up, cause screen are drasticlly different.
Math only program* may * run fine by the way.
 
Also, I don't know if bcall are the same on the two calc. If not, prepare to enter into crash mode  :P
AXE/asm programmer - unleash the power of z80 //C++//C

epic 3D things http://www.ntu.edu.sg/home/ehchua/programming/opengl/CG_BasicsTheory.html

Offline JosJuice

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1344
  • Rating: +66/-14
    • View Profile
Re: Running axe software on CSE (no gfx)
« Reply #2 on: April 16, 2014, 10:29:16 am »
Indeed, the first mismatch is just the time inside the comment added by TI-Connect, and the last one is the checksum. The second one is the "version" byte. If it's higher than the OS expects, I think you get an ERR:VERSION. The third one (two bytes) is actually part of the program data itself - the header of an assembly program is different on the CSE. So yes, if you changed the version byte and program header and recalculated the checksum, you can run the code on both calculators. But since there are a lot of differences between the two OSes, such as addresses of bcalls and free RAM areas, it would be hard to write code that works.

EDIT: Oh, it's in Axe. That probably makes it even harder to write OS-independent code, since the low-level routines are provided by Axe instead of written by you.
« Last Edit: April 16, 2014, 10:33:46 am by JosJuice »

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: Running axe software on CSE (no gfx)
« Reply #3 on: April 16, 2014, 10:34:49 am »
Ah ok. I just wanted to see if my sid dump player works on a CSE without modifying it. I might take out the Disp stuff since those use Bcalls. Handling appvars probably uses bcalls as well, but I will have to test if that still works.

I will disassemble the program I created using axe and change the remaining bcalls. Is there a bcall map available for the CSE yet?
If you like my work: why not give me an internet?








Offline JosJuice

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1344
  • Rating: +66/-14
    • View Profile
Re: Running axe software on CSE (no gfx)
« Reply #4 on: April 16, 2014, 10:41:05 am »
Ah ok. I just wanted to see if my sid dump player works on a CSE without modifying it.
Probably not, but I guess it's worth a try if you don't mind horrible crashes :)
I will disassemble the program I created using axe and change the remaining bcalls. Is there a bcall map available for the CSE yet?
I know that there are a few bcalls at WikiTI, but that's definitely not all of them.

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: Running axe software on CSE (no gfx)
« Reply #5 on: April 16, 2014, 12:45:51 pm »
If it's a program that doesn't require graphics yea. It *might* run, or require very few modifications in order to be able to.

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: Running axe software on CSE (no gfx)
« Reply #6 on: April 16, 2014, 01:07:23 pm »
By the way, what you are trying to do (porting an Axe prog to another z80 calc) has already been done by Matref I think. He ported one of his Axe games to the TI-83.

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: Running axe software on CSE (no gfx)
« Reply #7 on: April 16, 2014, 02:28:16 pm »
I just fiddled with some of the headers and got my program to upload and run, but it crashed my calc almost immediately.
Edit: I might write a PC program that takes .8xp and changes the headers so it can be executed on a CSE. In the future it could also look for bcalls and it would replace them with the right ones for the CSE.
« Last Edit: April 16, 2014, 02:30:35 pm by Keoni29 »
If you like my work: why not give me an internet?








Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Running axe software on CSE (no gfx)
« Reply #8 on: April 16, 2014, 02:30:45 pm »
It probably depends if there are memory areas that moved around between the 84+ and CSE OSes. That can cause issues if that's the case. Otherwise, only screen related material will be messed up.

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: Running axe software on CSE (no gfx)
« Reply #9 on: April 16, 2014, 02:31:49 pm »
Hmm if that is the case I might just start from scratch and write the entire program in z80 asm.
If you like my work: why not give me an internet?








Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: Running axe software on CSE (no gfx)
« Reply #10 on: April 16, 2014, 03:22:39 pm »
-snip-
« Last Edit: April 16, 2014, 03:31:46 pm by Keoni29 »
If you like my work: why not give me an internet?