This mode allows a single game to be flashed to VEXTREME via USB and immediately run. To update the game, simply press reset, let the VEXTREME drive re-mount and you are ready to flash again. Usually this connection time is impercievable since you reset VEXTREME, and then have to go press compile & flash. This feature is already supported by Vide, as implemented for VecFever, but you may implement support easily in any development toolchain. For this feature to work in Vide, you must copy this README.TXT to the root of your VEXTREME.
Entering Developer Mode
Press button 2 & 3 together at any time during the VEXTREME Menu to enter DM, or hold them down when starting the Menu. NOTE: they must be pressed at the same time, not 2 then 3 or vice versa.
The Developer Mode wait screen will prompt you to "PLUG IN USB" if you have USB unplugged.
After plugging it in, it will show "LOAD CART.BIN" prompting you to put a cart.bin file in the root of the drive e.g. VEXTREME/cart.bin.
If the Vectrex is off, and USB plugged in, the USB drive will mount as usual. You may add a cart.bin however you wish, and then if you Eject the drive it will detect the cart.bin and load it. As soon as you turn your Vectrex on, it will boot the cart.bin ROM. You may press reset to skip the cold boot sequence and warm reset the cart.bin (v0.3 HW only, or v0.2 with mods)
DM is considered "active" when a cart.bin is present.
If you reset the Vectrex while DM is active, it will automatically return to DM mode without needing to press buttons 2 & 3. This is the preferred way to re-enter DM after running cart.bin, to get ready to flash another cart.bin.
Developer Mode Menu
The splash screen for DM will show one of 4 messages:
"PLUG IN USB" (pretty obvious you need to plug in USB)
"UNKNOWN USB" (you should never see this, but it's there for debugging weird issues)
"LOAD CART.BIN" (USB is plugged in and we are waiting for a cart.bin and the eject sequence. Currently you must eject, not use safely remove hardware. Windows users, go to File Explorer and Eject the drive. TODO: add a timeout for Windows users in the future that detects safe removal process)
"1: EXIT 4: RUN" (this just helps you remember what button to press to EXIT developer mode and delete cart.bin or RUN the cart.bin if present. If no cart.bin present it will just return to the VEXTREME Menu. USB does not need to be connected to EXIT or RUN)
The splash screen was specifically designed to be a bit less bright, and randomly move the text LEFT/RIGHT/UP/DOWN for even screen wear. Do not calibrate your screen brightness in this mode.
If you accidentally press RESET after connecting USB, you might see Mine Storm load. Just press RESET again and you should recover.
Exiting Developer Mode
DM can be "disabled" by removing cart.bin manually, or through the DM menu button 1: Exit.
Pressing 4: RUN from the DM menu does not disable it.
Powering off the Vectrex with cart.bin present does not disable Developer Mode.
Other Improvements
added USE_HW compile option, which must now be set. It will not default to a specific version. Right now specify it as USE_HW=v0.2 or USE_HW=v0.3 when running 'make clean all flash'. It can also be exported in your environment if you wish, but don't forget about it if you update your HW ;-)
removed :leave from DFU commands since after flashing the stm32 binary, we are not really ready to reset and run. The boot0 jumper must be removed before then.
minor changes to improve the Makefile for Windows (still WIP)
changed delay() and millis() to use dwt_read_cycle_counter() instead of the sys_tick_handler() because romemu.S didn't like us randomly leaving to handle interrupts, and we need these functions while we are emulating ROM. There is a ~35s delay limit because of this. I added an assert so I don't forget!
started adding some changes in fatfs to enable writes to flash memory since it was currently read-only, but ended up not needing them. No worries though, the highscore feature will require these. These changes thanks to @tbrymer!
VEXTREME now also prints it's own HW and SW revision in logs at boot time.
Moved start of rainbow LED code to after we are done with USB activities, so as not to load down the USB port more than necessary. Hopefully this fixes a reported bug with Windows.
USB MSC can now be entered while the Vectrex is off, Ejected and left plugged in and the Vectrex can be turned on and boot a cart.bin for Developer Mode, or the VEXTREME menu.
USB MSC can be started and stopped from the Vectrex now, which is necessary for Developer Mode.
An improved reset function was added after feedback from users. Now in v0.3 hardware you will be able to press reset at any time to get back to the Menu. If you hold reset for ~700ms, it will reset the current running ROM/game. In the case of booting into Developer Mode (cart.bin already on the drive root), a first reset will not go to the Menu, but rather the cart.bin.. allowing you to skip the cold boot sequence. You may modify v0.2 hardware to act like v0.3 hardware for this feature. For now that means you will need to jumper V-OE pin 12 of the cart fingers (or U3 pin 9) to STM32 pin 29 (PB10).
For v0.2 hardware, you can still compile in the old functionality were a short reset would reset the running ROM/game, and if you hold reset for ~700ms you will get the Menu.
Also added to the reset sequence for both v0.2/v0.3 HW is that the LEDs light up CYAN after the "long" reset delay of 700ms, and stay lit as long as you are holding reset. When you let go, they return to rainbow. This helps you gage just how long you need to wait to hold the button for long reset.
Added "scsi_command: %02X\n" which logs USB MSC commands to log output, this might seem chatty, but for now let's see what we see ;-)
Developer Mode (DM)
Overview
This mode allows a single game to be flashed to VEXTREME via USB and immediately run. To update the game, simply press reset, let the VEXTREME drive re-mount and you are ready to flash again. Usually this connection time is impercievable since you reset VEXTREME, and then have to go press compile & flash. This feature is already supported by Vide, as implemented for VecFever, but you may implement support easily in any development toolchain. For this feature to work in Vide, you must copy this README.TXT to the root of your VEXTREME.
Entering Developer Mode
Developer Mode Menu
Exiting Developer Mode
Other Improvements
Steps to Test
Compile with:
or
also
References
Closes #23