Author |
Message |
|
NETWizz Byte by bit
Bandwidth Hog

Joined: 20 May 2003 Posts: 2369
|
Posted: 05 Jan 2004 05:39:46 pm Post subject: |
|
|
We need a list of every library fuction, and exactly what it does.
Example:
directin
Is a direct input routine.
inputs:
a = key group
outputs:
z=No key pressed
a=key code
I went to the developers section of http://detachedsolutions.com and pulled up a list, but I do not think it is complete.
What we need is a list of every possible MirageOS routine and exactly what it does, its inputs, its out puts, destroyed registers et cetera...
Why do we need them you may ask. Simple, since the MirageOS souce is unavalable, our only chance to make NimbusOS run MirageOS programs is to write identical MirageOS libraries! This is why we need to know exactly what we need, so we can code it.
For example, directin would be very easy to code.
clone_directin:
push bc
ld b,a
ld a,0FFh
out (1),a
ld a,b
out (1),a
in a,(1)
pop bc
ret
You see, I do not know if it is okay to destroy register b, so I peserved it because if it was destroyed, preserving it won't hurt, but if not, it would be an error.
Now, somewhere within nimbus, we would have MirageOS vectors.
directin:
jp clone_directin
...
Why would we have this you may ask. Simple, so we can put clone_directin anywhere we want within NimbusOS and programs will still be able to find it without being recompiled.
Obviously, we will also need to know where MirageOS puts directin, so we can hae our table in the correct place.
Pleae make a list of all the MirageOS library routines. |
|
Back to top |
|
|
NETWizz Byte by bit
Bandwidth Hog

Joined: 20 May 2003 Posts: 2369
|
Posted: 05 Jan 2004 06:04:22 pm Post subject: |
|
|
Okay, here they all are. They were in mirage.inc
.nolist
#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
;=================================;
;======== Ion Subroutines ========;
;=================================;
iversion = $4083
irandom = $4086
isprite = $4089
ilsprite = $408C
igetpix = $408F
ifastcopy = $4092
idetect = $4095
idecomp = $4098
;=================================;
;====== MirageOS Subroutines =====;
;=================================;
directin = $409B
sendbytetios = $409E
getbytetios = $40A1
version = $40A4
setvputs = $40A7
setpixel = $40AA
fastcopys = $40AD
delayb = $40B0
multhe = $40B3
multhl = $40B6
quittoshell = $40B9
fastline = $40BC
pixelonhl = $40BF
pixeloff = $40C2
pixelxor = $40C5
pixeltest = $40C8
pixeloffhl = $40CB
pixelxorhl = $40DE
pixeltesthl = $40D1
fastlineb = $40D4
fastlinew = $40D7
fastlinex = $40DA
pointonc = $40DD
pointoffc = $40E0
pointxorc = $40E3
centertext = $40E6
cphlbc = $40E9
putsprite8 = $40EC
fastcopyb = $40EF
vputsc = $40F2
scrolld7 = $40F5
vnewline = $40F8
rand127 = $40FB
disprle = $40FE
cphlde = $4101
screentopic = $4104
fastlined = $4107
disprlel = $410A
getnextgoodprog = $410D
getprevgoodprog = $4110
getnext = $4113
getprev = $4116
compstrs = $4119
nextstr = $411C
getinfo = $411F
fastrectangle = $4122
gettext = $4125
gettextv = $4128
FastRectangle_Save = $412B
vputa = $412E
runprog = $4131
isgoodprog = $4134
existfold = $4137
delprog = $413A
filledrectangle = $413D
nextfolder = $4140
delfolder = $4143
moveall = $4149
curfoldname = $4149
curfoldnamea = $414C
createfolder = $414F
compstrsn = $4152
folder_menu_start = $4155
options_screen = $4158
put_folder_name_top = $415B
general_key_routine = $415E
find_num_good_progs = $4161
put_scrollbar = $4164
invert_lines = $4167
invert_1_line = $416A
right_align_value = $416D
put_mirageos_header = $4170
put_size_graphic = $4173
sendprog = $4176
hideprog = $4179
arcprog = $417C
filledrectangle_save = $417F
getbytetiosw = $4182
vatswap = $4185
renameprog = $4188
renamefolder = $418B
sysmain = $418E
setupint = $4191
move_gui_prog = $4194
largespritehl = $4197
Update_Scrollbar = $419A
Initial_Scrollbar = $419D
sortallfolds = $41A0
dofoldsort = $41A3
getfoldsort = $41A6
setfoldsort = $41A9
Increase_Cur_Element = $41AC
Decrease_Cur_Element = $41AF
Increase_Max_Elements = $41B2
Decrease_Max_Elements = $41B5
Add_A_To_Cur_Element = $41B8
Sub_A_From_Cur_Element = $41BB
Add_A_To_Max_Elements = $41BE
Sub_A_From_Max_Elements = $41C1
Skip_Forward_B_From_Top = $41C4
Get_Curgoodprog_Ptr = $41C7
getchecksum = $41CA
freearc = $41CD
swapram = $41D0
hideall = $41D3
;=================================;
;====== MirageOS Ram Equates =====;
;=================================;
mlinebitmap = $FFFF-399
timer1 = $8a3a
timer1max = $8a3b
timer2 = $8a3c
timer2max = $8a3d
timer3 = $8a3e
custintaddr = $966F
saferam1 = SavesScreen
saferam2 = AppBackUpScreen
saferam3 = TempSwapArea
mirflags = $21
rightalign = $07
lcdinstport = $10
lcddataport = $11
numscrollpixels = CmdShadow+104
scrollbarcoords = CmdShadow+105
old_element = CmdShadow+107
cur_element = CmdShadow+109
old_max_elem = CmdShadow+111
max_elements = CmdShadow+113
; =================================
; ===== Various Other Equates =====
; =================================
gbuf = PlotsScreen
LargeSprite = ilsprite
SmallSprite = isprite
FastCopy = ifastcopy |
|
Back to top |
|
|
NETWizz Byte by bit
Bandwidth Hog

Joined: 20 May 2003 Posts: 2369
|
Posted: 05 Jan 2004 06:07:10 pm Post subject: |
|
|
Let us make a collection of Mirage libs. On a post.
directin
Code: directin:
push bc
ld b,a
ld a,0FFh
out (1),a
ld a,b
out (1),a
in a,(1)
pop bc
ret
|
|
Back to top |
|
|
[internet name]
Newbie

Joined: 01 Apr 2004 Posts: 41
|
Posted: 15 Jun 2004 09:20:32 pm Post subject: |
|
|
If you don't want to code the whole thing, why not dissasemble the mirageos program and find the libraries?
Also, I would like to help with the libraries. As you might know, I am working on my own shell that works like a computer. I would like the libs too. |
|
Back to top |
|
|
MissingIntellect
Member

Joined: 01 Jun 2004 Posts: 227
|
Posted: 15 Jun 2004 11:07:53 pm Post subject: |
|
|
I'd get in contact with some of the Detached guys, I wouldn't be surprised if they gave you the source to the libraries if you asked. |
|
Back to top |
|
|
Dwedit
Member

Joined: 04 Jan 2004 Posts: 138
|
Posted: 15 Jun 2004 11:56:29 pm Post subject: |
|
|
I've already disassembled most of them, if you want them let me know. |
|
Back to top |
|
|
JeePee
Member

Joined: 18 Jan 2004 Posts: 181
|
Posted: 16 Jun 2004 09:17:29 am Post subject: |
|
|
Can you pm them to me, Dwedit? |
|
Back to top |
|
|
Toksyuryel Crimson Dragon Software
Elite

Joined: 14 Jun 2003 Posts: 880
|
Posted: 16 Jun 2004 10:02:49 am Post subject: |
|
|
MissingIntellect wrote: I'd get in contact with some of the Detached guys, I wouldn't be surprised if they gave you the source to the libraries if you asked.
Don't you think he tried that already? JBirk is not and idiot. There's obviously something they don't want him to know, otherwise we wouldn't be having this disscussion.
[internet name]: Great sig 
Last edited by Guest on 16 Jun 2004 10:04:38 am; edited 1 time in total |
|
Back to top |
|
|
Tyler
Advanced Member

Joined: 29 May 2003 Posts: 352
|
Posted: 17 Jun 2004 09:22:15 am Post subject: |
|
|
I can't get my disassembler to work correctly, which one are you guys using? I could be of help! |
|
Back to top |
|
|
MissingIntellect
Member

Joined: 01 Jun 2004 Posts: 227
|
Posted: 17 Jun 2004 01:13:37 pm Post subject: |
|
|
JACstudios_ceo wrote: MissingIntellect wrote: I'd get in contact with some of the Detached guys, I wouldn't be surprised if they gave you the source to the libraries if you asked.
Don't you think he tried that already? JBirk is not and idiot. There's obviously something they don't want him to know, otherwise we wouldn't be having this disscussion.
Actually, I'm not quite the idiot you think I am. If you weren't so quick to judge...
Most people would NOT think of asking for the source. I know some of the Detacheds guys, and like I said, if you explained that you want the source to the libraries for compatibility, I'd be surprised if they turned you down. There's a difference between code from a disassembler and the original source. |
|
Back to top |
|
|
Arcane Wizard `semi-hippie`
Super Elite (Last Title)

Joined: 02 Jun 2003 Posts: 8993
|
Posted: 17 Jun 2004 01:30:13 pm Post subject: |
|
|
Quote: Actually, I'm not quite the idiot you think I am. Are you sure? Because he never even implied you where an idiot yet you're acting like he has. |
|
Back to top |
|
|
Toksyuryel Crimson Dragon Software
Elite

Joined: 14 Jun 2003 Posts: 880
|
Posted: 18 Jun 2004 07:44:07 pm Post subject: |
|
|
Asking for closed-source code without even saying why? Who does that? Most people do think to ask for the source first, why? Because it's the easiest way to get it. You think people want to disassemble MirageOS? You know how much complicated code that is?
Arcane: you are correct. |
|
Back to top |
|
|
MissingIntellect
Member

Joined: 01 Jun 2004 Posts: 227
|
Posted: 18 Jun 2004 07:59:36 pm Post subject: |
|
|
JACstudios_ceo wrote: Asking for closed-source code without even saying why? Who does that? Most people do think to ask for the source first, why? Because it's the easiest way to get it. You think people want to disassemble MirageOS? You know how much complicated code that is?
Arcane: you are correct.
Well, no duh, genius, of course, that's the whole reason I brought it up. And I never said no reason:
Quote: I know some of the Detacheds guys, and like I said, if you explained that you want the source to the libraries for compatibility, I'd be surprised if they turned you down.
Yeesh.  |
|
Back to top |
|
|
DarkerLine ceci n'est pas une |
Super Elite (Last Title)

Joined: 04 Nov 2003 Posts: 8328
|
Posted: 19 Jun 2004 04:24:56 pm Post subject: |
|
|
I think what he tried to say is that JBirk did ask for the source, and when he did he probably explained what he wanted it for.
It wouldn't hurt to ask one more time though. Since you know some of the Detacheds guys, how about you ask?
Also, why would someone not think about asking for a source? that's the easiest thing to do right?? |
|
Back to top |
|
|
MissingIntellect
Member

Joined: 01 Jun 2004 Posts: 227
|
Posted: 19 Jun 2004 11:22:22 pm Post subject: |
|
|
Sir Robin wrote: I think what he tried to say is that JBirk did ask for the source, and when he did he probably explained what he wanted it for.
It wouldn't hurt to ask one more time though. Since you know some of the Detacheds guys, how about you ask?
Also, why would someone not think about asking for a source? that's the easiest thing to do right??
Well, I use the term "know" loosley. I think I "know" "them" well enough that they'd be OK with it. I mean, why not just give you the source (after all it's just the libraries), they're gonna be in the shell either way, whether from the original source or a disassembler.
I "know" Michael Vincent and Dan Englender from hanging out on #tcpa on EFNet. Michael wasn't at all involved in MirageOS (He's not one of the original members from the TCPA). Dan whoever, did a lot of the coding for MirageOS. I will try to see if I can contact with him. Can't make any guarentees, though.  |
|
Back to top |
|
|
optimize
Advanced Newbie

Joined: 03 Aug 2004 Posts: 99
|
Posted: 08 Aug 2004 08:51:04 pm Post subject: |
|
|
Any update on how the it's going?
I'd too dumb to know how to use the Flash Debugger or anything like it |
|
Back to top |
|
|
Darth Android DragonOS Dev Team
Bandwidth Hog

Joined: 31 May 2003 Posts: 2104
|
Posted: 14 Aug 2004 08:05:52 pm Post subject: |
|
|
give me a few days, ill get you a full disassemble in a .txt |
|
Back to top |
|
|
DarkerLine ceci n'est pas une |
Super Elite (Last Title)

Joined: 04 Nov 2003 Posts: 8328
|
Posted: 15 Aug 2004 03:27:47 pm Post subject: |
|
|
You could also go into calcsys, go to the part of the mirage source code with the jump table (the addresses of the routines are in mirage.inc) and read the source there. It's kind of hard to understand through calcsys though. |
|
Back to top |
|
|
Darth Android DragonOS Dev Team
Bandwidth Hog

Joined: 31 May 2003 Posts: 2104
|
Posted: 15 Aug 2004 05:19:50 pm Post subject: |
|
|
i can get a full disassembly though.
example:
Code: ;BOOTCODE START
4000:3E77:LD A,77h
4002:D304:OUT (04h),A
4004:3E7F:LD A,7Fh
4006:D306:OUT (06h),A
4008:3E03:LD A,03h
400A:D30E:OUT (0Eh),A
400C:C3D580:JP 80D5h
400F:312E30:LD SP,302Eh
4012:3000:JR NC,4014h
4014:FF:RST 38H
4015:FF:RST 38H
4016:FF:RST 38H
4017:FF:RST 38H
4018:AA:XOR D
4019:64:LD H,H
401A:7F:LD A,A
401B:FA677F:JP M,7F67h
401E:CB6B7F:BIT 5,D
4020:7F:LD A,A
4021:CA4B7F:JP Z,7F4Bh
4024:5E:LD E,(HL)
4025:4B:LD C,E
4026:7F:LD A,A
4027:87:ADD A,A
4028:4C:LD C,H
4029:7F:LD A,A
402A:D5:PUSH DE
402B:4C:LD C,H
402C:7F:LD A,A
402D:76:HALT
like that.
Address:opcode:disassembled instruction
not sure if my friend gave me a copy of the disassembler, will check tho. else we'll have to wait until he gets online.
Last edited by Guest on 15 Aug 2004 05:24:07 pm; edited 1 time in total |
|
Back to top |
|
|
DarkerLine ceci n'est pas une |
Super Elite (Last Title)

Joined: 04 Nov 2003 Posts: 8328
|
Posted: 15 Aug 2004 05:44:11 pm Post subject: |
|
|
That's pretty much what calcsys does. |
|
Back to top |
|
|
|