In trying to unlock my phone, I followed the instructions at jz.bz/tar.jz/unlock-samsung-galaxy-ace-gt-s5830d. Installed Clockwork Recovery 220.127.116.11, and XWKT7 Adrenaline Rom from the links on that page. Installations went fine, though in the final step to find the unlock code, when I opened the file I created in the hex editor, it was nearly empty, and the string I was looking for was missing. Moot. But this is background, in case it's relevant.
Learning what I was doing as I went along, I didn't realize that I had already rooted the device. I proceeded to root it again with SuperOneClick v2.3.3. In the process of this, it told me the device was already rooted, but of course, I continued. Still, everything worked fine.
For reasons not relevant here, I want to return it to the stock ROM. I eventually found it on Sammobile, along with the instructions on this site to use Odin in order to install it. Followed them properly, only to have the installation fail, then catching my phone in a boot loop.
The phone wouldn't come out of the bootloop until I went back to the instructions on that page above, and reinstalled Clockwork and Adrenaline. When I did this, the phone returned to working condition, so I tried to reinstall the stock ROM with Odin a couple more times. Same effect. Found another page on this site instructing me to place the ROM's .zip file on the SD card, and flash it from recovery. In the instructions, it told me to first wipe data/factory reset, then go to mounts/storage and wipe system, wipe data, and wipe SD-ext. There was no 'wipe' option, so I assumed that format was what was being referred to, and did that. After some error messages about the SD-ext, I figured out the SD card wasn't partitioned, used the phone to partition it, and tried again. Error messages gone, but still, both Odin, and the SD card method have failed to reinstall the stock ROM. I'm lost, and at this point, I need some help. Badly.