Latenite - 1.0.6.1 Update [Monday 20/08/2007]

One suite to code them all. An complete IDE and assembler for all your z80 projects!

Moderators: benryves, kv83

Post Reply
User avatar
benryves
Maxcoderz Staff
Posts: 3089
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

The syntax highlighting text box was... odd. It actually re-enRTF's the entire source file on every keypress.
Even worse, it highlights character by character. :| Slow, slow, slow!
Finally, it locks the window handle at the start of the conversion - so the window is needlessly locked as you're typing.
I've fixed most of the above problems - it caches each line's RTF and does some faintly intelligent matching to work out if it needs to retranslate the text to RTF. It currently doesn't do any RTF translation (I need to hack his routines in - his system is truly bizarre and I can't work out how I'd do it myself) beyond making ".equ" blue, but it is significantly faster than what it was.
Hopefully I'll have a new binary by tomorrow/Wednesday that you can just drop in to replace the existing binary to fix the speed issue.
User avatar
Timendus
Calc King
Posts: 1729
Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:

Post by Timendus »

Hmm... TASM crashes horribly when I try to compile something with the new Latenite. Did you change anything in the invocation? I'll reboot my laptop, see if that helps...

Edit: Rebooted, TASM still crashes with the new version of Latenite. Downloaded the ZIP again, same result. The "old" version doesn't crash, guess I'll resume my coding with that :)
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
User avatar
benryves
Maxcoderz Staff
Posts: 3089
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

@Timendus: TASM is a buggy POS, so I'll try and see what the problem is. ;) Does the "Test All" project build at all? That should build. If it doesn't, try replacing the TASM.EXE with the version from the earlier beta... The only major difference is it sticks ../bin/ in front of the output filename so that the output binary appears in the ../bin/ folder (I was trying to neaten the whole "help, I have 120 files in my project folder!" thing).

New version (EXE update only): http://benryves.com/bin/LATENITE_BETA_0.0.1.1.zip

Major bugfixes;
-- memory access bug caused by icon cache trying to cache icons in an image list control that was only half-existant fixed (this caused a cryptic protected memory read/write access error rather than the expected missing object error).
-- behaviour when saving dirty files when closing the application works as it should.
-- invalid path/filename combinations on the new project form stripped properly.
-- creating new projects will now prompt on every file overwrite, and will also exit more gracefully.

