Image Map Image Map
Page 2 of 5 FirstFirst 12345 LastLast
Results 11 to 20 of 41

Thread: Adding NOPs

  1. #11

    Default

    Quote Originally Posted by daver2 View Post
    There is a typo. in my post #7. I meant pages 1 and 2 not pages 2 and 3 as I have written.

    Page 3 will still affect the flip/flop though!

    It will be interesting to check how much RAM there is, there may only be 128 or 256 bytes - so that will make subroutines a bit tricky on a 6502... Although I am sure I have seen some subroutine examples in the manual. I will check...

    Dave
    It only hooks up address line A0..A6, so the same 128 bytes are replicated through the memory map. As long as the stack pointer is initialized to $7F (or actually $FF would work, too), it will look like page 0 memory starting at $7F and working down will be used as the stack.
    Last edited by resman; December 2nd, 2019 at 10:48 AM. Reason: Additional info

  2. #12
    Join Date
    Jun 2012
    Location
    UK - Worcester
    Posts
    3,218

    Default

    I had a bit of time waiting for a meeting to start today so I took another look at the schematics and concur with resman regarding the 'reflection' of the 128 bytes through memory.

    What it does mean is that you have to be careful about not using areas of the RAM that could be overwritten by the stack usage.

    I see that a later design of the OSI 300 has used used a larger RAM device. However, in this case, the stack should be contained to page 1 - but the limitations of page 1/2 to set/reset the 1-bit flip/flop will still apply and will be 'reflected' throughout the larger memory device.

    The use of the stack (i.e. subroutines) on page 1 whilst using the 1-bit latch may, therefore, cause you problems.

    Dave

  3. #13

    Default

    One wonders why this address range was chosen? Was there another purpose?
    Dwight

  4. #14

    Default

    So the OSI 300 is pretty much the barest bones 6502 possible (with 1 bit I/O). It doesn't even have a ROM - you have to preload the reset vector into locations $7C and $7D (reflecting $FFFC and $FFFD), meaning you shouldn't use those values for anything else; like the stack in my example above. The flip flop set/reset is tied to A8 and A9, meaning that page 3 (or any page setting A8 and A9) would set and reset simultaneously. Including fetching the reset vector at $FFFC. Who will win? Why did they do this, besides being easy? Who knows.

  5. #15

    Default

    Quote Originally Posted by resman View Post
    So the OSI 300 is pretty much the barest bones 6502 possible (with 1 bit I/O). It doesn't even have a ROM - you have to preload the reset vector into locations $7C and $7D (reflecting $FFFC and $FFFD), meaning you shouldn't use those values for anything else; like the stack in my example above. The flip flop set/reset is tied to A8 and A9, meaning that page 3 (or any page setting A8 and A9) would set and reset simultaneously. Including fetching the reset vector at $FFFC. Who will win? Why did they do this, besides being easy? Who knows.
    I think with the design as shown, A9 and A10 would have allowed interrupts without issues.
    Dwight

  6. #16

    Default

    Quote Originally Posted by Dwight Elvey View Post
    I think with the design as shown, A9 and A10 would have allowed interrupts without issues.
    Dwight
    Without further qualifying the addresses of the flip flop's set & reset, any IRQ, NMI, or RST is going to drive both set & reset when the 6502 tries to fetch the vector from page $FF, setting A15..A8 high. I hope the flip flop is okay with that.

  7. #17
    Join Date
    Jan 2011
    Location
    Vancouver, BC
    Posts
    4,698
    Blog Entries
    3

    Default

    So I finally got around to trying the program, and modified it for the required NOPs as thus (left column is address, right column is OP code/data:

    Code:
    00 AD
    01 00
    02 02
    03 EA
    04 EA
    05 EA
    06 EA
    07 EA
    08 EA
    09 EA
    10 EA
    11 EA
    12 EA
    13 EA
    14 4C
    15 17
    16 00
    17 AD
    18 00
    19 01 
    20 EA
    21 EA
    22 EA
    23 EA
    24 EA
    25 EA
    26 EA
    27 EA
    28 EA
    29 EA
    30 EA
    31 4C
    32 00
    33 00
    I did not get any sound, although the program (I think) seemed to run okay.

    I may be misunderstanding how to hook things up. The manual says to connect the 'output latch' to the aux input of a standard stereo, being careful to attach the ground first. On this diagram you can see two output pins:

    osi locations.png

    I tried connecting the input to the stereo to both, with the 'shield' connected to ground.. and got zippo running my program. Did I goof somewhere?

  8. #18
    Join Date
    Jan 2011
    Location
    Vancouver, BC
    Posts
    4,698
    Blog Entries
    3

    Default

    Another possibility I suppose is that the stereo I'm using is not suited.. it's an early 90s Realistic unit.. think it might be digital. I do have a circa 1973 Sony deck I could try?

  9. #19

    Default

    If you put your finger on the audio input without having your self grounded, you should get a buzzing sound. That checks that the audio is working.
    If the sound is in the range calculated you should hear it. What is your cycle time?
    Dwight

  10. #20

    Default

    It's going to be a little difficult to debug without any real insight into the operation of the CPU, but a few things to try:

    Did you initialize the reset vector to $0000?

    When it comes out of reset, does the binary representation of $EA (11101010) sort-of show up on the data LEDs?

    Do you have any kind of digital probe or oscilloscope? Looking at the input and outputs of the flip-flop would be a tell-tale sign that things are signaling.

    If the clock speed is ~1 MHz, the tone from that code will be pretty high. Our hearing isn't what is used to be. Just sayin'

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •