Messages - Asudem [ switch to compact view ]

Pages: [1] 2 3 4 5 6 ... 27next
1
Greetings all, it's been some time.

I've come across some old OrCad schematics I would like to try to build, but to get to that point I need to have a proper printout of the schematics.

There exists a driver for OrCad 3 called "RASTER.DRV" that creates some sort of RASTERized version of a schematic printout.

Much of the information I am using, as it's fairly scarce, comes from this site here.

The author of the site has written a program called SCH2BMP, which converts the raster output file to a bitmap image. The problem is, however, multi-page schematics were never considered for this project, and thus fail on the multi-page schematic I wish to convert. Or rather, it tries to put all pages into one giant, misaligned bitmap image which has an incredibly huge height dimension...

The binary for the conversion program is located here. But that doesn't do us much good. Instead, I contacted the author who is still around and they managed to find and send me the source, which is in QuickBasic 4.5... oof.

The attached source doesn't help much, as the source can't compile with QB64, but I am extremely unfamiliar with QB so it may be something I overlooked.

The author states "you can write your own program using this documentation", but I don't believe that's enough documentation to really go from to write a conversion program...

I will continue to bash away at this from different angles, but I am unsure of the best approach. Perhaps the best approach is simply editing the original source code to include a file break and recompiling it, as it will be compatible with old and newer systems alike, but that skill set may be beyond my capabilities as QuickBasic seems like a very dead language.

Any advice would certainly be appreciated, especially by anyone familiar with QB back when it was more widely used!  :Thmbsup:

EDIT: This is what the first page of the now attached RAS file looks like if anyone's curious.
QT960-01.png




2
TAKING THE SLEDGEHAMMER APPROCH

853.gif

Alright, so... I've decided something: If I don't move my mouse, I don't want the screen to turn on!

After failing to figure out how to use RegisterPowerSettingNotification to figure out if my display was on or off, I found that Windows API Code Pack can also do this. So, I whipped up a small little C# program for myself:

Code: C# [Select]
  1. using System;
  2. using System.Runtime.InteropServices;
  3. using System.Drawing;
  4. using System.Windows.Forms;
  5. using Microsoft.WindowsAPICodePack.ApplicationServices;
  6.  
  7. namespace ReSleeper
  8. {
  9.     public partial class Form1 : Form
  10.     {
  11.         Point point = new Point();
  12.         const int HWND_BROADCAST = 0xffff, WM_SYSCOMMAND = 0x0112, SC_MONITORPOWER = 0xF170;
  13.  
  14.         public Form1()
  15.         {
  16.             InitializeComponent();
  17.         }
  18.    
  19.         public class Display
  20.         {
  21.             [DllImport(@"User32", CharSet = CharSet.Auto)]
  22.             private static extern IntPtr PostMessage(IntPtr hWnd, UInt32 Msg, IntPtr wParam, IntPtr lParam);
  23.  
  24.             public static void PowerOff()
  25.             {
  26.                 PostMessage(
  27.                    (IntPtr)HWND_BROADCAST, // HWND_BROADCAST
  28.                    WM_SYSCOMMAND,         // WM_SYSCOMMAND
  29.                    (IntPtr)SC_MONITORPOWER, // SC_MONITORPOWER
  30.                    (IntPtr)0x0002  // POWER_OFF
  31.                 );
  32.             }
  33.          }
  34.        
  35.         private void button1_Click(object sender, EventArgs e)
  36.         {
  37.             point = Cursor.Position;
  38.             Display.PowerOff();
  39.             PowerManager.IsMonitorOnChanged += PowerManager_IsMonitorOnChanged;
  40.         }
  41.  
  42.         private void PowerManager_IsMonitorOnChanged(object sender, EventArgs e)
  43.         {
  44.             Point point2 = Cursor.Position;
  45.             if (PowerManager.IsMonitorOn == true && point == point2)
  46.                 Display.PowerOff();
  47.         }
  48.     }
  49. }

Basically, if the monitor powers on for whatever reason, and the mouse cursor has not moved, it will turn off again! Hurrah! No more getting out of bed walking to the computer! It's almost instantaneous when I try to use my keyboard to wake my machine up! I can add logging to this to get an idea of when the mouseless events occur and try to compare them to event logs.

But for now... it's time to enjoy some monitor-off sleep  :Thmbsup:

3
Have you checked in the bios and made sure you have all wake-on-lan and any other fishy options disabled?

If you turn off your network adapter (e.g. disconnect ethernet, disconnect from wireless), does the problem still happen?
Have you tried turning off automatic update checking?

Have you any 3rd party (like laptop manufacturer, or intel) app that might be trying to check regularly for updates?

I don't believe my BIOS has that option. I will check again soon.

I have been in airplane mode and it still wakes up.

My Blizzard agent checks for updates regularly, but in the months it ran before my 1903 update it ran and updated fine without waking up my screen.

I'm not sure how much farther I want to go down this rabbit hole. I could be messing with power configs, notification settings, network stuff, and registry entries forever. It's insane to see this problem I'm having be so difficult to diagnose for what seems like a simplistic functiion of the operating system.

4
It turned on again... I'm fairly close to igniting this computer in gasoline. I'm just going to say it's cursed at this point.

No more laptops for me. I'll build a nice desktop with a Linux distro that can run my favorite games. None of this NVIDIA Optimus tripe.

5
Sorry it's still around.

On the off-chance you haven't seen the following, this thread sounded awfully similar:

https://www.tenforums.com/general-support/134542-windows-10-upgrade-1903-64-bit-sleep-wakes-up-multiple-computers.html

It appears there was some success for the original poster described on the second page of the thread, with the original suggestion (plus link to article) on the first page.
Thank you! I tried quite a bit from that thread. I also find the following commands from ghacks VERY useful, and might make a snack to make this a little easier:

Command line Fu

Here is a list of useful commands that can help you find out more about your PC's sleep mode and wake up configuration:

powercfg -a displays a list of available sleep states of the computer.
powercfg -devicequery wake_armed lists all devices that can wake the computer
powercfg -devicequery wake_programmable lists all devices that can be programmed to wake up the PC.
powercfg -devicedisablewake "exact device name" disables the wake functionality of the selected device.
powercfg -deviceenablewake "exact device name" will enable that device again.
powercfg -lastwake displays the last device that woke up the PC.
powercfg -waketimers lists all active wake timers.

Pages: [1] 2 3 4 5 6 ... 27next
Go to full version