Minor bugfixes;
-- streaky lines in the error/search result boxes should be culled with some window message interception.
-- "search in project" should no longer lock the CPU at 100% until finished ;)
-- syntax highlighting massively speed-optimised.
-- labels (xyz:) are now highlighted better, not just "any word with a colon in it"
-- source files now load at a low priority and in the background (you can't see them loading). This is only a problem with massive files (eg ti83plus.inc) which seem to never ever load. This needs fixing, I am open to suggestions ;)

New 'features';
-- the open dialog now lets you open multiple files at once (OK, not such a great feature).

IMPORTANT WARNING:
The syntax highlighting code was partially rewritten by me - most importantly, the bit that was rewritten was the bit that worked out which lines were dirty and the bit which performed the actual plain text -> RTF colour conversion. If it gets this conversion WRONG, that line will be invalid (and possibly the line after it if it mangles a newline character).
Those of you who have done plain text->HTML then HTML->plain text conversions (eg to escape for a database) will know that in some instances a slightly weird string can completely mess everything up. Nobody is perfect, and so I must beg that you perform backups of your code before you use this editor.

I have had the editor eat up two of my source files - one was my keyboard equates file (it didn't escape a { properly - think of it like HTML's <) which had a couple of lines missing. (The other was a more important file, but that was my pure stupidity in renaming a string, causing the save function to write a different string to disk on top of the actual file.

I just don't want the editor to go wonky and damage some of your work without you having saved. On a more cheerful note, I managed to open and save every single one of my (recent) Z80 ASM files and edit them without the contents being damaged. There might be one bizarre situation I am yet to cover.

About the theme bug fix:
I got around this with a real hack that should not work. It does on my PC. What I essentially did was to create a new class that inherited from System.Windows.Forms.ListViewBox (the dodgy control) and added this:

Code: Select all

        /// <summary>
        /// Hacky override to fix the garbage lines.
        /// </summary>
        protected override void WndProc(ref Message m) {
            if (m.Msg == 0xF) { // 0xF is WM_PAINT
                GridLines = false;
                GridLines = true;
            }
            base.WndProc(ref m);
        }
It intercepts the window message and checks to see what it is - if it's a WM_PAINT message (repaint the control) it switches gridlines off then on again before passing control to the base class. I can't see how this works... so if you still get them on your machine, give me a shout!
User avatar
kv83
Maxcoderz Staff
Posts: 2735
Joined: Wed 15 Dec, 2004 7:26 pm
Location: The Hague, Netherlands
Contact:

Post by kv83 »

I had some free time and made a GPP help file. Just copy this in notepad and save it as "GPP.xml" in the help file directory:

Code: Select all

<helpfile name="Grayscale Programming Package">
    <group name="General Functions">
        <item highlight="gsEnable" colour="routine" name="gsEnable" description="Enables the grayscale. call this routine in somewhere in the front of the part of your program where you want to use grayscale graphics. If you want to use grayscale grahpics in your whole program, then call this routine at the beginning, like in the template program.">
        </item>
        <item highlight="gsDisable" colour="routine" name="gsDisable" description="This routine disables the grayscale interrupt. Use this when you want to stop drawing grayscale grahpics in the next part of our program. You must call this routine before you quit the program and	return to the shell, because a lot of rom calls used by ti-os and need their own interrupt.">
            
            
        </item>
        
        
    </group>

    <group name="Graphics functions">
        <item highlight="gsClearBuffer" colour="routine" name="gsClearBuffer" description="This routine clears, dispite the name, the two indirect buffers	gbuf1 and gbuf2. Like in normal programs, this change can not on the screen until the buffers are copied using gsCopyBuffer, unless NODOUBLEBUFFER is selected.">
        </item>
        <item highlight="gsCopyBuffer" colour="routine" name="gsCopyBuffer" description="This copies the buffers to the screen. Actually, it copies the inactive buffers, gbuf1 and gbuf2, to the active buffers.">
        </item>
        <item highlight="gsSetFreq" colour="routine" name="gsSetFreq" description="This routine lets the user choose an interrupt frequency. The frequency can be 0, 2, 4 and 6. It depends on the calc what frequency is best, so you can better let the user choose it. Frequency six is the fastest, but gives less quality on my ti83+ calc, while it gives good quality on my ti83 blue-screen calc.">
        </item>
        <item highlight="gsGetk" colour="routine" name="gsGetk" description="This basically does the same as bcall(_getk) and bcall(_getcsc). I developed this because you cant use these romcalls while grayscale enabled. I highly recommend to use this routine because its much faster too. But the difference between gsGetk and _Getk is, that if you hold a key on _GetK it will wait a second before going in turbo-mode :P With gsGetk this is different (test it yourself)." />
        <item highlight="gsPutSprite" colour="routine" name="gsPutSprite" description="This puts a grayscale sprite, similar to ionPutSprite. It has exactly the same input as the ion putSprite routine. But the sprite data (where ix points to) 2x the size of the sprite (b).">
			<input name="Height of sprite" register="b" />
			<input name="Y" register="l" />
			<input name="X" register="a" />
			<input name="Sprite pointer" register="ix" />
        </item>
<item highlight="gsLargeSprite" colour="routine" name="gsLargeSprite" description="This puts a grayscale large sprite. This has the same input and basically the same effect as the ion LargeSprite routine, but grayscale of course.">
			<input name="Height of sprite" register="b" />
			<input name="Y" register="l" />
			<input name="X" register="a" />
			<input name="Width" register="c" />
			<input name="Sprite pointer" register="ix" />
        </item>
        <item highlight="gsAlignedSprite" colour="routine" name="gsAlignedSprite" description="This puts an aligned 8x8 sprite.">
			
			<input name="Y" register="l" />
			<input name="X" register="a" />
			<input name="Sprite pointer" register="ix" />
        </item>
        <item highlight="gsAlignedMaskedSprite" colour="routine" name="gsAlignedMaskedSprite" description="This puts an aligned masked sprite. The masked part must be dark gray. This routine is used to draw Link at the Zelda demo. It should have been used to draw all the objects in the game, like the monsters,items, projectiles etc.">
			<input name="spriteNumber + 64*(HORIZONTALFLIP) +128*(VERTICALFLIP) whtere the FLIPS are booleans of 0 or 1." register="a" />
			<input name="Y" register="l" />
			<input name="X" register="h" />
			<input name="Sprite table start pointer" register="de" />
        </item>
    </group>
</helpfile>
Edit: Changed section to group :)
Last edited by kv83 on Fri 25 Nov, 2005 9:30 am, edited 1 time in total.
Image
User avatar
Timendus
Calc King
Posts: 1729
Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:

Post by Timendus »

Nice... I copied the new executable over the old one and it compiles... Weird :) The "theme-bug" is also fixed by the way. So I guess we can call that a succesful upgrade :P

