Jump to content

All Activity

This stream auto-updates     

  1. Today
  2. From my many PM chats with him on this forum I know he'd be laughing at such a gaff. Our community is certainly less with his passing.
  3. Yesterday
  4. I am copying my recent post to the Facebook post for safekeeping, since it is so easy to get lost on FB: Note that a "retro" edge card user port is available simply by having an expansion card with an edge connector. As an expansion card, this doesn't have to be built right away, but having it "on deck" addresses desires for a retro VIC-20 / C64 style edge card User Port without requiring that to be built into the main CX16 board design. Implementing the Serial Port parts of a C64 User Port top edge would be straightforward if there is a pin header on the main board bringing out VIA1_CB1 and VIA1_CB2. Implementing a reasonably C64-alike User Port bottom edge would be straightforward on an expansion card: put out PortA (rather than PortB), so that CA1 and CA2 can serve as the handshake lines, PB2 and /Flag. This actually brings the output handshake full circle, since in the Vic-20 User Port the bottom edge is PortB and the VIA handshake or serial port lines CB1 and CB2. I think if old hardware might be plugged in here, the +/-9VAC lines should be DNC. 1: GND 2: +5V 3: /Reset 4: VIA1_CB1 5: VIA1_CB2 6: CB1 7: CB2 8: ??? 9: ??? 10: [DNC] 11: [DNC] 12: GND Since VIA#2_CB1 & 2 are brought out on the C64 User Port Serial Port lines, they are not available as 8bit write handshake lines. Also, VIA PortA has both hardware read and write handshakes, making PortA the more flexible choice for the bottom of the User Port. Now rather than the C64 use of a GPIO on the output handshake line, the output handshake can be a hardware handshake line as on the Vic-20 User Port: 1: GND | A: GND 2: +5V | B: CA1 3: /Reset | PA0 4: VIA1_CB1 | PA1 5: VIA1_CB2 | E: PA2 6: CB1 | F: PA3 7: CB2 | H: PA4 8: ??? | J: PA5 9: ??? | K: PA6 10: [DNC] | L: PA7 11: [DNC] | M: CA2 12: GND | GND Now there are only two lines to place. In the VIC-20 User Port they are cassette switch and IEC-ATN. In the C64 User Port, they are the CIA#2 output handshake line and IEC-ATN. As with the C64 User-Port putting a GPIO where the Vic-20 has a VIA handshake line, these would best be filled by PortB lines. As swapping PortB and PortA means that the PB6 and PB7 pins which interact with the timers in some timer modes are no longer available, PB6 & PB7 are likely the highest priority. These have the added advantage that they can be tested directly by "BIT PORTB" without setting up a Bit Mask, as the BIT operation sets the Sign and Overflow flag based on the values of bit7 and bit6, respectively: 1: GND | A: GND 2: +5V | B: CA1 3: /Reset | PA0 4: VIA1_CB1 | PA1 5: VIA1_CB2 | E: PA2 6: CB1 | F: PA3 7: CB2 | H: PA4 8: PB7 | J: PA5 9: PB6 | K: PA6 10: [DNC] | L: PA7 11: [DNC] | M: CA2 12: GND | GND This fills the use case for the pin header layout in the OP, so the main board User Port can focus on simply bringing out the "spare" VIA#1 pins. Rather than trying for a "legacy" layout, it is laid out to a 6pin SIL to TTL serial cable can plug directly into one side of the pin header, and so that power lines are are identical for 5-pin SIL plugged into the second side of the pin header with "pin2" as Pin1. 1: GND | 2: GND 3: CA2 (CTS) | CA1 (/ACK) 5: +5V | 6: +5V 7: PB0 (TXD) | 8: CB2 (SDATA) 9: PB1 (RXD) | 10: CB1 (SCLK) 11: PB2 (RTS) | 12: DNC
  5. Last week
  6. For the expansion User Port based on the VIA on an expansion port slot: PortA: MOSI. PortA7 tied to MOSI, PortA0-PortA6, DNC but set up as outputs, so they work as registers. PortB: PortB0-PortB5, /Select0-/Select5 PortB6: "SMASK", this is tied to an AND for Mode0 devices to convert a Mode3 SPI system based on the VIA into a Mode0 SPI bus PortB7: "/Alert", an input that the SPI device holds low to send a special signal. Note that there are two spare NAND gates in the circuit to implement the Mode0/Mode1/Mode2 support, so if the device raises a line to send a special signal, that can be easily converted to a pull down /Alert. CA2 is put into Pulse Output mode, and acts as SCLK (the Mode3 internal serial clock). The pulse is one full PHI2 cycle wide, so this particular interface is for SPI servant devices that can handle 4MHz or higher SPI clock (that is a fairly common top end speed for medium-fast SPI chips). CB2 is the serial shift register input, with the SSR configured as driven by CB1. CB1 is the serial clock input into the serial shift register. It is tied directly to CA2, not to the SPI_SCLK, since the VIA SR is a Mode3-only MISO. CPOL is a location in the program memory that is $00 if Mode3/Mode2 is desired, set to %01000000 if Mode0/Mode1 is desired. This works as a mask for TSB/TRB operations to pull the SMASK bit up and put it back down, but only if Mode0/Mode1 operation is desired. SPI_BYTE: ; Output byte in A, Input Byte returns in A, returns CC if /Alert is not sent, CS if Alert is sent STA VIA2_PORTA : LDA CPOL : TRB VIA2_PORTB ASL VIA2_PORTA : ASL VIA2_PORTA : ASL VIA2_PORTA : ASL VIA2_PORTA ASL VIA2_PORTA : ASL VIA2_PORTA : ASL VIA2_PORTA LDA CPOL : TRB VIA2_PORTB : LDA VIA2_SR BIT VIA2_PORTB : BEQ + : CLC : RTS + SEC : RTS I get about 89 clock cycles (90 is alert is sent), so 89.888KB/sec, 719kbps, 4-5 times faster than the I2C bus. For something like a MAX3001 SPI UART, this seems like it would be plenty fast to run it at very high serial port baud rates. For something like a Raspberry Pi Pico used as a Flash USB drive loader, it would copy fairly large files into the SD card fairly quickly as well as being a quite reasonable "keyring Disk9" to complement the built in SD card Disk8. And stepping up to a RPi Zero-W makes for a budget WiFi internet modem option.
  7. Tragic news, he wasn't much older than I am. Hoping his family can find as much comfort as possible in a trying time. I interacted with him a bit about a year ago, seemed like a good dude. Just read his obit, it states he was "collaborating with other programmers with projects such as the Penske Robots Game for the Commodore 360." Penske Robots? And a search reveals the Commodore 360 is a boat. I think he'd get a kick out of that. Mark
  8. My goodness, this comes as a shock. He was always an interesting person to chat with on this forum.
  9. In a similar fashion to the "What Modern Games Do you Play" thread, I'm curious what classic games you play in your spare time that have been "updated" to run on modern hardware, perhaps with some modern features added, extra content maybe? Source ports have been around for a long time, as have re-releases and remakes, but the latter two have really picked up in popularity over the past several years, as have new indie games heavily inspired by classic franchises. I have found my "collection" of these games growing quite large, even though I can play most of them by other means, I find myself re-buying old games just to play their modern incarnation or to support those specific developers. Do you do buy new releases of games you already own or have played before? What are your personal favorites? Here are some of mine. Skipping the well known Doom, Heretic, Hexen, Half Life, and Duke 3D source ports and updated releases I think just about everyone knows about. I will also exclude classic games sold that just run in a pre-configured DOSBox release, I have just about all of those now too. Source Ports: OpenRCT2 - Fantastic source port of the original Roller Coaster Tycoon games! - https://openrct2.org/ EC Wolf – Wolfenstien 3D! - https://maniacsvault.net/ecwolf/ Re-Releases/Updates: Konami Anniversary Collection Arcade Classics - https://store.steampowered.com/app/1018000/Anniversary_Collection_Arcade_Classics/ Atari Vault - https://store.steampowered.com/app/400020/Atari_Vault/ Blood Fresh Supply - https://store.steampowered.com/app/1010750/Blood_Fresh_Supply/ Castlevania Anniversary Collection - https://store.steampowered.com/app/1018010/Castlevania_Anniversary_Collection/ Contra Anniversary Collection - https://store.steampowered.com/app/1018020/Contra_Anniversary_Collection/ Deja Vu MacVenture Series - https://store.steampowered.com/app/343820/Dj_Vu_MacVenture_Series/ Uninvited MacVenture Series - https://store.steampowered.com/app/343810/The_Uninvited_MacVenture_Series/ Shadowgate MacVenture Series - https://store.steampowered.com/app/343800/Shadowgate_MacVenture_Series/ Metal Slug Games - https://store.steampowered.com/app/366250/METAL_SLUG/ Sega Genesis Collection - https://store.steampowered.com/app/34270/SEGA_Mega_Drive_and_Genesis_Classics/ Final Fantasy 3D Remakes - https://store.steampowered.com/app/239120/Final_Fantasy_III_3D_Remake/ "HD" Remakes: Command & Conquer Remastered Collection - https://store.steampowered.com/app/1213210/Command__Conquer_Remastered_Collection Crystal Caves HD - https://store.steampowered.com/app/1330890/Crystal_Caves_HD/ Spyro Reignited Trilogy - https://store.steampowered.com/app/996580/Spyro_Reignited_Trilogy/ Final Fantasy VII Remake - https://store.steampowered.com/app/1462040/FINAL_FANTASY_VII_REMAKE_INTERGRADE/ I better stop there, this is getting out of hand. There are so many more releases, updated versions, and new releases in various franchises that I have invested in, like Indiana Jones, Monkey Island, Quest for Glory, Commander Keen, Dragon's Lair, Maniac Mansion, Sonic the Hedgehog, Star Trek, Star Control, Strife, Turok, Ys, Bards Tale, Blaster Master, Pac-Man, TMNT, and more. Yeah, I really do have a "retro" problem, and I'm proud of it!
  10. Well now you can peruse my code for the inverse functions you need and see how to convert them to using degrees if you need that. The angle mode (degrees or radians) is controlled by the strings "DEG" or "RAD" in A$ The inverse functions are in line numbers 5150 to 5172
  11. Yeah, I have been dealing with some trigonometry in a project I'm currently in the "thinking really hard about it but not yet writing anything down" stage. And the realization came early that the X16's BASIC was slightly lacking in trig functions. All I'm worried about at this point is 'is this project even possible' so I just thought about "soh-cah-toa" and realized that it was doable to work without a full complement of inverse functions. And that's as far as it went.
  12. New! Improved - Now does arcsine and arccosine - thanks to @BruceMcF I had to do some trial and error to get the DEG / RAD conversion going correctly. Now you can use either angle mode. I don't think you can mix them however, or you must convert for yourself between calculations. RAD = DEG * pi / 180 Edit again - re-uploading files as I had not actually done arc-cosine yet. CALCULATOR Calculator.txt
  13. I had taken the inner parens out thinking the rule says do power before multiply before addition... Going to go check - watch this space.
  14. When I do it on my Windows virtual calculator using 0.70711, squared, negated, added one, inverted, times 0.70711 (which is very close to 1), I get an arctan of 45.000261. Be careful you are doing sqrt(1-(x^2)) and not sqrt((1-x)^2). When I do it by hand in VICE: X=0.70711 ATN(X/SQR(1-(X*X))) I get 0.785402716
  15. @BruceMcF My google Fu confirms : at ps://mathonweb.com/help_ebook/html/algorithms.htm#arcsin arcsin(x) = atn(x/sqr(1-x^2)) and arccos(x) = atn(sqr(1-x^2)/x) The C64 manual Appendix H gives inverse sine as atn(x/sqr(-x*x+1)) and inverse cosine as atn(x/sqr(-x*x+1)) + pi/2 I am trying both of those for my calculator (even with or without the x*0.017453 to convert from deg to rad) Unfortunately they are not returning back to the original angle. sin 45 degrees = .70709 arcsine of (.70709) = .01234 (degrees set so the conversion is being done.) The last time I worked with this kind of math was in ITT Tech - over 10 years ago. Little rusty.
  16. Specifically, if google doesn't lie to me, Arctan{x/[sqrt(1-x^2)] = arcsin(x)
  17. I seen that video the other day and thought it was a really cool idea. I agree that there are ways you could expand on it if you really wanted to do so. Adding I/O and storage, both (RAM and ROM?) on the cart being the most obvious. However one of the comments on the video expressed one thing I was thinking the entire time, for the FamiCom, you could use the FamiCom Disk System to load and store information as well. In tandem with a cart you could probably create a pretty cool little era appropriate "Family Computer". Of course, I'm not 100% sure the FamiCom can use the FDS and a cart at the same time, but if it can, that seems like a great way to max out a potential design. Either way, I really like that video.
  18. Arctan is in BASIC V2, as ATN. The others aren't. There's math that can be done using the arctan function and the understanding that the radius is always 1, though.
  19. A big advantage of doing it all in a cartridge is you have the natural location for all of the I/O parts right there on the cartridge board, on the opposite edge from the cartridge port. AFAIU, on NES powerup/reset, you'd have: $0000-$07FF: NESRAM $2000-$3FFF: PPU I/O ports $4000-$5FFF: APU/Controller I/O ports $6000-$7FFF: Work RAM if installed on CART $8000-$FFF9: Cartridge ROM $FFFA-$FFFF: NMI/IRQ/RESET vectors If you have a clever enough banking scheme, you only need one RAM and one FlashROM chip. But "clever" here means setting things up so you can get from the start-up state to the normal memory map with the smallest possible boot-up code. Suppose it's 128KB each: The $8000-$FFFF decode circuitry splits between the 16KB HighRAM window in $8000-$BFFF and the 16KB ROM window in $C000-$FFFF The bottom half of RAMBank 0 appears in the WRAM space in $6000-$7FFF The banking latch has its reset pin hooked up, so on powerup/reset, the banking latch has is in its $00 state The banking latch is: bit0-bit2 = ROM A14-A16; bit3-bit5 = RAM A14-A16, bit7=RAM/ROM, bit In $00 state, ROMBank 0 is selected in $8000-$BFFF, with Bit7 of the latch selecting between ROM and RAM /OE in that space In RAMBank $00 state, RAMBank 0 is selected for $8000-$BFFF With RAM selected in $8000-$BFFF whether or not it's output is enabled, you can have the transition routine at the top of ROMBank 0 which copies itself to the top of RAMBank 0, toggles out the ROM, then calls code in the normal ROM window. Only JMP COLDSTART / ... / COLDSTART: ... / ENDROM is assembled for the ROM appearing at $8000, everything else is assembled for ROM appearing at $C000. You have eight ROM segments and eight HighRAM segments, 2KB NES RAM and 8KB "LowRAM" that also appears in $8000-$9FFF when RAMBank 0 is selected. While you can mask out RAM when setting ROM (and visa versa): "STA CALLROM : LDA BANK : AND #%1111100 : ORA CALLROM", you can also design code that allocates a ROM bank together with its own dedicated RAM bank, so, eg, "SYSCALL" executing in NESRam or WRAM is: "LDA THISBANK : PHA : LDA #SYSBANKS : STA THISBANK : STA BANK : JSR + : PLA : STA THISBANK : STA BANK : RTS : + JMP DOSYS,X".
  20. Here is a very close try to what I wanted to see except one big disadvantage: you can not program in this thing. But looking from different standpoint, this is very good looking OS running on NES! Maybe more to come in this project.
  21. When you want a real thing, then you want a real thing, and nothing else will substitute. ) But if you want same outer look and feel, you can go for replicas. I did not check if there are many Commodore mouse replicas out there, but, for example, Amiga 500 Mini has good looking replica of original Amiga mouse (not sure if you can buy one separately).
  22. From your avatar, are you hoping for FORTH programming? Oh- I see you do mention FORTH in your post too.
  23. All Hail Rassilon, Lord High President!
  24. Hey JimmyJab I am in Sacramento - So not too far away.
  25. Oh - an updated version where in I actually added the commented out key monitoring line mentioned in the text file CALCULATOR
  26. Here is an RPN calculator in BASIC that is a work-alike to the HP line of calculators of yore. Because it is written in BASIC functionality is easily added. A small usage doc is included too. Any suggestions on additional functionality that I should add to the base calculator, (like Pi or e as constants)? <- this has been added Anyone know an easy way to calculate ArcSin, ArcCos, and ArcTan? <edit - This has been managed I am re-uploading the latest version here. The Text file is a mini-manual. The "CALCULATOR" is a tokenized basic program. Let me know if there are other features you would like. Calculator.txt CALCULATOR
  1. Load more activity
×
×
  • Create New...

Important Information

Please review our Terms of Use