Gr $C000

Got questions? Got answers? Go here for both.

Moderator: MaxCoderz Staff

Post Reply
cjgone
Regular Member
Posts: 83
Joined: Tue 18 Apr, 2006 5:33 am
Location: Washington->UC Berkeley '15

Gr $C000

Post by cjgone »

Okay, I have taken all precautions to avoid the horrible $C000 limit.

MY program takes up 10.1k mem, which is over the 8.8k limit...

However, I have thrown all the data (pics, sprites, etc) to the bottom of the program....it works, but if I add 600 bytes (of pics, etc) to the end of the code, it doesn't work anymore.

Please help.

Note: I'm using graylib.inc which I have no clue copies the code to the bottom, maybe.

current layout:

Code: Select all


;header

; code

; data

; #include graylib.inc

;end

[NOTE] I fixed this by moving the graylib.inc above the data -_-


However:

More questions:

Can I load data from $C000?

How does memory remapping work (port 05, etc)?
Liazon
Calc Guru
Posts: 962
Joined: Thu 27 Oct, 2005 8:28 pm

Post by Liazon »

for future reference, understand that #include will is the same as "copy and paste everything in that file into this file starting at this line"

this is no big deal w/ ti83plus.inc and ion.inc, etc. because they only have equates and defines. No code, just defining labels, and i guess it's like static finals in java, or w/e you call a constant.

Code: Select all

;header

;code

;#include "graylib.inc"  <- this is code

; data

;end
however, graylib and graylib2 have code in them, so this tends to be a problem for placement. obviously, it's a separate routine, so it should go where all your other routines are placed. somewhere outside of the main program block.

note that you can also do #include "file.z80" or #include "file.asm" those also work if you want to include code from another file into the current file. This is great if you want to separate out all your routines into different .z80 files for better viewing, organization, and coding, provided you're using something w/ tabs like notepad++ :)
in other words, you're asm program doesn't need to be all one file. it can be multiple files, provided the parts are included in the main file that the assembler will process.

btw, I recommend SPASM, or Brass and stick to it. each has some nifty features for dev and debug.

as for your last question, afaik, you can directly access data past $C000. that is, you can load the address into any registers and do whatever you want w/ registers to get that data into the registers. you can even directly modify the RAM past $C000

what you can't do is call a routine/code that is stored there. what you had originally was graylib was probably located beyond $C000 so when you called it from your main block, you had issues w/ Ti-OS. duno if it's entirely accurate, but Ti-OS essentially does

Code: Select all

if (register pc >= $C000) *explode" *boom* XD
and I think if you make the program MOS only, not ion, I think MOS can take care of the memory mapping if it's less than 24k of code. not sure on that but you can probably find out from a DetachedSolutions person.

once again, good job on the gs tetris.

and good luck on your b/w action game. i eagerly wait its completion :)
Image Image Image
User avatar
benryves
Maxcoderz Staff
Posts: 3087
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

Ion appends its library code (things like ionFastCopy) to your program when loaded. Thus an Ion program > ~8K will run fine in MirageOS, but will crash when run in Ion itself. :(
User avatar
Dwedit
Maxcoderz Staff
Posts: 579
Joined: Wed 15 Dec, 2004 6:06 am
Location: Chicago!
Contact:

Post by Dwedit »

Does anyone actually use ION? It's been made obsolete on the TI83 by Venus, and on the TI83+ by MirageOS, Noshell, or CrunchyOS.
You know your hexadecimal output routine is broken when it displays the character 'G'.
Liazon
Calc Guru
Posts: 962
Joined: Thu 27 Oct, 2005 8:28 pm

Post by Liazon »

come to think of it, does RGP work decently on 83s?

@benryves: O_O that's kinda stupid.
Image Image Image
Post Reply