I think I like the syntax colours on my api website better though :) They're a bit less bright and don't hurt my eyes so much ;)
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
User avatar
kv83
Maxcoderz Staff
Posts: 2735
Joined: Wed 15 Dec, 2004 7:26 pm
Location: The Hague, Netherlands
Contact:

Post by kv83 »

You can change the colors afaik.

Ben, is it normal that when the source file is big, the IDE doesn't respond as fast as it should when editing the source?
Image
User avatar
Timendus
Calc King
Posts: 1729
Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:

Post by Timendus »

Timendus wrote:Nice... I copied the new executable over the old one and it compiles... Weird :)
That should read: "and the "Test All" project compiles"...
...Because when I start a new project TASM crashes again when I press compile...

In more detail:

Create new project for Ti-83 and Ti-83+
Projectname: Test
Press F5 > Crash

Open project "Test All"
Press F5 > And it compiles nicely...
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
User avatar
benryves
Maxcoderz Staff
Posts: 3089
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

kv83 wrote:You can change the colors afaik.

Ben, is it normal that when the source file is big, the IDE doesn't respond as fast as it should when editing the source?
I had thought that the new build fixed that... in any case, here is yet another build;

--> http://benryves.com/bin/LATENITE_BETA_0.0.1.2.zip <--

INSTALLATION INSTRUCTIONS:
-- Download the 0.0.1.0 beta, unzip to a new folder if you have not already done so.
-- Download the new 0.0.1.2 zip file.
-- Open the zip file, and copy LATENITE.EXE on top of the existing 0.0.1.0 or 0.0.1.1 file.
-- [Optional] Copy the 'Colours' folder into the 'Templates' folder (so \Template\Colours\*.xml).


Major bugfixes:
-- Faintly more intelligent loading of large files (highlights in blocks of 200 lines and updates every 2 seconds until fully loaded - basically, big files are super-slow to edit until they have fully loaded, but it's the best I can think of.
-- You can now look up items in the help files that are surrounded with (parentheses) - eg, bcall(_xyz) would fail to look up bcall() before.
-- Untitled files are now handled more gracefully.
-- You can now delete folders as well as files (how did I miss that one?!)
-- Updating colour settings now only marks dirty files as, well, dirty. Saved/clean files don't become dirtied by the colour update.
-- You can now edit large files (over 64KB, eg ti83plus.inc).

Minor bugfixes:
-- Further theme bug squished; sometimes the tab pages would not be properly redrawn when resized, leaving ugly artefacts. Solution? A new class called CleanTabPage inheriting from System.Windows.Forms.TabPage with an overriden method WndProc() checking for the WM_PAINT message, if so switching the background off then on again. Sounds familiar? :roll:

Minor changes/"features" - I don't count these as bugs, more as missing/incomplete features:
-- Removed Project menu (Project Properties now available through File->Project Properties).
-- Several icons fixed/edited/replaced. Looks a bit prettier in places now. :)
-- Changed a couple of form properties (making OK buttons respond to Enter and Cancel buttons respond to Escape).
-- Closing a source file jumps to the last opened source file, not source file #1.
-- You can now add subfolders from the IDE - just right-click a file/folder as normal, type in a name, and there you go!
-- VERY preliminary theme support.

@kv: Good to see you worked out how my help files worked without any documentation ;)

@Timendus: Maybe I messed something up with the default templates? I shall investigate. Make sure that your paths are short and that you don't have any non-ASCII characters in your filenames (TASM doesn't check the bounds of strings when dealing with filenames, and so if you give it a long filename it'll crash with a "Memory could not be 'read'"-type error - stupid thing!) The new build of Latenite supports colour themes, so if you could create an XML theme (the format should hopefully be easy to work out) that you like and post it here/send it to me, I'll use that as the default.
User avatar
Timendus
Calc King
Posts: 1729
Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:

Post by Timendus »

Okay, I'll play around with it :) After I wrote two chapters for an essay that is due tomorrow :(
And I think I'm going to add an XML generator for Latenite on the API website 8) Perhaps it would be a good idea to discuss the use of ;; a bit more first though. Not that it's really neccessary, but it would be nice if one source produced the same XML in both Latenite and the website...
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
gangsta
Sir Posts-A-Lot
Posts: 171
Joined: Wed 12 Oct, 2005 10:46 pm

