This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Messages - Iambian
Pages: 1 ... 17 18 [19] 20 21 ... 52
271
« on: January 10, 2011, 08:43:33 pm »
I haven't played Picross in a while, but I believe that the way you stack the sets of multiple numbers in the screenies, and the way the numbers are stacked in other Picross games are in reverse. You should try just writing the numbers out in the opposite direction. I'm not completely sure though so don't quote me on it.
Excellent observation! It is, indeed, reversed, but the reason it's reversed is because of how the code generates the numbers. I was thinking about how to get it back to the way it should be, but I didn't want to mess around with code that seemed to work for its purpose. So, yeah. It *is* backwards, but I don't intend on changing it. Too much work.
272
« on: January 09, 2011, 12:39:10 am »
I've almost got the title screen back to the way it was. It's a breeze coding in the new things once all the little details are filled in. I'm happy with my cross-page call and jump routines. The next challenge will be to use the grayscale layer effects instead of contrast effects to give the look that should've been captured on the emu's screenshots to begin with (they weren't). Since I'm not messing with contrast anymore, it should ease a few worries that other projects had with respect to changing contrast and rendering the game illegible, or worse, unplayable.
Gotta work the menu system a wee bit more. Forgot to add special support for the 2nd button.
273
« on: January 06, 2011, 08:51:23 pm »
Sweet How exactly does your data structure for your menu's look? Can't wait for the new thread actually
This post is to satiate your curiosity. The following is pulled straight from the project: ;============================================================================= ;Note: During initialization stage, any data that is set to -1 will cause that ; value to be, instead, loaded from the indicated register ; ;Menu system data and routines formatting: ;Initializer formatting | Internal memory structure ;Ofs Reg Description |Ofs Description ;+00 A Menu slot (0-7) |+00 Cursor X ;+01 C Starting cursor X |+01 Cursor Y ;+02 B Starting cursor Y |+02 dX ;+03 E dX |+03 dY ;+04 D dY |+04 X boundary ;+05 L X boundary |+05 Y boundary ;+06 H Y boundary |+06 Current X position ;+07 IXl LSB Routine Table |+07 Current Y position ;+08 IXh MSB Routine Table |+08 LSB Routine Table ; |+09 MSB Routine Table ; ;Routine Table (structure semi-variable) ; ;+0 Maskouts %Dl Md 2n y= Up Rg Lf Dn : Count # of bits =n. n=#of words ;+1*2n Addresses from Dl to Dn in that order (left shift)
274
« on: January 06, 2011, 07:44:01 pm »
Wellsirs. The menu system is up and running after a few failed attempts. I'm liking how it's both leaner and simpler to work with, so I'm guessing that it won't be much longer before I can reconstruct the stuff. On that note, I've gotta check up on Kerm's SourceCoder thing to see if it'll spit out the data I need to get the graphics going. Once that's done, I'll be going full speed ahead in making the thing looking like it was a while back.
Also, I'm going to start a new thread soon to indicate that this project has been rebooted. To top it off will be the original screenies that Zera pulled off the site when there was that heated dispute some time ago.
EDIT: I haven't tested out *all* the new menu system's features quite yet. These new features lets me create more dynamic menus should I need to.
275
« on: January 05, 2011, 08:39:16 pm »
Double-post (I think). This now involves understanding how a romcall works. I've attached a romcall routine replacement used in E:SoR. It relocates itself to RAM, which is why there are masses of strange labels. It also uses SMC to ease a few ... things.
XPC equ XPCBASE+($-XPCS) ;This is the one that needs to be called. ;Will be relocated to $9D95 eventually. Need to initialize XPCZ with base page. ;Just "in a,(6) \ ld (XPCZ),a" after copying this routine to RAM. ;After restoring registers, ;ret takes you to address of new page.(3) ;The ret after that takes you to the XPM routine (2) ;The pop restores your page number (1) ;The last RET takes you back to the routine (base) push hl ;Slot1 ;1 1 push hl ;Slot2 ;1 2 push hl ;Slot3 ;1 3 push hl ;1 4 push de ;1 5 push af ;1 6 ld hl,12 ;3 9 add hl,sp ;1 10 ld sp,hl ;1 11 pop hl ;1 12 ld e,(hl) ;1 13 inc hl ;1 14 ld d,(hl) ;1 15 inc hl ;1 16 ld a,(hl) ;1 17 inc hl ;1 18 push hl ;base ;1 19 XPCB equ XPCBASE+($-XPCS) ld L,a ;1 20 in a,(6) ;2 22 push af ;1 ;1 23 XPCZ equ XPCBASE+($-XPCS)+1 ld a,00 ;2 25 sub L ;1 26 out (6),a ;got page ;2 28 ld hl,XPCM ;3 31 push hl ;2 ;1 32 push de ;3 ;1 33 ld hl,-6 ;3 36 add hl,sp ;1 37 ld sp,hl ;1 38 pop af ;1 39 pop de ;1 40 pop hl ;1 41 ret ;jp 3 ;1 42 XPCM equ XPCBASE+($-XPCS) push af ;2 above base ;1 43 inc sp \ inc sp ;1 ;2 45 pop af ;0 ;1 46 out (6),a ;2 48 push af ;1 ;1 49 dec sp \ dec sp ;2 ;2 51 pop af ;1 ;1 52 inc sp \ inc sp ;0 ;2 54 ret ;1 55 bytes this routine takes up. XPCE: ;9D95 has 107 bytes prior to next high byte.
276
« on: January 05, 2011, 07:51:28 pm »
What I have here is for someone on the omni chat room. It explains a little about the VAT. If you find this useful, move this topic to some other place.
On the TI-83 Plus graphing calculator, there are three different tables used to allocate memory to programs, or to determine the presence of each program or variable to the calculator. For the reason the table exists, it's often times called the "VAT", or "Variable Allocation Table". Usually, this name is given to the second part of the entire table, or to be most specific, the first part of the table, with a fixed beginning, is called the "Symbol VAT" and the next part is called the "Program VAT", but some people would call it the "Symbol Table" and the "VAT", respectively. The third part, which few people know about, is the Temporary Variable section, which is pointed to by (pTemp). (pgmPtr) points to the Program VAT.
All entries on any table are written in backwards, from high memory to low memory.
All entries on Program VAT vary depending on the name length
============================================== | -(n+6) -6 -5 -4 -3 -2 -1 0 | ============================================== | VarName N.Len Page DadrH DadrL Ver T2 T | ==============================================
VarName can be up to 8 characters in length T= first five bits are datatype, b5= graph equ selected b6= variable used during graphing b7= link transfer flag T2=for future use [TI-OS keeps it at ZERO] Ver= version code to not recieve if higher than current OS code DadrL = data address, LSB DadrH = data address, MSB Page = if archived, holds flash page. Otherwise, = 0 N.Len = following name's length. For lists, this includes token and formula #
For lists, the name can be up to 5 characters in length. Preceding the name is the list token ($5D), and postceding it is the formula number, which is set to zero if there is no formula attached. If there is, then a number will be given to point to a corresponding unique name for an EQU variable in the Symbol VAT.
All entries on the Symbol VAT are fixed in size.
============================================== | -8 -7 -6 -5 -4 -3 -2 -1 0 | ============================================== | 0 Tok2 Tok1 Page DadrH DadrL Ver T2 T | ============================================== Tok1 = first token of name Tok2 = second token of name
A symbol table entry for a formula would be where: Tok1 = $3F Tok2 = F, where "F" would be the corresponding function # found with the list.
If you want, here's some code that'll perform a sort on the program VAT. My hope is that it'll help you better understand code that works with the VAT:
#define equ .equ #define EQU .equ #define EQU .nostub
.org $9D93 .dw $6DBB ;Program used to sort the Program/List VAT alphabetically ;(progPtr) is the start of the VAT. First order of business is to determine ;how many entries are in the VAT. Then we can go ahead and blindly sort the ;entire contents of the VAT. ;Checking against (pTemp) at the end of the run. Gets us this manieth entries ; ; #define bcall(xxxx) rst 28h \ .dw xxxx _DispHL EQU 4507h
pTemp EQU 982Eh progPtr EQU 9830h tempSwapArea EQU 82A5h curptr equ tempswaparea ;2 bytes, current location in the VAT swaptemp equ curptr+32 ;up to 30 bytes for temporary swapping. Backwards
ProgramStart: ld ix,0 ld bc,(ptemp) ld hl,(progPtr) ProgramLoop1: call GetNextEntry inc ix push hl ;preserve HL for the check. or a sbc hl,bc ;checking to see if it's at the end. pop hl jr nz,ProgramLoop1 ;If end of VAT is not current pointer, keep going. push ix pop bc ProgramLoop2: ld hl,(progPtr) ;pointer to the start of the VAT, to start off with each run dec bc ld a,b or c ret z ;Kill routine if there's no more entries to sort through push bc ;saving this variable for later... ProgramLoop3: push bc ;save loop counter for VAT traversal push hl ;save current address to the VAT location ld de,-6 ;to get to... add hl,de ;...file name size of this VAT entry ld c,(hl) ;getting size of entry #1 into C push hl ;saving first address point ld a,c ; cpl ;getting past name and first decrement add a,e ;-6+-1+-sizeofcurrenname = entry #2 name size ld e,a ;Hehe. Loading this back into DE add hl,de ;now at size of second file ld b,(hl) ;And putting filename size #2 into B dec hl ;moving HL to the filename's start (#2) pop de ;DE is 1st file, HL is second file. Starting at their names. dec de ;moving DE to the filename's start (#1) ld a,c ;Start comparison of namelength fields. cp b ;C=(#1) B=(#2); C-B. Carry if C is shorter ld a,1 ;If first name is longer, then perform swap if all is equal jr nc,$+4 ;If B(#1) is shorter (NC), skip. Else, set B to short and... dec a ;...reset A to indicate no swap. ld b,c ;Set B to the lowest possible ld c,a ;Resetting C to function as a flag. Should it swap is the anser. ProgramLoop4: ld a,(de) ;1st file cp (hl) ;2nd file. dec de ;get next characters in the file names. dec hl jr nz,$+6 ;if the names do not match, jump past to continuation... djnz ProgramLoop4 ;only iterating for shortest number of characters. jr ProgramSkip5 ;If no more chars, do default swap action from last rtn. ld c,0 ;Remove flag from previous routine. Diff in name means... jr c,ProgramSkip5 ;(1f)-(2f) If carry, no swap needed. inc c ;else, start up the routine used for swapping. Programskip5: ;we have our flags now. 0 for noswap, 1 for swap pop hl ;get back current VAT address (starting) ld (curptr),hl ;save this for future reference. call GetNextEntry ;getting the next entry from HL dec c ;checking for zero. If so, a swap is in order... jr nz,ProgramSkip6 ;if jump is taken, skip the swapping business ld de,swaptemp ;loading the temporary writeout address call CopyEntry ;copy second entry ld hl,(curptr) ;get back the first entry location push hl ;Save it as the location to write back to. call CopyEntry ;copy the first entry as second into the buffer ld hl,swaptemp ;loading higher address to HL and prepare for subtraction or a ;clear out carry flag so sbc isn't affected. sbc hl,de ;Subtract to get the size difference (number of bytes) ld b,h ;number of bytes total to copy ld c,L pop de ;back to first entry location push de ;save that sucker again. ld hl,swaptemp ;point to the start of the temporary buffer location lddr pop hl call GetNextEntry ;getting the NEW next entry ProgramSkip6: pop bc dec bc ld a,c or a jr nz,ProgramLoop3 pop bc jr ProgramLoop2 CopyEntry: ld bc,6 ;write and decrement HL and DE the first 5 bytes of VAT entry. lddr ;Uh. yeah. ld a,(hl) ;Get that sixth byte, which is size field inc a ;Another for this byte as well... ldd ;Perform one LDD for each byte of the name and the size field as... dec a ;...indicated by this number. jr nz,$-3 ;And loop until the entire things is written out into the buffer ret GetNextEntry: ld de,-6 ;go ahead and skip past current entry... add hl,de ; ld a,(hl) ;get those size bytes. cpl ;and as we did before ld e,a ;add them together with the CPL's autodecrement add hl,de ;and we're at the start of entry #2. ret
.end The following bit of source comes right out of Celtic III. It searches the VAT for some given variable in Op1. It's supposed to be a replica of the ChkFindSym romcall, but I wrote it because I wanted something faster than a romcall. I believe this code searches both the Symbol Table and the Program/List VAT structures.
SearchVAT: ld hl,(Op1) ld h,$00 ld de,SearchVTbl add hl,de ld a,(hl) or a jr nz,SearchVP SearchVS: ld hl,(progptr) ld de,-6 add hl,de ex de,hl ld hl,symtable-6 ld bc,-9 SearchVSL: push hl ld a,(Op1+1) cp (hl) dec hl jp nz,SearchVSN ld a,(Op1+2) cp (hl) dec hl jp nz,SearchVSN ld a,(Op1+3) cp (hl) dec hl jp nz,SearchVSN ld bc,4 add hl,bc ld b,(hl) inc hl ld d,(hl) inc hl ld e,(hl) jr SearchVSE SearchVSN: pop hl add hl,bc or a sbc hl,de add hl,de jp nz,SearchVSL scf ret SearchVSE: pop hl ld a,(Op1) or a ret SearchVP: ld hl,Op1+1 xor a ld c,a cp (hl) jr z,$+8 inc hl inc c bit 3,c jr z,$-7 ld hl,(progptr) ld de,-6 SearchVPL: ld a,(Op1) cp (hl) jr nz,SearchVPS push hl ld de,Op1+1 ld b,c ld a,(de) cp (hl) jr nz,SearchVPSP inc de inc hl djnz $-6 pop hl push hl dec hl dec hl dec hl ld e,(hl) dec hl ld d,(hl) dec hl ld b,(hl) pop hl or a ret SearchVPSP: ld de,-6 pop hl SearchVPS: add hl,de push de ld a,(hl) neg ld e,a add hl,de ld de,(ptemp) or a sbc hl,de add hl,de pop de jr nz,SearchVPL scf ret
SearchVTbl: .db 0 ;00 real .db 1 ;01 list .db 0 ;02 matrix .db 0 ;03 equation .db 0 ;04 string .db 1 ;05 program .db 1 ;06 protected program .db 0 ;07 picture .db 0 ;08 graph database .db 0 ;09 unused .db 0 ;0A unused .db 0 ;0B new equation .db 0 ;0C complex .db 1 ;0D complex list .db 0 ;0E unused .db 0 ;0F unused .db 0 ;10 unused .db 0 ;11 unused .db 0 ;12 unused .db 0 ;13 unused .db 0 ;14 application. Passthrough. .db 1 ;15 appvar .db 1 ;16 temporary program .db 1 ;17 group
277
« on: January 03, 2011, 02:06:52 am »
I think he means that the slowdown would occur just in general while looking at/using a menu. I had this issue as well with the bag in Ash:Phoenix; since the game was rewriting all the text every frame, the gray looked really crappy. I ended up writing a separate routine for the inventory menu that would only update the screen whenever a button was pressed, but it cost me a lot of space
Ah, that's not really much of an issue with E:SoR, since it manages its version of a textshadow buffer rather efficiently. It runs as a 4x4 tilemapper so the text is rather ... aligned... but what I get out of it is the ability to not write to areas to the screen that are not defined in this "textmapper". This is a real asset when updating cursor positions, since the only thing on the textshadow are the characters that form the cursor. Still, when looking at the inventory, the textmapper *does* have to do a lot of work since it is updating more of the screen than it is usually used to. The real slowdown I'm worried about is what is happening with the printf macro when it is rebuilding the "textshadow" buffer during one of its frames. To a normal player, this degradation of grayscale quality *might* be tolerable, since it only happens when something onscreen is changing. I'm a little worried about that one frame. Ought I be? Or am I just setting my expectations too high? I mean, I want to make this incarnation "cleaner" and from the scheme I'm coming up with, it has the potential of just being visually messier. The only reason I'm adopting the scheme is because it makes managing data across pages almost infinitely easier. I'm sure it's a worthy goal to pursue if it means getting the game out earlier, but still. To sacrifice something for a quicker release is also rather upsetting in my eyes. On a slightly better note, I managed to make some core routines faster, so maybe I'm just imagining things. If anyone wants to try to improve on this textmapper, give it a go. All registers are free for use, including shadow registers. I'm currently using the stack pointer to extract two 4x4 pairs at a time. Space is not (much of) an issue, though don't try unrolling loops. http://iambianet.pastebin.com/XCWgLzUKMaybe "tomorrow," I'll lay down new groundwork for the next menu system. I've spent too much time reading fanfiction...
278
« on: January 01, 2011, 12:35:43 am »
Ah sounds good And i don't think super speed is really a neccesity for menu's really Even 1 FPS can work since you really aren't doing anything really intensive.
It's not the speed of the menu that's worrying me. The lag can cause grayscale quality issues when the screen needs a large update. I see the inventory doing this in spades. I'm hoping to do something with the renderer that'll increase speed, but I'm not sure exactly what. I should get something working first before I say anything about it.
279
« on: December 31, 2010, 10:53:13 pm »
There's a couple of reasons I can suggest as to why they're undocumented.
First and probably the main reason, instructions that weren't originally in the instruction set worked predictably due to the logic that the Z80 performed. The Z80 is quite a logical chip, so under most circumstances, logic would dictate a few things that weren't intended. Like being able to load the high and low bytes of the IX/IY registers independently.
Well, I guess I don't have a second reason.
There was a site that explained all this clearly, but it was on the Geocities thing that got shut down like last year or so. Wished I could've saved it.
280
« on: December 30, 2010, 08:33:32 pm »
Aw sad to hear you have like scrapped 5-6 pages of hard work but its good to hear that you are starting anew and that it will be much more efficient and better coded Good luck!
It's not like I totally scrapped the entire project. There's quite a bit of code that's being copied from the old project. The vast majority of the driving routines like the text and tilemappers are coming in without very many modifications. I'm just putting a new spin on things so I can get cross-page data access working. All of the data management routines that handle things like character stats will have to be rewritten but only because I'm choosing a different way of handling that sort of stuff. The way I had it before wasn't based off of anything that was really in the project so routines had to be made to deal with the inconsistencies. The rebuild aims to do away with all of that. While I'm at the rebuild, I'm also aiming to make the display a bit... cleaner. I'm redoing the menu system (this'll be the third time), so the project might hang a little on that, but nothing too bad. The flexibility in being able to access data from any page of the project eases quite a few woes. I'll be able to code in a menu system without worrying about available code space, since it can now be thrown all over the project. Pages can be added without worry, since SPASM will handle that mess. As far as restructuring the data goes... Crimson Editor's column edit mode is starting to look shiner and shiner. Didn't think it could ever get *that* shiny ---- As far as progress goes, I'm building this shiny printf macro that'll handle all my text needs, so I won't have to have a mishmash of ASM code and data to build menu elements and format them the way I want them to. It'll be handled as it should've always been. It should have been handled as data. Okay, so the menu system will slow a little because it's not buffered, but it should all be good. If it becomes a problem, I'll have it handled a slightly different way, probably by making good use of the new and improved interrupt scheme. Oooh, I had this thought that might accelerate loading of parts of the game. It involves running the pucrunch decompressor as a background service so by the time the information is needed, it'll either have been already loaded or close to being loaded. Still thinking about how it would work, tho.
281
« on: December 30, 2010, 04:52:45 pm »
Athena Packager / Installerhttp://www.omnimaga.org/index.php?action=downloads;sa=view;down=612The packager / installer pair Athena is here to make distributing really large BASIC games a bit easier. Features on-computer packaging abilities which compresses and consolidates the vast amount of subprograms, pictures, and whatnots into an archive. From the calculator side, send prgmATHENA, along with the files that the PC program generates and it will unpack these files to either your FlashROM or RAM, depending on how the file was generated. Once installation is under way, it's mostly automatic. Make it easy on the end user to install large games! Pick Athena for your packaging / installing needs! ( Please, for the love of all that is good, read ALL the readme files ) EDIT1: Fixed checksum error problem.
282
« on: December 29, 2010, 12:51:46 am »
I won't give up. Using SPASM is just such a good opportunity now that I know a bit more about it is something I can't pass up EDIT: If the project gets rewritten again, I'm not sure what I'd do with myself. It's a (near) perfect environment as it is.
283
« on: December 27, 2010, 08:06:29 pm »
$20
Haven't spent it yet.
284
« on: December 26, 2010, 12:53:49 am »
Oh, gawd. Now I remember what it was like to throw in a mass of code just to see *anything* going. I'm still working on the text input/output routines. I'll probably just throw in the LCD writing routine and have it go from there.
285
« on: December 25, 2010, 06:38:39 pm »
If you are able to, use of the HALT instruction put the processor in a low-power mode until the next interrupt occurs. I suppose that would be the easiest way to save power in a program.
Asm(76) in a loop ought to work, tho I'm not sure if that's actually what Axe's pause command does.
Pages: 1 ... 17 18 [19] 20 21 ... 52
|