6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 23, 2024 7:15 am

All times are UTC




Post new topic Reply to topic  [ 80 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next
Author Message
PostPosted: Tue Sep 13, 2016 6:59 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8507
Location: Midwestern USA
beholder wrote:
Here's the code:
* = $8000

ACIA_DATA = $7F70
ACIA_STAT = $7F71
ACIA_COMM = $7F72
ACIA_CTRL = $7F73

VIA1 = $7F50
VIA2 = $7F51

lda #$FF
sta $7F52
sta $7F53
sta VIA1
sta VIA2

lda #%00001011
sta ACIA_COMM
sta VIA1
lda #%00011111
sta ACIA_CTRL
sta VIA2

TX
lda ACIA_STAT
sta VIA1
and #$10
beq TX

lda #$AA
sta ACIA_DATA
sta VIA2
jmp TX

In the future, may I suggest you bound your code expositions with the [ code ] and [ /code ] markers? Viz:

Code:
         *=$8000

ACIA_DATA=$7F70
ACIA_STAT=$7F71
ACIA_COMM=$7F72
ACIA_CTRL=$7F73

VIA1     =$7F50
VIA2     =$7F51

         lda #$FF
         sta $7F52
         sta $7F53
         sta VIA1
         sta VIA2

         lda #%00001011   
         sta ACIA_COMM
         sta VIA1
         lda #%00011111   
         sta ACIA_CTRL
         sta VIA2

TX       lda ACIA_STAT
         sta VIA1
         and #$10
         beq TX

         lda #$AA
         sta ACIA_DATA
         sta VIA2
         jmp TX

Doing so will greatly improve readability.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 13, 2016 10:11 pm 
Offline
User avatar

Joined: Sat Dec 07, 2013 4:32 pm
Posts: 246
Location: The Kettle Moraine
BigDumbDinosaur wrote:
Doing so will greatly improve readability.


Normally I would agree. In fact, I still do agree. But ironically, your post, the (code) block is all but unreadable in the mobile layout.

In fact, until now, I was under the impression that many posters here intentionally write their code in a way that is difficult for me to read. I will have to keep in mind to try to view blocks of code another way.


Attachments:
Screenshot_2016-09-13-17-03-21_crop_254x600.jpg
Screenshot_2016-09-13-17-03-21_crop_254x600.jpg [ 54.5 KiB | Viewed 1518 times ]


Last edited by KC9UDX on Tue Sep 13, 2016 10:29 pm, edited 1 time in total.
Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 13, 2016 10:26 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8544
Location: Southern California
KC9UDX wrote:
Normally I would agree. In fact, I still do agree. But ironically, your post, the (code) block is all but unreadable in the mobile layout.

What are you seeing? I don't use a smartphone or tablet, but I checked nearly every page of my website on our son's smartphone, and it all appeared as it should, basically the same as on my large PC monitor but tiny. Everything showed up exactly as I intended, without my putting any effort at all into making it mobile-friendly.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 13, 2016 10:30 pm 
Offline
User avatar

Joined: Sat Dec 07, 2013 4:32 pm
Posts: 246
Location: The Kettle Moraine
GARTHWILSON wrote:
KC9UDX wrote:
Normally I would agree. In fact, I still do agree. But ironically, your post, the (code) block is all but unreadable in the mobile layout.

What are you seeing? I don't use a smartphone or tablet, but I checked nearly every page of my website on our son's smartphone, and it all appeared as it should, basically the same as on my large PC monitor but tiny. Everything showed up exactly as I intended, without my putting any effort at all into making it mobile-friendly.

It took me a while but I attached an image; please see my previous post.


Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 13, 2016 10:36 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8544
Location: Southern California
So can't you just rotate it 90° to get a landscape layout? It works automatically with all the smartphones I've seen.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 13, 2016 10:46 pm 
Offline
User avatar

Joined: Sat Dec 07, 2013 4:32 pm
Posts: 246
Location: The Kettle Moraine
I guess so. I hadn't realised that it would affect the code blocks.


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 14, 2016 5:50 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1748
Location: Sacramento, CA
In case this helps:
If you have an android phone, you can press the three dots in the upper right of Chrome and there's an option to "Request Desktop Site". Check the box and it will try to load the normal web page vs.the mobile version. That usually fixes forced screen wrap (narrow screens) for me.

Daryl

_________________
Please visit my website -> https://sbc.rictor.org/


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 14, 2016 8:55 am 
Offline

Joined: Sun Apr 10, 2011 8:29 am
Posts: 597
Location: Norway/Japan
8BIT wrote:
In case this helps:
If you have an android phone, you can press the three dots in the upper right of Chrome and there's an option to "Request Desktop Site". Check the box and it will try to load the normal web page vs.the mobile version. That usually fixes forced screen wrap (narrow screens) for me.

Daryl

Yep, that's the only way of reading any website on a mobile phone, or any mobile or small-screened device (e.g. tablets), in my experience. Because those sites that have any kind of 'mobile' version will, among other ill things, disable zoom, which is completely counter-intuitive.

So my Android etc. devices all have their browsers permanently set to 'desktop'.

-Tor


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 14, 2016 9:00 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
On this site at least, it seems you can double-tap on an element to zoom it to fit. But using landscape is usually my first resort, with desktop mode second. But I see we're thoroughly off-topic now!


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 14, 2016 5:14 pm 
Offline

Joined: Wed Sep 02, 2015 7:28 pm
Posts: 63
Hello.
Here's a video of my oscilloscope probing the 6551 pin 7:
https://www.youtube.com/watch?v=1qdtXO_ ... e=youtu.be

Do you think this variation might be too high?
Should I change capacitor or resistor?
Thanks


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 14, 2016 10:12 pm 
Offline
User avatar

Joined: Sat Dec 07, 2013 4:32 pm
Posts: 246
Location: The Kettle Moraine
beholder wrote:
Hello.
Here's a video of my oscilloscope probing the 6551 pin 7:
https://www.youtube.com/watch?v=1qdtXO_ ... e=youtu.be

Do you think this variation might be too high?
Should I change capacitor or resistor?



No, I think it's right in line with what Garth said. You would see different results on a good 10 digit counter.


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 14, 2016 10:19 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8544
Location: Southern California
Agreed. The variation seems to be a result of the noise you're picking up somewhere. The 'scope is a great tool, but trying to get frequency from cursors on a single cycle with noise on it isn't going to work very well. A good counter will count cycles for a tenth of a second or a whole second or something like that. A whole second would give you 6½ digits at 1.8MHz. What the 'scope is doing there is like putting the counter on the "period" setting which is what you do for extremely low frequencies where you can't wait for lots of cycles.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 20, 2016 7:05 pm 
Offline

Joined: Wed Sep 02, 2015 7:28 pm
Posts: 63
Hello everyone.

I've been trying to figure out my sbc but not success yet.
I suspect my SBC might not be working correctly at full speed (1MHz) when using the oscillator.
When I probe the oscillator with my oscilloscope it seems fine, outputting a steady signal.

The way I've been testing my sbc I/O so far is by providing a slower clock by an arduino output pin.
Then I read the VIA's outputs.
I did a small test where my via 2 ports will output a growing 16 bit number from $0000 to $FFFF.
When I use the arduino's clock signal it works perfectly... but when I use the 1MHz can oscillator the leds dont blink.
1 port is all 1s and the second port is all 0s.

Have anyone had issues with sbc not working correctly when using 1MHz can oscillator?
Thanks


Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 20, 2016 7:10 pm 
Offline

Joined: Wed Sep 02, 2015 7:28 pm
Posts: 63
Yeah, so I checked the 6502 reset vector pin 1 and it's going HIGH then LOW.
Seems like when the sbc is at full 1MHz the 6502 is resetting constantly.
Anyone had this problem before?

Thanks!


Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 20, 2016 7:57 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
beholder wrote:
Yeah, so I checked the 6502 reset vector pin 1 and it's going HIGH then LOW.
Seems like when the sbc is at full 1MHz the 6502 is resetting constantly.

Pin 1 (VPB) goes low when a vector is being fetched. This could mean Reset, but altogether there are three vectors to consider: reset (triggered by the RESB pin) and the two interrupts (triggered by IRQB and NMIB).

I suggest you review what's connected to these three pins, and verify they remain high when they're supposedly inactive. (IRQB and NMIB, if not used, usually get tied to Vcc -- possibly using a pullup resistor.)

For more detail see Garth's articles, Interrupt Connections: IRQ and NMI and What Do I Do With the "Mystery" Pins, SYNC, RDY, S.O., Φ1, MLB, BE, and VPB?

cheers,
Jeff

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Last edited by Dr Jefyll on Tue Sep 20, 2016 8:12 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 80 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 31 guests


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 post attachments in this forum

Search for:
Jump to: