Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
ChiralCondensate
Nov 13, 2007

what is that man doing to his colour palette?
Grimey Drawer

BiohazrD posted:

calling rigol "badass serious equipment" is a bit of a stretch. theyre $300-400 dollar made in china scopes (with easily bypassed software licensing). they're great for what they are and what they cost, but its definitely hobby equipment

in fact "riglol" refers to the "easily bypassed software licensing"

Adbot
ADBOT LOVES YOU

Sagebrush
Feb 26, 2012

BiohazrD posted:

calling rigol "badass serious equipment" is a bit of a stretch. theyre $300-400 dollar made in china scopes (with easily bypassed software licensing). they're great for what they are and what they cost, but its definitely hobby equipment

don't harsh on my scope :mad:

30 TO 50 FERAL HOG
Mar 2, 2005



Sagebrush posted:

don't harsh on my scope :mad:

hey now my garage scope is a riglol, i aint hatin

muckswirler
Oct 22, 2008

To answer the question, that should work. What's the application?

30 TO 50 FERAL HOG
Mar 2, 2005



unpacked robinhood posted:

this is an optoisolator, 5 goes to a pullup pin inside another device.
is it the correct way to bring it to ground when the led side is active ?



e: rigol kinda means lol in french, it's funny to see it on badass serious equipment like this

wouldnt you want the resistor between 4 and 6 and GND so you dont try to source too much current from your pull up on pin 5

unpacked robinhood
Feb 18, 2013

by Fluffdaddy

BiohazrD posted:

wouldnt you want the resistor between 4 and 6 and GND so you dont try to source too much current from your pull up on pin 5


more like this ?


muckswirler posted:

To answer the question, that should work. What's the application?

presumably my car radio can be controlled via a single wire in a pullup configuration that goes out the back, by pulling to gnd with the appropriate timing. so 5 would go to the radio and would be used from time to time to transmit a code

an attiny flashes the led on the other side

Jimmy Carter
Nov 3, 2005

THIS MOTHERDUCKER
FLIES IN STYLE
I finally got around to building My First Electronic Thing: a gift for my friend: an analog gauge for the bar he works at which indicates how hot he's coming in that day - he receives a text the days he's working, he replies and it displays the result (which decays over several hours). I used a Particle Photon because I value the ability to remotely fix things in a low-effort manner above pretty much all else and I'm fairly happy so far.

Since I'm not some scrub who's going to tape a breadboard inside of a project box, what's the YOSPOS-approved PCB layout app?

Sagebrush
Feb 26, 2012

kicad. it's relatively good. all pcb CAD apps suck though.

depending on how complex it is i might suggest just a chunk of protoboard. you can get a pack of 20 various sizes for like 5 bucks on ebay

Doc Block
Apr 15, 2003
Fun Shoe
I've only ever used Eagle, so that's what I'm gonna recommend.

Also, is there any pro app that Autodesk won't buy?

muckswirler
Oct 22, 2008

i'm starting to get into DipTrace and it's fairly dope. the package editor or whatever is good. i absolutely hate spending time working on library stuff in eagle tho so ymmv.

Bloody
Mar 3, 2013

install diptrace

Sagebrush
Feb 26, 2012

doesn't diptrace cost money?

no i am not going to google this. i'm far too lazy

Luigi Thirty
Apr 30, 2006

Emergency confection port.

it costs money in the way that vmware costs money

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

Luigi Thirty posted:

it costs money in the way that vmware costs money

"I want to run a vm on my workstation" VMware or "what am I supposed to do with these bladecenters" VMware?

longview
Dec 25, 2006

heh.
i've been thinking of trying diptrace out

the pin no. limitation in the standard version, is that the total number of device pins in a design or is it just the largest package size? might be a bit limiting but i think most of my boards could fit in the freeware version

other issue for me with the free version is only 2 routing layers; i assume they let you put in a power+ground plane for 4 layer board? can you shape route the power plane in that case?
most of the time when i do 4 layer on the OSHpark stackup i do a ground plane nearest to the signal traces and then i shape route the various power supply rails on the other int layer.