Post by gangsta »

okay...i tried compiling this in Latenite (the newest one-0.0.1.2 i think) and it says it failed-4 errors... each says unrecognized argument ($28 ) [on line 17, 18, 20, and 21-the bcalls...]

Code: Select all

; ==========================================
; Required headers
; ==========================================
#include "../includes/headers.inc"

; ==========================================
; Description (ignored if not Ion/MirageOS)
; ==========================================
#ifndef TI83P
.db "String",0
#endif

; ==========================================
; Program entry point
; ==========================================
init_all:
	bcall(_clrLCDfull)
	bcall(_homeUp)
	ld hl,string
	bcall(_putS)
	bcall(_getKey)

	ret
string:
	.db "Hello World",0

.end
Last edited by gangsta on Thu 24 Nov, 2005 7:07 pm, edited 1 time in total.
User avatar
benryves
Maxcoderz Staff
Posts: 3089
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

gangsta wrote:okay...i tried compiling this in Latenite (the newest one-0.0.1.2 i think) and it says it failed-4 errors... each says unrecognized argument ( $28 ) [on line 17, 18, 20, and 21-the bcalls...]
Could you post the headers.inc file you're using? I fear I might have broken something with the default templates in the current release.
I also assume you are running one of the TI-** build files, NOT Compile.cmd.
gangsta
Sir Posts-A-Lot
Posts: 171
Joined: Wed 12 Oct, 2005 10:46 pm

Post by gangsta »

Code: Select all

; ==========================================
; Target file
; ==========================================

#include "../build/target.tgt"

; ==========================================
; General TI-83 Plus
; ==========================================

#define	bcall(label) rst $28 \ .dw label
#define bjump(label) call $50 \ .dw label
#define errhandon(label) ld hl,label \ call $59
#define errhandoff() call $5C

.org $9D93
.db $BB,$6D
.nolist
#define EQU .equ
#include "../includes/ti83plus.inc"
.list

; ==========================================
; TI-83 Plus Ion
; ==========================================

#ifdef TI83PI
	ret
	jr nc,init_all
#include "../includes/ion8X.inc"
#endif

; ==========================================
; TI-83 Plus MirageOS
; ==========================================

#ifdef TI83PM
	ret
.db 1
#include "../resources/icon.inc"
#include "../includes/mirage.inc"
#endif
using just ti-83 plus...

does it have sumthing 2 do w the spacing?
User avatar
benryves
Maxcoderz Staff
Posts: 3089
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

Argh, I know why that's buggered.
Wherever it says $XX (so rst $28, call $50, $call 59 and call $5C) replace them with XXh.
So:

Code: Select all

#define bcall(label) rst 28h \ .dw label 
#define bjump(label) call 50h \ .dw label 
#define errhandon(label) ld hl,label \ call 59h
#define errhandoff() call 5Ch
That should fix it. Sorry! I don't know if you need to replace it on the calls, but RST $XX never works, you must use RST XXh.
gangsta
Sir Posts-A-Lot
Posts: 171
Joined: Wed 12 Oct, 2005 10:46 pm

Post by gangsta »

where do I edit this file?
User avatar
benryves
Maxcoderz Staff
Posts: 3089
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

gangsta wrote:where do I edit this file?
Edit includes/headers.inc (the file you just posted). It should now read:

Code: Select all

; ========================================== 
; Target file 
; ========================================== 

#include "../build/target.tgt" 

; ========================================== 
; General TI-83 Plus 
; ========================================== 

#define bcall(label) rst 28h \ .dw label 
#define bjump(label) call 50h \ .dw label 
#define errhandon(label) ld hl,label \ call 59h
#define errhandoff() call 5Ch

.org $9D93 
.db $BB,$6D 
.nolist 
#define EQU .equ 
#include "../includes/ti83plus.inc" 
.list 

; ========================================== 
; TI-83 Plus Ion 
; ========================================== 

#ifdef TI83PI 
   ret 
   jr nc,init_all 
#include "../includes/ion8X.inc" 
#endif 

; ========================================== 
; TI-83 Plus MirageOS 
; ========================================== 

#ifdef TI83PM 
   ret 
.db 1 
#include "../resources/icon.inc" 
#include "../includes/mirage.inc" 
#endif
Post Reply