* WalrusIRC

You need to have 5 posts and not be part of restricted usergroups in order to use the WalrusIRC embedded shoutbox. However, you can also access our IRC channel called #CodeWalrus via EFnet.

Author Topic: Storing code/functions in a .8xv file as a library  (Read 574 times)

0 Members and 1 Guest are viewing this topic.

Offline kotu

  • Walrus Extender Utils
  • Super User
  • Join Date: Aug 2016
  • Location: UK
  • Posts: 915
  • Post Rating Ratio: +7/-7
    • profile.php?id=100010378444176
    • dj_kotu
    • @UCAy2ZF4hbc08iStnTn6jgxQ
    • rowanmedhurst
    • @djkotu
    • @romanov-psyco
    • View Profile
    • futurerave.uk
  • Gender: Male
Storing code/functions in a .8xv file as a library
« on: November 14, 2016, 09:59:20 am »
Is it trivial to do this? @MateoConLechuga ? lol. or anyone

my game is coming close to the upper size limit, not sure if it will make it at the moment. there's not much space for code lol

thanks!


  • Calculators owned: TI 84+CE-T
  • Consoles, mobile devices and vintage computers owned: Sega Master System, Sony PS3
we not doing it.
UPDATE we are not doing it.
proud member of the MATEOCONLECHUGA fansite.

Offline Snektron

  • Lvl 69 Russian Snake
  • CodeWalrus Staff
  • Super User
  • Topic Management
  • Join Date: Dec 2014
  • Location: Netherlands
  • Posts: 3155
  • Post Rating Ratio: +31/-0
  • SSSssssss.....
    • RobinDeWalvis
    • Kzyrox
    • RobinDeWalvis
    • View Profile
    • quantuminfinity
  • Gender: Male
Re: Storing code/functions in a .8xv file as a library
« Reply #1 on: November 14, 2016, 10:03:21 am »
It is possible, but note that it can only contain relocatable code since it isnt guaranteed where in ram the 8xv lies. That means only jumps smaller than 128 bytes and for larger ones a bigger piece of code which adds the base address.
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Offline kotu

  • Walrus Extender Utils
  • Super User
  • Join Date: Aug 2016
  • Location: UK
  • Posts: 915
  • Post Rating Ratio: +7/-7
    • profile.php?id=100010378444176
    • dj_kotu
    • @UCAy2ZF4hbc08iStnTn6jgxQ
    • rowanmedhurst
    • @djkotu
    • @romanov-psyco
    • View Profile
    • futurerave.uk
  • Gender: Male
Re: Storing code/functions in a .8xv file as a library
« Reply #2 on: November 14, 2016, 10:05:31 am »
It is possible, but note that it can only contain relocatable code since it isnt guaranteed where in ram the 8xv lies. That means only jumps smaller than 128 bytes and for larger ones a bigger piece of code which adds the base address.

what does that mean if the functions are in c? i have no idea how big the jumps are lol

sounds like it would probably be easier to store the graphics in their own file

thanks
  • Calculators owned: TI 84+CE-T
  • Consoles, mobile devices and vintage computers owned: Sega Master System, Sony PS3
we not doing it.
UPDATE we are not doing it.
proud member of the MATEOCONLECHUGA fansite.

Online DJ Omnimaga

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Forum Maintenance
  • Original 5
  • CodeWalrus Supporter
  • *
  • Topic Management
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18238
  • Post Rating Ratio: +91/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • View Profile
    • DJ Omnimaga music store
  • Gender: Male
Re: Storing code/functions in a .8xv file as a library
« Reply #3 on: November 14, 2016, 08:37:47 pm »
Ideally, you need to make sure that all text/graphics in the game is displayed using the same piece of code and stored into a data application variable, to keep the code size down. Hardcoding everything (eg one piece of code per animation) is going to make the code size skyrocket.

Another alternative that is not the ideal solution but could work as last resort is to make the game an hybrid TI-BASIC and C game, where the BASIC program acts solely as a launcher, combined with XCOPY or something else that can copy archived files to RAM, and then you have one C program per game part (eg one for the intro/menus and another for the game part). In such case you would need to return several values into an appvar so that once one of the C programs is quit, those values can be retrieved by the next C program. Such hybrid TI-BASIC/C game would give you unlimited code space.
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)
??? ??? ??? ???

Offline Snektron

  • Lvl 69 Russian Snake
  • CodeWalrus Staff
  • Super User
  • Topic Management
  • Join Date: Dec 2014
  • Location: Netherlands
  • Posts: 3155
  • Post Rating Ratio: +31/-0
  • SSSssssss.....
    • RobinDeWalvis
    • Kzyrox
    • RobinDeWalvis
    • View Profile
    • quantuminfinity
  • Gender: Male
Re: Storing code/functions in a .8xv file as a library
« Reply #4 on: November 14, 2016, 10:05:03 pm »
It is possible, but note that it can only contain relocatable code since it isnt guaranteed where in ram the 8xv lies. That means only jumps smaller than 128 bytes and for larger ones a bigger piece of code which adds the base address.

what does that mean if the functions are in c? i have no idea how big the jumps are lol

sounds like it would probably be easier to store the graphics in their own file

thanks

Yeah, it would probably be easier to do that :P

What you can do too is store the code in an appvar, but copy it to some free ram area.
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Offline Sorunome

  • Full User
  • CodeWalrus Supporter
  • *
  • Safe-haven access
  • 2016 Yearly CW Project Winner
  • *
  • Join Date: Mar 2015
  • Location: Equestria
  • Posts: 152
  • Post Rating Ratio: +6/-0
  • Keep calm and fox on
    • @sorunome
    • @sorunome
    • /u/sorunome
    • Sorunome
    • 110/11005
    • View Profile
    • My Website
  • Gender: Female
Re: Storing code/functions in a .8xv file as a library
« Reply #5 on: November 14, 2016, 10:08:09 pm »
Which platform (calculator) is this for?
  • Calculators owned: Too many (why are you even reading this?)
  • Consoles, mobile devices and vintage computers owned: Gamebuino!
This is a signature.
And now......give me an internet!

To be or not to be.........is that even a question? Who gets to decide this anyways?

Online DJ Omnimaga

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Forum Maintenance
  • Original 5
  • CodeWalrus Supporter
  • *
  • Topic Management
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18238
  • Post Rating Ratio: +91/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • View Profile
    • DJ Omnimaga music store
  • Gender: Male
Re: Storing code/functions in a .8xv file as a library
« Reply #6 on: November 14, 2016, 10:08:47 pm »
TI-83 Premium CE, TI-84 Plus CE and TI-84 Plus CE-T (I think he mainly uses C)
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)
??? ??? ??? ???

 


You can also use the following HTML or bulletin board code to share it on your page or forum signature!


Also do not forget to check our affiliates below.
Planet Casio TI-Planet Calc.news BroniesQC BosaikNet Velocity Games