sometimes i need a bit of extra ground fill there too if high speed stuff has to go on the bottom layer for a bit, it would be pretty limiting if that wasn't an option.

Bloody
Mar 3, 2013

the pin number limitation is total pin count. my tpa3251 board posted earlier is right under the limit

2 routing layers, but you can have planes, so you can do four layer boards. i believe you can shape route the planes although i haven't tried

also, the restrictions in general are not super robustly implemented. i've accidentally wound up with >300 pin boards in the free version that were still routable and modifiable and stuff. no idea how :iiam:

longview
Dec 25, 2006

heh.
i just gave it a shot just doodling an op amp circuit

will probably take some getting used to and a bit of configuration to set it up right, doesn't seem too bad on the schematic side.

minor details is multi part symbols seem to be somewhat inflexible compared to more expensive software? in cadence software multi part ICs are referenced based on a letter indicator so if you want to swap some elements for routing you just swap those and the pin numbers/schematic symbol updates automatically. proteus even has a function that will auto-swap gate elements to reduce routing complexity, but that's kind of an oddball feature (that i suspect has been there since the days of 74 series computer boards).

library management seemed to be pretty mediocre; i'm used to a searchable component database (parametric and free text) which i couldn't really find except for a basic filter. i guess there's a reason there are companies dedicated to component library+symbol management.

couldn't find any shortcuts/special handling of ground/power symbols, do i really have to go to a specific library or use manual net aliases to place a ground symbol?

pcb layout seemed fine, but i have to wonder what kind of mad men decided to make top and bottom routing the same colours instead of the standard red/blue, come on (even the weirdo green/yellow would be better than same colour).

the graphics aren't as nice as newer allegro versions or proteus (both do extra transparency and border effects on planes to provide more visual distinction).
seemed like when i placed my ground fill it shows up as the same colour as any traces i pull and doesn't update in real time, so if i route over a plane it throws DRC errors along the entire trace, which is invisible since it's the same colour as the fill.
if there's no way to make it do real time shape updating that's pretty much useless unless you remove the entire fill every time you do any routing on that layer.

Bloody
Mar 3, 2013

i plop down the ground symbol from the symbols library (or w/e its called) then just copy-paste it around :v:

it is definitely not a replacement for the enterprise grade tools but its pdeece as an eagle alternative imo

Fanged Lawn Wormy
Jan 4, 2008

SQUEAK! SQUEAK! SQUEAK!
I like Eagle a lot. I tried kicad for a bit once but I couldn't get used to the quirks like I have with eagle. diptrace gets recommended a lot but I find it frustrating.

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe

unpacked robinhood posted:


more like this ?

Don't connect pin 6 at all. It's there for high speed applications.

Angela Merkle Tree
Jan 4, 2012

the definition of open: "mkdir android ; cd android ; repo init -u git://android.git.kernel.org/platform/manifest.git ; repo sync ; make"
College Slice
i've continued hacking on the gta:sa script vm, and got some pretty powerful tools built for it


first up, there's the script injector and reloader. it acts like the ruby `guard` program and monitors a directory of script files. when you save a script from your editor, it compiles the script and injects or reloads it. by keeping the symbol list from earlier compiles, it's able to patch the old code's jumps to point to the new code, retaining local variable values.

below i'm editing the script to change the text colour from red to green, but the `counter` local variable retains it's value by patching the running code to jump to the updated code



next up is the "JIT compiler" (not entirely sure if it meets the standard definition of it). using a small host script injected into the game vm, it's able to evaluate injected instructions and provide return values. using ruby's `method_missing` i made an opcode proxy object that can directly call vm opcode functions from native ruby code:



finally, i patched the ui framework i was using to achieve higher framerates, and made this giant monstrosity of a visual debugger for it. it uses some of the exotic console input modes to get scroll/cursor support, and has an interactive ruby console hooked up to the opcode proxy available:

