Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
FrankzeeTank wrote:
Sorry that I couldn’t be of much help. As you can see, I’m new at all of “this”. But I am looking forward to seeing how this turns out! PS: Can you help me in making a file system for my emulator project, as you have already done it?


What I did is not really a filesystem, more like an organizer. It only has one level, and does not have folders. The 'folders' are more like boxes or pages.

Code:
[2018-10-21 19:49:19] <MateoC> ld hl,-<ASM CODE SIZE + 18> \ add hl,sp \ ld sp,hl \ push hl \ ex de,hl \ ld hl,<ASM RETURN CODE PTR> \ ld bc,<ASM CODE SIZE> \ ldir
Still trying to get BOSshell to run programs...
Still not working.
EDIT: Updated Asm, still does not work.

This is what I have gotten to work so far:

After exiting ICE, the program pauses until [clear] is pressed.

Otherwise, if anyone knows what is going wrong with my code, please feel free to post it.

This is the code that is called first:

Code:

include 'include/ez80.inc'
include 'include/tiformat.inc'


;Move usermem up
ld   hl,$D1A87F      ; userMem
ld   de,$D1A87F
ld   bc,($D0118C)   ; prgm Size
add   hl,bc
ex   hl,de
ld   bc,($D0118F)   ; shell size
add   hl,bc
lddr

;Copy program to UserMem
ld   de,$D1A87F
ld   hl,($D01192)   ; prgm Ptr
ld   bc,($D0118C)   ; prgm Size
ldir

;Stack Pusher
ld   hl,$FFFFD3
add hl,sp
ld sp,hl
push hl
ex de,hl
ld hl,$D03110
ld bc,$00001B
ldir

jp $D1A881      ; userMem


And this is the code that is pushed to the stack: (the 'stub')

Code:

include 'include/ez80.inc'
include 'include/tiformat.inc'

di

ld   bc,$000000
ld   hl,$D1A87F      ; userMem
ld   de,$D1A87F
add   hl,bc
ld   bc,$000000
ldir

ld   hl,$00002D
add   hl,sp
ld   sp,hl

ret

Note: the "$000000"s are replaced by the shell before the first code is called. I have verified using CEmu's memory viewing feature (Thanks Mateo), and the code is all there; at the adress it is copied to. (the stub is at $D03110 and the main asm is at $D03250)

My problem seems that after the user program is done being executed, the program counter is never loaded with the adress containing the stub.
I know how the error is happening, but I have no idea how to fix it.

Hopefuly someone can enlighten me as to what I am doing wrong.
That's not how you copy programs to usermem... Wink

You ignored my previous post on how to properly copy the stub too:

MateoConLechuga wrote:
MateoConLechuga wrote:

Code:
[2018-10-21 19:49:19] <MateoC> ld hl,-<ASM CODE SIZE + 18> \ add hl,sp \ ld sp,hl \ push hl \ ex de,hl \ ld hl,<ASM RETURN CODE PTR> \ ld bc,<ASM CODE SIZE> \ ldir


Your stub has to load your shell back into usermem and jump too it too. Smile
MateoConLechuga wrote:
That's not how you copy programs to usermem... Wink

You ignored my previous post on how to properly copy the stub too:

MateoConLechuga wrote:
MateoConLechuga wrote:

Code:
[2018-10-21 19:49:19] <MateoC> ld hl,-<ASM CODE SIZE + 18> \ add hl,sp \ ld sp,hl \ push hl \ ex de,hl \ ld hl,<ASM RETURN CODE PTR> \ ld bc,<ASM CODE SIZE> \ ldir


Your stub has to load your shell back into usermem and jump too it too. Smile


Oops, I did not realize that I had moved my program up by the wrong amount, as well as broke the stub. My bad

EDIT: how does the stub restore the Stack Pointer after the user program returns to it, and it is done copying the program back?
beckadamtheinventor wrote:
how does the stub restore the Stack Pointer after the user program returns to it, and it is done copying the program back?

By moving the stack up the same amount you allocated for the stub Razz That's all you need to do.

Call user program:


Code:
ld hl, - <ASM CODE SIZE + 18> \ add hl,sp \ ld sp,hl \ push hl \ ex de,hl \ ld hl,<ASM STUB CODE PTR> \ ld bc,<ASM STUB SIZE> \ ldir \ jp usermem


Stub jump to shell:


