Menu

Beginner's Tutorial

2008-05-26
2013-05-30
  • Emanuele Fornara

    I have released a beginner's tutorial:

    http://jbit.sourceforge.net/doc/tutorial.html

    It is not finished yet, but I think it could be helpful nevertheless.

     
    • spinvertically

      spinvertically - 2008-06-28

      I found the beginner's tutorial to be very helpful. I am still new at this and learning as I go. Can't wait to see the rest of the tutorial.

       
    • Emanuele Fornara

      Thank you moto3nergy. Feedback is always welcome, especially as it is so rare.

      The tutorial is now complete.

       
    • spinvertically

      spinvertically - 2008-07-14

      Thanks! I've learned a lot more already with the complete tutorial. Like I said I am still new at this, but I think I'm figuring it out. Thanks again :) I'll continue to watch for updates.

       
    • Emanuele Fornara

      There is an update already :)

      Nothing important. At the end, there are a short overview of JBit and a longer review session.

      I don't expect any more updates, except maybe minor corrections.

       
    • spinvertically

      spinvertically - 2008-07-15

      I just wanted to let you know that I am using a Motorola V365 and JBit seems to be working great on it so far. I have been studying the demos and now I can write my name and change the background color :) That's about it, I am still trying to figure how to display an image like in the iload demo. I am really new at this! But I am having a lot of fun learning assembly language and I am so glad I can use this program on my cell phone.

       
    • Emanuele Fornara

      Thanks again for your feedback. I'm glad that you like JBit. About the Motorola V365, you confirmed what I suspected, as I test JBit on a Motorola V360 (a close predecessor of the V365) myself.

      Unfortunately, the IO chip is largely undocumented, but if you already understand "bgcol1" and "bgcol2", I think you'll be all right. If you are stuck somewhere and have a specific question, please feel free to create a new thread.

       
  • Kyle Alexander Buan

    Hi, moto3nergy. In showing BITMap like in the demo, you have to send requests to the IO chip, i.e. telling it that you made an image with a #1 ID, and telling it that you want to show the image as background. For requests, see setbgcol2. You specify the page of the data of the request at 2:5, then the offset of the request at 2:4. Look at setbgcol2 in ASM mode. Line 1&2 tells 2:5 where the request stream's page is. Lines 3&4 tells I:forgot to enable BackGroundColor. Lines 5&6 tells 2:4 the offset of the request. Upon entering offset, the request is streamed. Look at the beginning of the first data page. There is: NUMBER_OF_REQUEST_BYTES NUMBER_OF_REQUEST_PAGES COMMAND STREAM. In this case, 2 0 I_FORGOT 0, where 2 means two bytes of request (SETCOLOR, COLORBLACK). 0 means the request doesn't occupy a page, I_FORGOT is the command to SET the BGCOLOR, and 0 means BLACK (as in SETBGCOL to BLACK). (to be continued)

     
  • Kyle Alexander Buan

    If you want to show images, paint the image (using paint), then tell 2:5 where the image's page is, then tell 2:4 the image's offset. After that, GoTo a data page that is unocupied, and enter this (remember the offset and page (if other than the last page you specified)) and put 2 0 19 1. 2 says that the request is 2 bytes long, 0 telling that the request doesn't occupy a page, 19 says that the request is a SETBGIMG and 1 tells that you want to use image #1 as the background (i.e. change background image to 1). At the begining of your code, please enable BGIMAGE first. I forgot how to, so I'll tell you later. (continued)

     
  • ashu13b

    ashu13b - 2011-12-06

    Hi. I do not know much about computer.but i like jbit .i have written some short programmes like writing my name.but i feel diffculte to go ahead because lack of i/o documentation.when will u write a tutorial about i/o or give some link.

     
  • Emanuele Fornara

    I'm glad that you like JBit. All the documentation that is available is here:

    http://jbit.sourceforge.net/doc/index.html

    The forums are also a source of info and hints.

    If I get a better idea of what you can do and what you want to do, I can be more specific. You also write that you don't know much about computers. Do you mean that you first started programming with JBit?

     
  • ashu13b

    ashu13b - 2011-12-09

    Thanx for respons.I was surfing net for a mobile game then i saw jbit i downloaded it.read tutoria(really very well written). Then i started writting programmes.yes i started programming on jbit.I am a mbbs student.jbit was like a game for me and i enjoyed it.now i can understood all 6502 demo and resize bgcl1 bgcl2 ipnggen1 demo io1 but this is the point beyond which i am blind that is all my story.

     
  • ashu13b

    ashu13b - 2011-12-09

    For example in setpal demo.
    Lda#4 ok fine.
    Sta 3 sta5 sta 7. Why we are storing 4 to page 0 offset 3, 5and7

     
  • Emanuele Fornara

    I have written the 6502 demos to wet the appetite of the beginner's programmer. Unlike the 6502 demos, I have written the IO demos mainly for myself, as I needed some programs to test the IO chip while I was designing it. So, they might not always be the best way to learn a feature of the IO chip. For example, the setpal demo is actually quite hard to understand, and this is not because setting a palette in JBit is hard, but mostly because the day that I wrote setpal I fancied writing
    a complex 6502 program!

    To learn more about 6502 programming, I suggest to look around on the web. Alternatively, my E1 sheet, although a bit outdated and not finished, might also be useful.

    To learn more about the IO chip, I suggest the forums (especially Short Programs). After that, you might want to try to decipher the IO sheet (or the refio JBDoc).

    The demo setpal will make sense once you have more experience with the 6502. Here is a hint about the specific question you asked:

    lda #4
    sta 3

    is done because later

    lda #10
    sta 2

    is done.

    When

    lda (2),y

    is then executed, it behaves like

    lda 4:10,y

     
  • ashu13b

    ashu13b - 2011-12-17

    Thanx a lot. i can understood that is called indirect adressing.i try to read about 6502 but i think there is no documentation as simple as jbit tutorial is.if u have no prblm with answering then i will ask you whenever i feel diffculty. Now i want to know  about 'keybuff' .
    24 empty 25 empty … When no key is pressed. Now if we press 1 then 2:24 contains 49 ok.Now if we press 2  then 2 25 contain 50 what will 2 24 contains 49 or 50.and what will happen now if we write something  in 2 25.

     
  • Emanuele Fornara

    In principle, I have no problem answering your questions. However, keep in mind that my time is limited so sometimes I might not be able to answer or you might have to wait a while. I would appreciate if you open new topics, so it's easier for someone else to find answers to the same questions.

    As for the tutorial. Thanks for the appreciation. I put in the tutorial only what I consider the most important concepts to get you started, those concepts that are very hard to figure out on your own. I think I know, because when I started as a kid (several years ago) I had almost no documentation and there was no internet; I did actually figure them out on my own but, IIRC, it took me almost one year to write the first LDA/STA program! After that, I strongly believe it's all practice, practice and practice. When I looked around a while ago, a tutorial that looked like it's fairly easy to read was "Professor And Pat 6502 Assembly Language Book":

    http://www.mathpiper.org/documentation-1

    As for keybuf. The short answer is that you don't need to know. I think I've never used the full buffer myself. Just read a character from 2:24, when it's non-zero (meaning a character is waiting to be processed) write anything into it and use what you've read. If you really want to understand keybuf, run:

    STA 2:18
    JMP 3:0
    

    Press 1, 2 and 3. Break the program. Debug it. Inspect 2:24. Write anything into 2:24 and see what happens.

     

Log in to post a comment.