Sagebrush
Feb 26, 2012

as someone whose programming experience is almost exclusively with embedded microcontrollers and other small physical devices, the scope of something like that is just mind-boggling. the concept of hooking into someone else's running code and interacting with it in real time is total :aaaaa: *10000000

30 TO 50 FERAL HOG
Mar 2, 2005



Angela Merkle Tree posted:

i've continued hacking on the gta:sa script vm, and got some pretty powerful tools built for it


first up, there's the script injector and reloader. it acts like the ruby `guard` program and monitors a directory of script files. when you save a script from your editor, it compiles the script and injects or reloads it. by keeping the symbol list from earlier compiles, it's able to patch the old code's jumps to point to the new code, retaining local variable values.

below i'm editing the script to change the text colour from red to green, but the `counter` local variable retains it's value by patching the running code to jump to the updated code



next up is the "JIT compiler" (not entirely sure if it meets the standard definition of it). using a small host script injected into the game vm, it's able to evaluate injected instructions and provide return values. using ruby's `method_missing` i made an opcode proxy object that can directly call vm opcode functions from native ruby code:



finally, i patched the ui framework i was using to achieve higher framerates, and made this giant monstrosity of a visual debugger for it. it uses some of the exotic console input modes to get scroll/cursor support, and has an interactive ruby console hooked up to the opcode proxy available:


this is the most insane thing I've ever seen

simble
May 11, 2004

BiohazrD posted:

this is the most insane thing I've ever seen

Doc Block
Apr 15, 2003
Fun Shoe

Angela Merkle Tree posted:

i've continued hacking on the gta:sa script vm, and got some pretty powerful tools built for it


first up, there's the script injector and reloader. it acts like the ruby `guard` program and monitors a directory of script files. when you save a script from your editor, it compiles the script and injects or reloads it. by keeping the symbol list from earlier compiles, it's able to patch the old code's jumps to point to the new code, retaining local variable values.

below i'm editing the script to change the text colour from red to green, but the `counter` local variable retains it's value by patching the running code to jump to the updated code



next up is the "JIT compiler" (not entirely sure if it meets the standard definition of it). using a small host script injected into the game vm, it's able to evaluate injected instructions and provide return values. using ruby's `method_missing` i made an opcode proxy object that can directly call vm opcode functions from native ruby code:



finally, i patched the ui framework i was using to achieve higher framerates, and made this giant monstrosity of a visual debugger for it. it uses some of the exotic console input modes to get scroll/cursor support, and has an interactive ruby console hooked up to the opcode proxy available:


[unreal_tournament_holy_shit.wav]

evil_bunnY
Apr 2, 2003

Angela Merkle Tree posted:

i've continued hacking on the gta:sa script vm, and got some pretty powerful tools built for it
ah-maze-ing

Hunter2 Thompson
Feb 3, 2005

Ramrod XTreme
Is your code posted online? I'd love to peek at it, despite knowing basically no ruby.

The Eyes Have It
Feb 10, 2008

Third Eye Sees All
...snookums
I'm going to basically echo the other poster and say as a person who has never done software more complex than myself, the scope of what you're doing is amazing to me.

lord of the files
Sep 4, 2012

I posted in the wrong place. oops.

echinopsis
Apr 13, 2004

by Fluffdaddy
from a code point of view, is gta quite an achievement or

akadajet
Sep 14, 2003

Angela Merkle Tree posted:

i've continued hacking on the gta:sa script vm, and got some pretty powerful tools built for it


first up, there's the script injector and reloader. it acts like the ruby `guard` program and monitors a directory of script files. when you save a script from your editor, it compiles the script and injects or reloads it. by keeping the symbol list from earlier compiles, it's able to patch the old code's jumps to point to the new code, retaining local variable values.

below i'm editing the script to change the text colour from red to green, but the `counter` local variable retains it's value by patching the running code to jump to the updated code