Code:
ld hl,<ASM CODE SIZE + 18> \ add hl,sp \ ld sp,hl \ jp usermem
can this open TI-BASIC programs?
De2290 wrote:
can this open TI-BASIC programs?

I haven't tested it, but I did add code for that.
I have now released the source code for BOSshell on github! Very Happy

Hopefuly I can get help with some of the problems I've been having. (mostly with running programs)
Either way I'll still have a working release by the end of December.
beckadamtheinventor wrote:
I have now released the source code for BOSshell on github! Very Happy

Hopefully, I can get help with some of the problems I've been having. (mostly with running programs)
Either way, I'll still have a working release by the end of December.

I downloaded the SRC and it seems not to work on startup. it changes the screen color and when I press [ON] it crashes. I don't know what the problem is.
Alvajoy123 wrote:
beckadamtheinventor wrote:
I have now released the source code for BOSshell on github! Very Happy

Hopefully, I can get help with some of the problems I've been having. (mostly with running programs)
Either way, I'll still have a working release by the end of December.

I downloaded the SRC and it seems not to work on startup. it changes the screen color and when I press [ON] it crashes. I don't know what the problem is.

lmao that's why i made it abundantly clear it was not stable yet Wink Razz
Thank you for letting me know though.
Also: you're going to need to delete the old appvars, I changed the formatting, this is probably why it crashed. You will also need to build BOSDTSRC and run it. This will create the data appvar which the shell now depends on.
beckadamtheinventor wrote:
Also: you're going to need to delete the old appvars, I changed the formatting, this is probably why it crashed. You will also need to build BOSDTSRC and run it. This will create the data appvar which the shell now depends on.


You might want to have it check if the appvars are improperly formatted and present the user with an alert the the appvars are corrupted and need to be deleted, optionally with an option to delete the appvars.
_iPhoenix_ wrote:
beckadamtheinventor wrote:
Also: you're going to need to delete the old appvars, I changed the formatting, this is probably why it crashed. You will also need to build BOSDTSRC and run it. This will create the data appvar which the shell now depends on.


You might want to have it check if the appvars are improperly formatted and present the user with an alert the the appvars are corrupted and need to be deleted, optionally with an option to delete the appvars.


Yeah, but the old appvars do not have a header, so it wouldn't be easy to tell whether they were of old or new. Sad
I'll need to find a way to tell, and add a header to the next appvar configuration.
I have been working on a text editor [for BOSshell], but it's turning into a huge mess Sad

When I release BOSshell, I plan to release a developers guide to interfacing with BOSshell.
This guide will include documentation on:
+ the config appvar.
+ the folders appvar and file entry appvar.
+ file header formatting and file associations.

I plan to have all of the file editors for BOSshell seperate from the program itself.
I hope that this will soften my workload; I have been very busy lately.

With all that said, is there anyone who would like to develop file editors?
Not specifically in BOSshell, but allowing for BOSshell to run them and use them as default programs for certain file extensions.
This would be a big help. Smile

All programs made with BOSshell in mind are still the intellectual property of the author(s) who made the program, and do not need to include me in the credits.

If anyone would like to develop programs like this, I will be releasing documentation very soon.
Exclamation Exclamation Exclamation I FINALLY GOT IT TO WORK!!! Exclamation Exclamation Exclamation

I shall *hopefuly* be uploading a public release tommorow, December 3! Very Happy

WELP... It does not work... Crying
This success was just it running a BASIC program... which is also why it throws a syntax error upon returning...

SO CLOSE... but no cigar.
Now it recognizes Asm programs but still crashes when I run them...
Can you add a like-photoshop thing to fix/make ximg like a sprite editer of sorts? Smile

beckadamtheinventor wrote:
De2290 wrote:
can this open TI-BASIC programs?

I haven't tested it, but I did add code for that.


Could you open TI-BASIC programs in KEDIT? Cool
Justin wrote:
Can you add a like-photoshop thing to fix/make ximg like a sprite editer of sorts? Smile

beckadamtheinventor wrote:
De2290 wrote:
can this open TI-BASIC programs?

I haven't tested it, but I did add code for that.


Could you open TI-BASIC programs in KEDIT? Cool

I think Beck can add Kedit to his shell, but I don't know if Beck is making his own program editor.

Edit: I PM and asked Beck if he wanted to make a program editor together. So far no reply.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 5 of 5
» All times are GMT - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement