Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
19 May, 2013, 13:58:49 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: [1] 2 3 ... 5   Go Down
  Print  
Author Topic: Fullrene -  (Read 3344 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
thepenguin77
z80 Assembly Master
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: Yesterday at 21:48:33
Date Registered: 14 December, 2009, 04:21:52
Location: Purdue
Posts: 1483


Topic starter
Total Post Ratings: +778

View Profile
« on: 17 October, 2011, 22:16:50 »
+14

Current Version

First of all, I wrote this axiom because I've heard that CrabCake doesn't really like the newer versions of Axe. So if it still works, then I am sorry hot_dog. I also wanted to write this though so I can finally use port (25h) which I spent a long time trying to discover.

The goal of this axiom is exactly what the goal of CrabCake was, to allow you to use all of the memory in the calculator for your program to run. The way I am doing it is completely through ports, which means that there shouldn't be any side effects at all. In fact, you don't technically have to undo these changes, though you probably should.

Since runer told me that we don't want to remake a remake, I'm not even going to post the Axiom yet, instead, I'm going to post the code so that if anyone sees any optimizations, they can tell me. One important thing that I am taking into consideration is that I made a crazy small flash unlock routine that only works on non-83+BE calculators, so I have two versions of the axiom.

Also, I picked Fcdf( as my token, if you don't like it or have a better one, I'm all ears.

Fcdf()r   -   Currently 76 bytes (non-83+BE version)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
rVersion:

scf
REP_NEXT
call unlockflash
REP_NEXT
call rVersionEnd
or a

unlockFlash:
di
in a, (06)
push af
REP_NEXT
ld (saveSP), sp
ld sp, $82AB+$4000

ld a, 1
out (05), a
rrca
ld i, a ;$80
dec a
out (06), a ;$7F

in a, (02)
bit 5, a

ld a, $C3 ;jp
REP_NEXT
ld hl, returnPointz

_84Plus:
ld ($80C8), a
ld ($80C9), hl
jp nz, $4528


_83PlusSE:
ld ($80FE), a
ld ($80FF), hl
jp $4276



returnPointz:
saveSP equ $+1
ld sp, 0000
xor a
out (05), a
pop af
out (06), a

ld a, $10
jr nc, wasUndoing
xor a
wasUndoing:
out ($25), a
bcall(_flashWriteDisable)
ret

rVersionEnd:

Fcdf()    -    124 bytes (all calculator models)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
allVersion:
scf
REP_NEXT
call doIt
REP_NEXT
call allVersionEnd
or a

doIt:
        in a, (6)
        push af
push af
REP_NEXT
call unlockFlashz

in a, (02)
rlca
jr c, regularUnlock

ex de, hl ;HL is too close to SP
ld (hl), b ;b is zero
pop af
ld a, $1F
jr c, notLocking
ld (hl), a ;should be $0F
notLocking:
dec hl
out (06), a
out (05), a ;should be 7
call $46D8 ;hack, works on 1.00 and 1.01

push af

regularUnlock:
pop af
ld a, $10
jr nc, wasUndoingz
xor a
wasUndoingz:
out ($25), a
finishUp:
pop af
out (06), a
bcall(_flashWriteDisable)
ret



UnlockFlashz:
;Unlocks Flash protection.
;Destroys: pagedCount                        
;          pagedGetPtr
;          arcInfo
;          iMathPtr5
;          pagedBuf
;          ramCode

di
REP_NEXT
        ld      hl, returnPoint+$8214-$81E3
        ld      de, $8214
        ld      a, e
        ld      (arcInfo), a            ;should be 08-15
        ld      (pagedCount), a         ;just has to be over 2
        ld      bc, $8214-$8167
        lddr
        ld      (iMathPtr5), de         ;must be 8167
        ld      iy, 0056h-25h           ;permanent flags

        add     a, e
        ld      (pagedBuf), a           ;needs to be large, but under 80
REP_NEXT
        call    translatePage
        ld      hl, ($5092)
        ld      a, ($5094)
REP_NEXT
        call    translatePage
        ld      a, $CC
        cpir
        dec     hl
        jp      (hl)

returnPoint:
        ld      hl, $0018
        ld      (hl), $C3               ;dummy write
flashWait:
        ld      iy, flags
        djnz    flashWait               ;wait for write to finish
        add     hl, sp
        ld      sp, hl

translatePage:
        bcall(_NZIf83Plus)
        jr      z, not83
        and     1Fh
not83:
        out     (06), a
        ret


allVersionEnd:

I had to mess with brandonW's routine in this one a bit due to the way axe handles addresses.

So, any optimizations?

Edit:
    Cut a byte off the normal routine. Chopped off 11 more. Another 4 byte the dust. Fixed a glitch due to the 4 byte cut. 3 More. 1. 11 again

Edit2:
    Before new system - 162. After - 123
« Last Edit: 26 March, 2012, 00:29:57 by thepenguin77 » Logged

zStart v1.3.011 4-29-2013  zStart fully works on 83+BE's (except custom font)
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112
Freyaday
The One And Only Serial Time Killing Catboy-Loli-Ballerino
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: Today at 07:56:49
Date Registered: 24 February, 2011, 17:10:56
Location: ¿¿¿
Posts: 1887


Total Post Ratings: +108

View Profile WWW
« Reply #1 on: 18 October, 2011, 00:59:52 »
0

Why is it smaller on the 84+?
Logged

In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


Beware the Bitulator! ,.,./`My Artwork!
Deep Thought
So much to do, so much time, so little motivation
Administrator
LV13 Extreme Addict (Next: 9001)
*
Offline Offline

Gender: Male
Last Login: Today at 03:39:24
Date Registered: 19 May, 2009, 08:00:00
Location: The Universe
Posts: 7813


Total Post Ratings: +706

View Profile WWW
« Reply #2 on: 18 October, 2011, 01:00:55 »
0

You got +5 before anybody replied shocked That sounds brilliant, as in really, really useful.
Logged




thepenguin77
z80 Assembly Master
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: Yesterday at 21:48:33
Date Registered: 14 December, 2009, 04:21:52
Location: Purdue
Posts: 1483


Topic starter
Total Post Ratings: +778

View Profile
« Reply #3 on: 18 October, 2011, 01:08:29 »
0

Why is it smaller on the 84+?

The 83+BE boot code was built rock solid and as of now, ~15 years after it was released, no flash unlock exists. This means that you have to trick the OS into unlocking flash, which due to the many OS's, inherently takes up more space.

The 84+ unlock is really simple and also, in the 84+ code, I don't have to worry about unlocking the 83+BE (because it is drastically different).
Logged

zStart v1.3.011 4-29-2013  zStart fully works on 83+BE's (except custom font)
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112
Freyaday
The One And Only Serial Time Killing Catboy-Loli-Ballerino
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: Today at 07:56:49
Date Registered: 24 February, 2011, 17:10:56
Location: ¿¿¿
Posts: 1887


Total Post Ratings: +108

View Profile WWW
« Reply #4 on: 18 October, 2011, 01:09:46 »
0

The 84+ unlock applies to the SE too, right?
Logged

In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


Beware the Bitulator! ,.,./`My Artwork!
thepenguin77
z80 Assembly Master
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: Yesterday at 21:48:33
Date Registered: 14 December, 2009, 04:21:52
Location: Purdue
Posts: 1483


Topic starter
Total Post Ratings: +778

View Profile
« Reply #5 on: 18 October, 2011, 01:17:39 »
0

Yes, it covers 83+SE, 84+BE, and 84+SE. Those are all basically the same calculator.

It's only when you introduce the 83+BE that things get messy.
Logged

zStart v1.3.011 4-29-2013  zStart fully works on 83+BE's (except custom font)
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112
boot2490
LV7 Elite (Next: 700)
*******
Offline Offline

Gender: Male
Last Login: 28 April, 2013, 05:54:45
Date Registered: 27 February, 2011, 07:39:51
Location: Pittsburgh, PA
Posts: 605


Total Post Ratings: +18

View Profile WWW
« Reply #6 on: 18 October, 2011, 01:22:14 »
0

Off topic but about axioms:
Could you make an axiom that could play two or three notes at the same time?
Logged

I'm not worried about SOPA creating censorship, that will not stand for long. I'm worried that they'll succeed in stopping piracy!

Spoiler for Signature, updated march 23, 11:28 PM EST:















An useful tool!

PM me if you need some help. I am glad to be of assistance and part of the TI Communnity.
Yeong
Eternally Young Scarlet Moon
LV12 Extreme Poster (Next: 5000)
************
Offline Offline

Gender: Male
Last Login: 06 May, 2013, 16:01:45
Date Registered: 15 October, 2010, 04:29:49
Location: Arden, NC
Posts: 3694


Total Post Ratings: +260

View Profile
« Reply #7 on: 18 October, 2011, 01:23:05 »
0

I think that was suggested a lot already O.o
For now, you'll have to live with Calcmod XP
Logged

Project Redemption....

My project progresses:HERE
My Pastebin stuffs:HERE
Check your rate: HERE
My Animations: HERE
Spoiler for Images :D:

ノ◕ヮ◕)ノ:・゚ PENGUIN WAVE!!:„ø¤º°¨ ¨°º¤KEEP THE PENGUIN GOING ¸„ø¤º°¨ ¨°º¤øº LETS GO PENGUIN !¤¤º°¨¨°º¤øº¤ø„¸¸ø¤º°¨„ ø¤º°¨¨°º
thepenguin77
z80 Assembly Master
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: Yesterday at 21:48:33
Date Registered: 14 December, 2009, 04:21:52
Location: Purdue
Posts: 1483


Topic starter
Total Post Ratings: +778

View Profile
« Reply #8 on: 18 October, 2011, 23:50:16 »
+1

Most Recent Version Here

For those who haven't figured out where the name came from, I knew I had to use the word full, as in "full Ram", but I had to make it cool. So then I decided on Fullrene, those cool carbon creations, only to find out that it's spelled Fullerene.

I believe that this axiom is ready to go. It appears to work on every emulator I've tested it on, so it should be good.

A few notes on usage:
  • Syntax: Fcdf() or Fcdf()r (preferably at the start of the program)
  • The version without r will work on all calculators and is 163 bytes, period.
  • The version with the r won't work on the 83+BE, but is only 78 bytes.
  • This axiom sets up a wrapper around your entire program so that it can disable this feature when you quit. This means that you should either try to end your program by using Return or running off the end of the program. (Returnr still works, but it's bad practice to leave the calculator in this unlocked state.)
  • This routine disables interrupts


You should already know how Axioms work, but if you don't, send this appvar to your calculator and put it in flash. To include the axiom in your Axe program, add the line:

1
2
3
4
:AsmComp(FULLRENE)
   or
:#Axiom(FULLRENE)      (Axe hooks)

Then, include this line preferably at the top of your program.

1
2
3
4
:Fcdf()        (all calculators)
   or
:Fcdf()r        (non-83+BE calculators)

If you can't find Fcdf(, it's in [2nd] [Vars] [9 or 0] Wink

Also, if today is your lucky day, here is the code to optimize: (I'd be happy with even a single byte)
Spoiler for Hidden:
R Version

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64

scf
REP_NEXT
call unlockflash
REP_NEXT
call rVersionEnd
or a

unlockFlash:
in a, (06)
push af
REP_NEXT
ld (saveSP), sp
ld sp, $82A9+$4000

ld a, 1
out (05), a
rrca
ld i, a ;$80
dec a
out (06), a ;$7F

in a, (02)
bit 5, a

ld a, $C3 ;jp
REP_NEXT
ld hl, returnPointz

jr z, _83PlusSE


_84Plus:
ld ($80C8), a
ld ($80C9), hl
jp $4529


_83PlusSE:
push af ;sp-2
ld ($80FE), a
ld ($80FF), hl
jp $4276



returnPointz:
saveSP equ $+1
ld sp, 0000
xor a
out (05), a
pop af
out (06), a

ld a, $10
jr nc, wasUndoing
xor a
wasUndoing:
out ($25), a
bcall(_flashWriteDisable)
ret

rVersionEnd:
Non R Version

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
scf
REP_NEXT
call doIt
REP_NEXT
call allVersionEnd
or a

doIt:
        in a,(6)
        push af
push af
;UnlockFlash:
;Unlocks Flash protection.
;Destroys: appBackUpScreen
;          pagedCount
;          pagedGetPtr
;          arcInfo
;          iMathPtr5
;          pagedBuf
;          ramCode

        ld a,7Bh
        call translatePage
        out (6),a

ld hl, ($5092)
ld a, ($5094)

        call translatePage
        out (6),a
        ld a,0CCh
ld b, a
        cpir
        ld e,(hl)
        inc hl
        ld d,(hl)
ld (iMathPtr5), sp
        push de
;       pop ix

ld a, $C3
ld ($9898), a
REP_NEXT
ld hl, returnPoint
ld ($9899), hl

        ld hl,pagedBuf
        ld (hl),98h
        ld de,pagedBuf+1
        ld bc,49 ;so lucky VV
push bc
        ldir
        ld hl,(iMathPtr5)
push hl
        ld de,9A00h
        ld bc,50

ld a, c

        ldir  
        pop de
        ld hl,-14
        add hl,de
        ld (iMathPtr5),hl
pop iy ;that was convenient
;       ld iy,0056h-25h
;       ld a,50 ;covered
        ld (pagedCount),a
        ld a,8
        ld (arcInfo),a
;       jp (ix)
translatePage:
       bcall(_NZIf83Plus)
        ret z
        and 1Fh
        ret
returnPoint:
        ld iy,flags
ld hl,(iMathPtr5)
        ld de,14
        add hl,de
        ld sp,hl
        ex de,hl
        ld hl,9A00h
        ld bc,48
        ldir

in a, (02)
rlca
jr c, regularUnlock

ld (hl), b ;b is zero
pop af
ld a, $1F
jr c, notLocking
ld (hl), a ;should be $0F
notLocking:
dec hl
out (06), a
out (05), a ;should be 7
call $46D8 ;hack, works on 1.00 and 1.01

push af

regularUnlock:
pop af
ld a, $10
jr nc, wasUndoingz
xor a
wasUndoingz:
out ($25), a
finishUp:
pop af
out (06), a
bcall(_flashWriteDisable)
ret

If you're in Chrome, it's probably best to just quote this post.

* fullrene 1.8xv (0.33 KB - downloaded 14 times.)
« Last Edit: 07 November, 2011, 04:21:11 by thepenguin77 » Logged

zStart v1.3.011 4-29-2013  zStart fully works on 83+BE's (except custom font)
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112
Deep Thought
So much to do, so much time, so little motivation
Administrator
LV13 Extreme Addict (Next: 9001)
*
Offline Offline

Gender: Male
Last Login: Today at 03:39:24
Date Registered: 19 May, 2009, 08:00:00
Location: The Universe
Posts: 7813


Total Post Ratings: +706

View Profile WWW
« Reply #9 on: 19 October, 2011, 02:25:48 »
0

I was just about to post here asking you if you left the ER out on purpose. It's a cool name anyway though Cheesy
Logged




boot2490
LV7 Elite (Next: 700)
*******
Offline Offline

Gender: Male
Last Login: 28 April, 2013, 05:54:45
Date Registered: 27 February, 2011, 07:39:51
Location: Pittsburgh, PA
Posts: 605


Total Post Ratings: +18

View Profile WWW
« Reply #10 on: 20 October, 2011, 17:47:27 »
0

What does it do...?
Logged

I'm not worried about SOPA creating censorship, that will not stand for long. I'm worried that they'll succeed in stopping piracy!

Spoiler for Signature, updated march 23, 11:28 PM EST:















An useful tool!

PM me if you need some help. I am glad to be of assistance and part of the TI Communnity.
Yeong
Eternally Young Scarlet Moon
LV12 Extreme Poster (Next: 5000)
************
Offline Offline

Gender: Male
Last Login: 06 May, 2013, 16:01:45
Date Registered: 15 October, 2010, 04:29:49
Location: Arden, NC
Posts: 3694


Total Post Ratings: +260

View Profile
« Reply #11 on: 20 October, 2011, 18:02:18 »
0

I think it's just like crabcake: get the limit off of asm compiling
Logged

Project Redemption....

My project progresses:HERE
My Pastebin stuffs:HERE
Check your rate: HERE
My Animations: HERE
Spoiler for Images :D:

ノ◕ヮ◕)ノ:・゚ PENGUIN WAVE!!:„ø¤º°¨ ¨°º¤KEEP THE PENGUIN GOING ¸„ø¤º°¨ ¨°º¤øº LETS GO PENGUIN !¤¤º°¨¨°º¤øº¤ø„¸¸ø¤º°¨„ ø¤º°¨¨°º
C0deH4cker
LV5 Advanced (Next: 300)
*****
Offline Offline

Gender: Male
Last Login: 19 December, 2012, 22:22:42
Date Registered: 18 October, 2011, 23:19:08
Location: $9D95
Posts: 258


Total Post Ratings: +10

View Profile WWW
« Reply #12 on: 20 October, 2011, 20:41:19 »
+3

if youre using chrome and know a little html, you can just right-click on the code box, click "Inspect element", double click where it says "height: 20px; " and change the 20 to something more like 260. I dont know why it is set to be only 20 pixels high; it just is.

Edit: or, you could just remove the style="" attribute altogether. that's how normal code boxes are.
« Last Edit: 20 October, 2011, 20:42:18 by C0deH4cker » Logged

thepenguin77
z80 Assembly Master
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: Yesterday at 21:48:33
Date Registered: 14 December, 2009, 04:21:52
Location: Purdue
Posts: 1483


Topic starter
Total Post Ratings: +778

View Profile
« Reply #13 on: 20 October, 2011, 20:52:15 »
0

That is by far the greatest thing I have learned all week. I didn't realize that you could edit webpages on the fly. I'll have fun with this Grin

(Yes, I realize it's only on my computer)
Logged

zStart v1.3.011 4-29-2013  zStart fully works on 83+BE's (except custom font)
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112
ztrumpet
The Rarely Active One
LV13 Extreme Addict (Next: 9001)
*************
Offline Offline

Gender: Male
Last Login: 23 April, 2013, 16:09:52
Date Registered: 08 November, 2009, 21:10:12
Location: Michigan
Posts: 5687


Total Post Ratings: +360

View Profile
« Reply #14 on: 20 October, 2011, 21:13:46 »
0

if youre using chrome and know a little html, you can just right-click on the code box, click "Inspect element", double click where it says "height: 20px; " and change the 20 to something more like 260. I dont know why it is set to be only 20 pixels high; it just is.

Edit: or, you could just remove the style="" attribute altogether. that's how normal code boxes are.
Thank for the tip!  It's pretty awesome. Cheesy
Logged

Pages: [1] 2 3 ... 5   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.378 seconds with 30 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.