next up is the "JIT compiler" (not entirely sure if it meets the standard definition of it). using a small host script injected into the game vm, it's able to evaluate injected instructions and provide return values. using ruby's `method_missing` i made an opcode proxy object that can directly call vm opcode functions from native ruby code:



finally, i patched the ui framework i was using to achieve higher framerates, and made this giant monstrosity of a visual debugger for it. it uses some of the exotic console input modes to get scroll/cursor support, and has an interactive ruby console hooked up to the opcode proxy available:


very nice!

Luigi Thirty
Apr 30, 2006

Emergency confection port.

the gta thingy is way cool

Angela Merkle Tree
Jan 4, 2012

the definition of open: "mkdir android ; cd android ; repo init -u git://android.git.kernel.org/platform/manifest.git ; repo sync ; make"
College Slice
thanks for the responses, i'm really proud of what it's capable of now. it's been a great learning experience since i don't really have much familiarity with compilers or low-level programming before this.

meatpotato posted:

Is your code posted online? I'd love to peek at it, despite knowing basically no ruby.
the code is a real mess, since this was very much a learn-as-you-go project, but i've got it up a github repo here: https://github.com/lmc/gta-scm
currently only works with the osx steam version of san andreas, but if you've got a recent version of ruby and bundler installed, you should be able to clone it, `bundle install`, and start using the example scripts in /bin

the key files are:
process.rb - attaches to the game process and read/writes the script vm structures
repl.rb - sets up the interactive ruby environment and injects code to evaluate into the game
ruby_to_scm_compiler.rb - a horrible travesty of a s-expression transformer, turning ruby expressions into assembly tokens
assembler.rb - assembles binary scripts from tokens

echinopsis posted:

from a code point of view, is gta quite an achievement or
i touched on it's script virtual machine in an earlier post, but the tldr; is it's a cooperatively-multitasked virtual machine executing custom bytecode, which segues nicely into...

Sagebrush posted:

as someone whose programming experience is almost exclusively with embedded microcontrollers and other small physical devices, the scope of something like that is just mind-boggling. the concept of hooking into someone else's running code and interacting with it in real time is total :aaaaa: *10000000
funny you say that, the vm is only about as capable as most microprocessors (16-bit memory space, ~200kb rom, 48kb ram). you could potentially debug them in a similar manner with a hardware debugger or monitor rom that can read/write memory and registers.

the real secret sauce is generating and caching the symbol lists from the compiler, so you know where your jumps are to patch them later. having a disassembler that can read from live memory helps heaps to debug this.

unpacked robinhood
Feb 18, 2013

by Fluffdaddy
i'm not sure I'm smart enough to even play the game

e

Stack Machine posted:

Don't connect pin 6 at all. It's there for high speed applications.

Thanks

unpacked robinhood fucked around with this message at 12:44 on Apr 15, 2017

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

i'm doing important research on spherical coordinate functions

Luigi Thirty
Apr 30, 2006

Emergency confection port.

now turn it into a poop emoji

Pile Of Garbage
May 28, 2007



peepsalot posted:

i'm doing important research on spherical coordinate functions


got a colleague with similar last name who should love this

Luigi Thirty
Apr 30, 2006

Emergency confection port.



it doesn't look like much but there's a lot going on under the hood i've been working on here

i figured out how to set the 4-color and 16-color palettes, i've got an array of 16 software-controlled motion objects hooked up, i've figured out how to make my own graphics and encode them into ROM, and every time the little block hits a wall it sends command $01 to the sound CPU (which doesn't do anything yet but count how many $01s it's received so I can make sure it's working right)

the good news is the sound CPU is a 6502 so I know how to program it. the bad news is I don't know how to program the POKEY, YM2151, or TMS5220 lol

Luigi Thirty
Apr 30, 2006

Emergency confection port.

ah there we go. speech

https://www.youtube.com/watch?v=2J6GeoQ0LMU

Adbot
ADBOT LOVES YOU

Bloody
Mar 3, 2013

it is not saying "219 yospos bitch", voted 1

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply